mirror of
https://github.com/wled/WLED.git
synced 2025-07-15 14:56:32 +00:00
Button 0 not saving macros fix.
This commit is contained in:
parent
95df91a03b
commit
d40a555531
@ -160,6 +160,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
|||||||
macroLongPress[s] = 0;
|
macroLongPress[s] = 0;
|
||||||
macroDoublePress[s] = 0;
|
macroDoublePress[s] = 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
//TODO: fix JSON API call (and new install)
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
JsonObject hw_btn_ins_0 = hw[F("btn")][F("ins")][0];
|
JsonObject hw_btn_ins_0 = hw[F("btn")][F("ins")][0];
|
||||||
@ -548,6 +550,10 @@ void serializeConfig() {
|
|||||||
hw_btn_ins_0["type"] = buttonType[0];
|
hw_btn_ins_0["type"] = buttonType[0];
|
||||||
JsonArray hw_btn_ins_0_pin = hw_btn_ins_0.createNestedArray("pin");
|
JsonArray hw_btn_ins_0_pin = hw_btn_ins_0.createNestedArray("pin");
|
||||||
hw_btn_ins_0_pin.add(btnPin[0]);
|
hw_btn_ins_0_pin.add(btnPin[0]);
|
||||||
|
JsonArray hw_btn_ins_0_macros = hw_btn_ins_0.createNestedArray("macros");
|
||||||
|
hw_btn_ins_0_macros.add(macroButton[0]);
|
||||||
|
hw_btn_ins_0_macros.add(macroLongPress[0]);
|
||||||
|
hw_btn_ins_0_macros.add(macroDoublePress[0]);
|
||||||
|
|
||||||
// additional buttons
|
// additional buttons
|
||||||
for (uint8_t i=1; i<WLED_MAX_BUTTONS; i++) {
|
for (uint8_t i=1; i<WLED_MAX_BUTTONS; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user