mirror of
https://github.com/pommi/python-itho-wpu.git
synced 2024-12-21 18:43:27 +01:00
WIP: getconfig functionality
This commit is contained in:
parent
c9d82f67a0
commit
c8097aa265
@ -23,6 +23,7 @@ actions = {
|
|||||||
"getserial": [0x90, 0xE1],
|
"getserial": [0x90, 0xE1],
|
||||||
"getdatatype": [0xA4, 0x00],
|
"getdatatype": [0xA4, 0x00],
|
||||||
"getdatalog": [0xA4, 0x01],
|
"getdatalog": [0xA4, 0x01],
|
||||||
|
"getconfig": [0xC0, 0x30],
|
||||||
"getsetting": [0xA4, 0x10],
|
"getsetting": [0xA4, 0x10],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ actions = {
|
|||||||
"getserial": [0x90, 0xE1],
|
"getserial": [0x90, 0xE1],
|
||||||
"getdatatype": [0xA4, 0x00],
|
"getdatatype": [0xA4, 0x00],
|
||||||
"getdatalog": [0xA4, 0x01],
|
"getdatalog": [0xA4, 0x01],
|
||||||
|
"getconfig": [0xC0, 0x30],
|
||||||
"getsetting": [0xA4, 0x10],
|
"getsetting": [0xA4, 0x10],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,6 +76,8 @@ class I2CMaster:
|
|||||||
0x00,
|
0x00,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
elif action == "getconfig":
|
||||||
|
request = [0x80] + actions[action] + [0x04, 0x04, 0x00, 0x00, 0x00, 0x0C]
|
||||||
else:
|
else:
|
||||||
# 0x80 = source, 0x04 = msg_type, 0x00 = length
|
# 0x80 = source, 0x04 = msg_type, 0x00 = length
|
||||||
request = [0x80] + actions[action] + [0x04, 0x00]
|
request = [0x80] + actions[action] + [0x04, 0x00]
|
||||||
|
Loading…
Reference in New Issue
Block a user