mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 05:06:32 +00:00
Fix ESP32 template upload
This commit is contained in:
parent
892be892fa
commit
5df4b7b391
@ -1346,11 +1346,11 @@ bool JsonTemplate(const char* dataBuf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (obj[D_JSON_FLAG].success()) {
|
if (obj[D_JSON_FLAG].success()) {
|
||||||
uint8_t flag = obj[D_JSON_FLAG] | 0;
|
uint32_t flag = obj[D_JSON_FLAG] | 0;
|
||||||
memcpy(&Settings.user_template.flag, &flag, sizeof(gpio_flag));
|
memcpy(&Settings.user_template.flag, &flag, sizeof(gpio_flag));
|
||||||
}
|
}
|
||||||
if (obj[D_JSON_BASE].success()) {
|
if (obj[D_JSON_BASE].success()) {
|
||||||
uint8_t base = obj[D_JSON_BASE];
|
uint32_t base = obj[D_JSON_BASE];
|
||||||
if ((0 == base) || !ValidTemplateModule(base -1)) { base = 18; }
|
if ((0 == base) || !ValidTemplateModule(base -1)) { base = 18; }
|
||||||
Settings.user_template_base = base -1; // Default WEMOS
|
Settings.user_template_base = base -1; // Default WEMOS
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user