Index: leahi_dialin/common/msg_defs.py =================================================================== diff -u -r41de945f9c773e54e965e80d9e46def828beb732 -r6d104d3185ac3ed7c18c97ecdc13fd59bf53a8d1 --- leahi_dialin/common/msg_defs.py (.../msg_defs.py) (revision 41de945f9c773e54e965e80d9e46def828beb732) +++ leahi_dialin/common/msg_defs.py (.../msg_defs.py) (revision 6d104d3185ac3ed7c18c97ecdc13fd59bf53a8d1) @@ -14,10 +14,10 @@ # ############################################################################ from enum import unique -from ..utils.base import DialinEnum +from ..utils.enums import DialinEnum from .msg_ids import MsgIds - +MSG_HEADER_SIZE = 6 # Hardcoded for now to avoid cyclic import issue. See protocols.CAN.DenaliMessage class ACK_NOT_REQUIRED = [ ] @@ -75,9 +75,10 @@ REQUEST_REJECT_REASON_TREATMENT_CANNOT_BE_RESUMED = 47 RequestRejectReasons._str_list = {} + class MsgFieldPositions: # Generic response msg field byte positions (where 32-bit data fields are used) - START_POS_FIELD_1 = 6 # Hardcoded for now to avoid cyclic import issue. See protocols.CAN.DenaliMessage class + START_POS_FIELD_1 = MSG_HEADER_SIZE # Hardcoded for now to avoid cyclic import issue. See protocols.CAN.DenaliMessage class END_POS_FIELD_1 = START_POS_FIELD_1 + 4 START_POS_FIELD_2 = END_POS_FIELD_1 END_POS_FIELD_2 = START_POS_FIELD_2 + 4 @@ -139,7 +140,7 @@ class MsgFieldPositionsFWVersions: # UI version message field positions - START_POS_MAJOR = 6 # Hardcoded for now to avoid cyclic import issue. See protocols.CAN.DenaliMessage class + START_POS_MAJOR = MSG_HEADER_SIZE # Hardcoded for now to avoid cyclic import issue. See protocols.CAN.DenaliMessage class END_POS_MAJOR = START_POS_MAJOR + 1 START_POS_MINOR = END_POS_MAJOR END_POS_MINOR = START_POS_MINOR + 1