forked from airgradienthq/arduino
Boot count using setter and getter
This commit is contained in:
+7
-3
@@ -601,8 +601,8 @@ String Measurements::toString(bool localServer, AgFirmwareMode fwMode, int rssi,
|
||||
}
|
||||
}
|
||||
|
||||
root["boot"] = bootCount;
|
||||
root["bootCount"] = bootCount;
|
||||
root["boot"] = _bootCount;
|
||||
root["bootCount"] = _bootCount;
|
||||
root["wifi"] = rssi;
|
||||
|
||||
if (localServer) {
|
||||
@@ -1065,4 +1065,8 @@ JSONVar Measurements::buildPMS(AirGradient &ag, int ch, bool allCh, bool withTem
|
||||
return pms;
|
||||
}
|
||||
|
||||
void Measurements::setDebug(bool debug) { _debug = debug; }
|
||||
void Measurements::setDebug(bool debug) { _debug = debug; }
|
||||
|
||||
int Measurements::bootCount() { return _bootCount; }
|
||||
|
||||
void Measurements::setBootCount(int bootCount) { _bootCount = bootCount; }
|
||||
+3
-2
@@ -147,8 +147,8 @@ public:
|
||||
*/
|
||||
void setDebug(bool debug);
|
||||
|
||||
// TODO: update this to use setter
|
||||
int bootCount;
|
||||
int bootCount();
|
||||
void setBootCount(int bootCount);
|
||||
|
||||
private:
|
||||
// Some declared as an array (channel), because FW_MODE_O_1PPx has two PMS5003T
|
||||
@@ -171,6 +171,7 @@ private:
|
||||
IntegerValue _pm_25_pc[2]; // particle count 2.5
|
||||
IntegerValue _pm_5_pc[2]; // particle count 5.0
|
||||
IntegerValue _pm_10_pc[2]; // particle count 10
|
||||
int _bootCount;
|
||||
|
||||
bool _debug = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user