|
@@ -2152,9 +2152,14 @@ function ReadParameterAll() {
|
|
|
ReadParameter(param, "Webhook", "ApiKey", true);
|
|
ReadParameter(param, "Webhook", "ApiKey", true);
|
|
|
ReadParameter(param, "Webhook", "UploadImg", false);
|
|
ReadParameter(param, "Webhook", "UploadImg", false);
|
|
|
|
|
|
|
|
- (window.GPIO_AVAILABLE_PINS || []).forEach(function (gpio) {
|
|
|
|
|
- ReadParameter(param, "GPIO", "IO" + gpio, true);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // GPIO fields are irrelevant while the complete GPIO category is disabled.
|
|
|
|
|
+ // In particular, stale values from older firmware must not block saving
|
|
|
|
|
+ // unrelated configuration changes.
|
|
|
|
|
+ if (category["GPIO"]["enabled"]) {
|
|
|
|
|
+ (window.GPIO_AVAILABLE_PINS || []).forEach(function (gpio) {
|
|
|
|
|
+ ReadParameter(param, "GPIO", "IO" + gpio, true);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
ReadParameter(param, "GPIO", "LEDType", false);
|
|
ReadParameter(param, "GPIO", "LEDType", false);
|
|
|
ReadParameter(param, "GPIO", "LEDNumbers", false);
|
|
ReadParameter(param, "GPIO", "LEDNumbers", false);
|
|
|
ReadParameter(param, "GPIO", "LEDColor", false);
|
|
ReadParameter(param, "GPIO", "LEDColor", false);
|