kopia lustrzana https://github.com/Aircoookie/WLED
Default button pin allocation on 1st boot.
rodzic
d28158bc74
commit
07d74ee692
|
@ -169,14 +169,17 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
|||
}
|
||||
} else {
|
||||
// new install/missing configuration (button 0 has defaults)
|
||||
if (fromFS)
|
||||
for (uint8_t s=1; s<WLED_MAX_BUTTONS; s++) {
|
||||
if (fromFS) {
|
||||
uint8_t s=0;
|
||||
if (pinManager.allocatePin(btnPin[0])) s++; // do not clear button 0 if pin successfully allocated
|
||||
for (; s<WLED_MAX_BUTTONS; s++) {
|
||||
btnPin[s] = -1;
|
||||
buttonType[s] = BTN_TYPE_NONE;
|
||||
macroButton[s] = 0;
|
||||
macroLongPress[s] = 0;
|
||||
macroDoublePress[s] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
CJSON(touchThreshold,btn_obj[F("tt")]);
|
||||
CJSON(buttonPublishMqtt,btn_obj["mqtt"]);
|
||||
|
|
Ładowanie…
Reference in New Issue