|
|
@@ -3066,8 +3066,20 @@ window.GPIO_AVAILABLE_PINS = [];
|
|
|
throw new Error("GPIO" + pin + " has no supported input/output mode");
|
|
|
}
|
|
|
mode.value = supportedModes[0].value;
|
|
|
- if (!param.GPIO["IO" + pin].found && typeof param.GPIO["IO" + pin].value1 === "undefined") {
|
|
|
- param.GPIO["IO" + pin].value1 = mode.value;
|
|
|
+
|
|
|
+ // Match getCamConfig()'s fallback semantics for a GPIO entry that
|
|
|
+ // does not yet exist in config.ini: mark it found and populate every
|
|
|
+ // field with a valid, explicit default before binding the controls.
|
|
|
+ var gpioParameter = param.GPIO["IO" + pin];
|
|
|
+ if (!gpioParameter.found) {
|
|
|
+ gpioParameter.found = true;
|
|
|
+ gpioParameter.enabled = false;
|
|
|
+ gpioParameter.value1 = mode.value;
|
|
|
+ gpioParameter.value2 = "disabled";
|
|
|
+ gpioParameter.value3 = "10";
|
|
|
+ gpioParameter.value4 = "false";
|
|
|
+ gpioParameter.value5 = "false";
|
|
|
+ gpioParameter.value6 = "GPIO" + pin;
|
|
|
}
|
|
|
|
|
|
first.appendChild(labelCell);
|