Skip to content

Commit

Permalink
added firmware values to device response and set device info
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed Mar 14, 2021
1 parent 1ef307a commit 6a98bff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public class ResponseConfig extends SensorConfig {

public String lskey;


public String vmac;

public String vflv;

public String vtag;

public int vrev = 0;

}
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,14 @@ private String getInfluxDbDname() {
**********************************************************************************************/

private void saveDeviceInfoString(ResponseConfig config) {
String info = "wmac:"+config.wmac+" wifi:"+(config.wsta ? "connected" : "failed");
String info = "MAC:"
+ config.vmac
+"\nFirmware: "+config.vflv+" rev"+config.vrev
+"\nChannel :\t"+config.vtag
+"\nWiFi:"+(config.wenb ? "enable" : "disable")
+" IFDB:"+(config.ienb ? "enable" : "disable")
+"\nGW:"+(config.wsta ? "connected" : "disconnected");
if(config.vrev<774)info="\n!!YOUR FIRMWARE IS OUTDATED!!\n\n"+info;
updateSummary(R.string.key_device_info,info);
saveSharedPreference(R.string.key_device_info,info);
}
Expand Down Expand Up @@ -590,6 +597,10 @@ private void printResponseConfig(ResponseConfig config) {
Logger.i(TAG, "[Config] -----------------------------");
Logger.i(TAG, "[Config] wifist: " + config.wsta);
Logger.i(TAG, "[Config] wmac : " + config.wmac);
Logger.i(TAG, "[Config] vrev : " + config.vrev);
Logger.i(TAG, "[Config] vmac : " + config.vmac);
Logger.i(TAG, "[Config] vflv : " + config.vflv);
Logger.i(TAG, "[Config] vtag : " + config.vtag);
Logger.i(TAG, "[Config] lskey : " + config.lskey);
}

Expand Down

0 comments on commit 6a98bff

Please sign in to comment.