Fix deviceclass calcuation
This commit is contained in:
@@ -21,7 +21,7 @@ def parse_60928(buf, device):
|
|||||||
device.instlower = buf[4] & 0x07
|
device.instlower = buf[4] & 0x07
|
||||||
device.instupper = buf[4] >> 3
|
device.instupper = buf[4] >> 3
|
||||||
device.devicefunction = buf[5]
|
device.devicefunction = buf[5]
|
||||||
device.deviceclass = (buf[6] & 0x7f) >> 1
|
device.deviceclass = (buf[6] >> 1) & 0x7f
|
||||||
device.industrygroup = (buf[7] >> 4) & 0x07 # 3bit
|
device.industrygroup = (buf[7] >> 4) & 0x07 # 3bit
|
||||||
device.sysinstance = buf[7] & 0x0f # 4bit
|
device.sysinstance = buf[7] & 0x0f # 4bit
|
||||||
return struct.unpack_from('>Q', buf, 0)[0]
|
return struct.unpack_from('>Q', buf, 0)[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user