mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-27 23:47:16 +02:00
Ignore update locallyControlled
if configuration from server
This commit is contained in:
@ -267,12 +267,15 @@ bool LocalConfig::parse(String data, bool isLocal) {
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON.typeof_(root["locallyControlled"]) == "boolean") {
|
||||
bool locallyControlled = root["locallyControlled"];
|
||||
if (locallyControlled != config.locallyControlled) {
|
||||
changed = true;
|
||||
config.locallyControlled = locallyControlled;
|
||||
printLog("set locallyControlled: " + String(locallyControlled));
|
||||
/** This field only allow on local configure */
|
||||
if (isLocal) {
|
||||
if (JSON.typeof_(root["locallyControlled"]) == "boolean") {
|
||||
bool locallyControlled = root["locallyControlled"];
|
||||
if (locallyControlled != config.locallyControlled) {
|
||||
changed = true;
|
||||
config.locallyControlled = locallyControlled;
|
||||
printLog("set locallyControlled: " + String(locallyControlled));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user