mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 10:16:30 +00:00
Prep support for SO114 until SO145
This commit is contained in:
parent
18bf102e4f
commit
f2aa0607b4
@ -158,6 +158,15 @@ a_setoption = [[
|
|||||||
"","","","",
|
"","","","",
|
||||||
"","","","",
|
"","","","",
|
||||||
"","","",""
|
"","","",""
|
||||||
|
],[
|
||||||
|
"","","","",
|
||||||
|
"","","","",
|
||||||
|
"","","","",
|
||||||
|
"","","","",
|
||||||
|
"","","","",
|
||||||
|
"","","","",
|
||||||
|
"","","","",
|
||||||
|
"","","",""
|
||||||
]]
|
]]
|
||||||
|
|
||||||
a_features = [[
|
a_features = [[
|
||||||
@ -270,13 +279,14 @@ def StartDecode():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
elif len(register) == 36: # 6.1.1.14: array consists of SetOptions 0..31, SetOptions 32..49, and SetOptions 50..81
|
elif len(register) == 36: # 6.1.1.14: array consists of SetOptions 0..31, SetOptions 32..49, and SetOptions 50..81
|
||||||
|
# 8.4.0.2: adds another SetOptions 114..145
|
||||||
split_register = [int(register[opt*2:opt*2+2],16) for opt in range(18)] # split register into 18 values
|
split_register = [int(register[opt*2:opt*2+2],16) for opt in range(18)] # split register into 18 values
|
||||||
|
|
||||||
for opt_idx, option in enumerate(opt_group):
|
for opt_idx, option in enumerate(opt_group):
|
||||||
options.append(str("{0:2d} ({1:3d}) {2}".format(i, split_register[opt_idx], option)))
|
options.append(str("{0:2d} ({1:3d}) {2}".format(i, split_register[opt_idx], option)))
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
if r in (0, 2, 3): #registers 1 and 3 hold binary values
|
if r in (0, 2, 3, 4): #registers 1 and 4 hold binary values
|
||||||
for opt_idx, option in enumerate(opt_group):
|
for opt_idx, option in enumerate(opt_group):
|
||||||
i_register = int(register,16)
|
i_register = int(register,16)
|
||||||
state = (i_register >> opt_idx) & 1
|
state = (i_register >> opt_idx) & 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user