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
|
||||
|
||||
"""
|
||||
# simply the CRC reminder
|
||||
return common.crc(msg)
|
||||
# the CRC remainder contains the CL and IC field. top three bits are CL field and last four bits are IC field.
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user