mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-28 07:57:18 +02:00
Ignore update locallyControlled
if configuration from server
This commit is contained in:
@ -267,6 +267,8 @@ bool LocalConfig::parse(String data, bool isLocal) {
|
||||
}
|
||||
}
|
||||
|
||||
/** This field only allow on local configure */
|
||||
if (isLocal) {
|
||||
if (JSON.typeof_(root["locallyControlled"]) == "boolean") {
|
||||
bool locallyControlled = root["locallyControlled"];
|
||||
if (locallyControlled != config.locallyControlled) {
|
||||
@ -275,6 +277,7 @@ bool LocalConfig::parse(String data, bool isLocal) {
|
||||
printLog("set locallyControlled: " + String(locallyControlled));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Parse data only got from AirGradient server */
|
||||
if (isLocal == false) {
|
||||
|
Reference in New Issue
Block a user