Skip to content

Commit

Permalink
Make CAN reset command able to take both board type and inst ID
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBrave committed Feb 2, 2025
1 parent c6154ab commit 85207f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion parsley/message_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'GENERAL_CMD': [BOARD_TYPE_ID, TIMESTAMP_3, Enum('command', 8, mt.gen_cmd)],
'ACTUATOR_CMD': [BOARD_TYPE_ID, TIMESTAMP_3, Enum('actuator', 8, mt.actuator_id), Enum('req_state', 8, mt.actuator_states)],
'ALT_ARM_CMD': [BOARD_TYPE_ID, TIMESTAMP_3, Enum('state', 4, mt.arm_states), Numeric('altimeter', 4)],
'RESET_CMD': [BOARD_TYPE_ID, TIMESTAMP_3, Enum('reset_board_id', 8, mt.board_type_id)],
'RESET_CMD': [BOARD_TYPE_ID, TIMESTAMP_3, Enum('reset_board_type_id', 8, mt.board_type_id), Enum('reset_board_inst_id', 8, mt.board_inst_id)],

'DEBUG_MSG': [BOARD_TYPE_ID, TIMESTAMP_3, Numeric('level', 4), Numeric('line', 12), ASCII('data', 24)],
'DEBUG_PRINTF': [BOARD_TYPE_ID, ASCII('string', 64)],
Expand Down
8 changes: 6 additions & 2 deletions parsley/message_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,19 @@
board_inst_id = {
'ANY': 0x00,
'GENERIC': 0x01,
'CAN': 0x02,
'ROCKET': 0x02,
'PAYLOAD': 0x03,
'INJ_A': 0x04,
'INJ_B': 0x05,
'VENT_A': 0x06,
'VENT_B': 0x07,
'VENT_C': 0x08,
'VENT_D': 0x09,
'RECOVERY': 0x0A
'RECOVERY': 0x0A,
'1': 0x0B,
'2': 0x0C,
'3': 0x0D,
'4': 0x0E
}

gen_cmd = {
Expand Down

0 comments on commit 85207f8

Please sign in to comment.