mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-20 01:00:07 -07:00
decode_monitor_binary bytestring index fix (by NorDroN)
This commit is contained in:
parent
5a5e8bf47d
commit
93151962e9
5
wideq.py
5
wideq.py
@ -695,11 +695,10 @@ class ModelInfo(object):
|
||||
|
||||
decoded = {}
|
||||
for item in self.data['Monitoring']['protocol']:
|
||||
key = item['value']
|
||||
value = 0
|
||||
for i in range(item['startByte'], item['startByte'] + item['length']):
|
||||
value = value * 256 + data[i - 1]
|
||||
decoded[key] = str(value)
|
||||
value = value * 256 + data[i]
|
||||
decoded[item['value']] = str(value)
|
||||
return decoded
|
||||
|
||||
def decode_monitor_json(self, data):
|
||||
|
Loading…
x
Reference in New Issue
Block a user