mirror of https://github.com/arendst/Tasmota.git
Fix PCF8574 mode2 init using scripts
Fix PCF8574 mode2 init using scripts (#18934)
This commit is contained in:
parent
58e13edea0
commit
1e3b41dd2d
|
@ -12510,7 +12510,8 @@ bool Xdrv10(uint32_t function)
|
|||
|
||||
switch (function) {
|
||||
//case FUNC_PRE_INIT:
|
||||
case FUNC_INIT:
|
||||
//case FUNC_INIT:
|
||||
case FUNC_SETUP_RING1: // We need to setup SCRIPT before call to ScriptLoadSection()
|
||||
|
||||
//bitWrite(Settings->rule_enabled, 0, 0); // >>>>>>>>>>>
|
||||
#ifndef NO_SCRIPT_STOP_ON_ERROR
|
||||
|
@ -12671,8 +12672,8 @@ bool Xdrv10(uint32_t function)
|
|||
|
||||
if (bitRead(Settings->rule_enabled, 0)) Init_Scripter();
|
||||
|
||||
// break;
|
||||
//case FUNC_INIT:
|
||||
break;
|
||||
case FUNC_INIT:
|
||||
if (bitRead(Settings->rule_enabled, 0)) {
|
||||
set_callbacks();
|
||||
Run_Scripter1(">B\n", 3, 0);
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
*
|
||||
* Prepare a template to be loaded either by:
|
||||
* - a rule like: rule3 on file#pcf8574.dat do {"NAME":"PCF8574 A=Ri8-1, B=B1-8","GPIO":[263,262,261,260,259,258,257,256,32,33,34,35,36,37,38,39]} endon
|
||||
* - a script like: -y{"NAME":"PCF8574 A=Ri8-1, B=B1-8","GPIO":[263,262,261,260,259,258,257,256,32,33,34,35,36,37,38,39]}
|
||||
* - a script like: >y{"NAME":"PCF8574 A=Ri8-1, B=B1-8","GPIO":[263,262,261,260,259,258,257,256,32,33,34,35,36,37,38,39]}#
|
||||
* - file called pcf8574.dat with contents: {"NAME":"PCF8574 A=Ri8-1, B=B1-8","GPIO":[263,262,261,260,259,258,257,256,32,33,34,35,36,37,38,39]}
|
||||
*
|
||||
* Inverted relays and buttons Ri8 Ri7 Ri6 Ri5 Ri4 Ri3 Ri2 Ri1 B1 B2 B3 B4 B5 B6 B7 B8
|
||||
|
|
Loading…
Reference in New Issue