Update interrogator() in allcall.py (#86)
This commit is contained in:
parent
436e9ce2c8
commit
d16484bf72
@ -42,8 +42,15 @@ def interrogator(msg):
|
|||||||
int: interrogator identifier code
|
int: interrogator identifier code
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# simply the CRC reminder
|
# the CRC remainder contains the CL and IC field. top three bits are CL field and last four bits are IC field.
|
||||||
return common.crc(msg)
|
remainder = common.crc(msg)
|
||||||
|
if remainder > 79:
|
||||||
|
IC = "corrupt IC"
|
||||||
|
elif remainder < 16:
|
||||||
|
IC="II"+str(remainder)
|
||||||
|
else:
|
||||||
|
IC="SI"+str(remainder-16)
|
||||||
|
return IC
|
||||||
|
|
||||||
|
|
||||||
@_checkdf
|
@_checkdf
|
||||||
|
Loading…
Reference in New Issue
Block a user