Fix deviceclass calcuation

This commit is contained in:
2026-01-09 11:39:04 +01:00
parent c6857cd3fa
commit 1f5aac778c

View File

@@ -21,7 +21,7 @@ def parse_60928(buf, device):
device.instlower = buf[4] & 0x07
device.instupper = buf[4] >> 3
device.devicefunction = buf[5]
device.deviceclass = (buf[6] & 0x7f) >> 1
device.deviceclass = (buf[6] >> 1) & 0x7f
device.industrygroup = (buf[7] >> 4) & 0x07 # 3bit
device.sysinstance = buf[7] & 0x0f # 4bit
return struct.unpack_from('>Q', buf, 0)[0]