mirror of https://github.com/arendst/Tasmota.git
Merge pull request #10274 from s-hadinger/minimal_without_json
Reduce tasmota-minmal by 4kb
This commit is contained in:
commit
31fedcb000
|
@ -1284,12 +1284,14 @@ void CmndTemplate(void)
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (JsonTemplate(XdrvMailbox.data)) { // Free 336 bytes StaticJsonBuffer stack space by moving code to function
|
||||
#ifndef FIRMWARE_MINIMAL // if tasmota-minimal, `Template` is read-only
|
||||
if (JsonTemplate(XdrvMailbox.data)) {
|
||||
if (USER_MODULE == Settings.module) { TasmotaGlobal.restart_flag = 2; }
|
||||
} else {
|
||||
ResponseCmndChar_P(PSTR(D_JSON_INVALID_JSON));
|
||||
error = true;
|
||||
}
|
||||
#endif // FIRMWARE_MINIMAL
|
||||
}
|
||||
if (!error) { TemplateJson(); }
|
||||
}
|
||||
|
|
|
@ -3401,7 +3401,9 @@ void CmndWebColor(void)
|
|||
}
|
||||
}
|
||||
else {
|
||||
#ifndef FIRMWARE_MINIMAL // if tasmota-minimal, read only and don't parse JSON
|
||||
JsonWebColor(XdrvMailbox.data);
|
||||
#endif // FIRMWARE_MINIMAL
|
||||
}
|
||||
}
|
||||
Response_P(PSTR("{\"" D_CMND_WEBCOLOR "\":["));
|
||||
|
|
Loading…
Reference in New Issue