mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Add undocumented feature
This commit is contained in:
parent
e932902351
commit
e05d75248e
@ -186,7 +186,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
||||
uint32_t no_voltage_common : 1; // bit 4 (v12.3.1.5) - SetOption150 - (Energy) Force no voltage/frequency common
|
||||
uint32_t matter_enabled : 1; // bit 5 (v12.3.1.5) - SetOption151 - (Matter) Enable Matter protocol over Wifi
|
||||
uint32_t bistable_single_pin : 1; // bit 6 (v12.5.0.1) - SetOption152 - (Power) Switch between two (0) or one (1) pin bistable relay control
|
||||
uint32_t spare07 : 1; // bit 7
|
||||
uint32_t berry_autoexec : 1; // bit 7 (v12.5.0.3) - SetOption153 - (Berry) Disable autoexec.be on restart (1)
|
||||
uint32_t spare08 : 1; // bit 8
|
||||
uint32_t spare09 : 1; // bit 9
|
||||
uint32_t spare10 : 1; // bit 10
|
||||
|
@ -1474,6 +1474,7 @@ void CmndSetoptionBase(bool indexed) {
|
||||
switch (pindex) {
|
||||
case 5: // SetOption151 - Matter enabled
|
||||
case 6: // SetOption152 - (Power) Use single pin bistable
|
||||
case 7: // SetOption153 - (Berry) Disable autoexec.be on restart (1)
|
||||
TasmotaGlobal.restart_flag = 2;
|
||||
break;
|
||||
}
|
||||
|
@ -378,6 +378,12 @@ void BerryInit(void) {
|
||||
void BrLoad(const char * script_name) {
|
||||
if (berry.vm == nullptr || TasmotaGlobal.no_autoexec) { return; } // abort is berry is not running, or bootloop prevention kicked in
|
||||
|
||||
if (!strcmp_P(script_name, "autoexec.be")) {
|
||||
if (Settings->flag6.berry_autoexec) { // SetOption153 - (Berry) Disable autoexec.be on restart (1)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
be_getglobal(berry.vm, PSTR("load"));
|
||||
if (!be_isnil(berry.vm, -1)) {
|
||||
be_pushstring(berry.vm, script_name);
|
||||
|
@ -208,7 +208,7 @@ a_setoption = [[
|
||||
"(Energy) Force no voltage/frequency common",
|
||||
"(Matter) Enable Matter protocol over Wifi",
|
||||
"(Power) Switch between two (0) or one (1) pin bistable relay control",
|
||||
"",
|
||||
"(Berry) Disable autoexec.be on restart (1)",
|
||||
"","","","",
|
||||
"","","","",
|
||||
"","","","",
|
||||
@ -325,7 +325,7 @@ else:
|
||||
obj = json.load(fp)
|
||||
|
||||
def StartDecode():
|
||||
print ("\n*** decode-status.py v12.5.0.2 by Theo Arends and Jacek Ziolkowski ***")
|
||||
print ("\n*** decode-status.py v12.5.0.3 by Theo Arends and Jacek Ziolkowski ***")
|
||||
|
||||
# print("Decoding\n{}".format(obj))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user