Merge pull request 'obj ID fixes' (#160) from heater_obj_id_fixes into main

Reviewed-on: #160
This commit is contained in:
Robin Müller 2023-03-09 16:58:36 +01:00
commit 42434cbe7e
2 changed files with 19 additions and 19 deletions

View File

@ -71,14 +71,14 @@ PLOC_MPSOC_ID = bytes([0x44, 0x33, 0x00, 0x15])
PL_PCDU_ID = bytes([0x44, 0x30, 0x00, 0x00]) PL_PCDU_ID = bytes([0x44, 0x30, 0x00, 0x00])
# Other # Other
HEATER_0_OBC_BRD = bytes([0x60, 0x00, 0x00, 0x00]) HEATER_0_PLOC_PROC_BRD = bytes([0x60, 0x00, 0x00, 0x00])
HEATER_1_PLOC_PROC_BRD = bytes([0x60, 0x00, 0x00, 0x01]) HEATER_1_PCDU_BRD = bytes([0x60, 0x00, 0x00, 0x01])
HEATER_2_ACS_BRD = bytes([0x60, 0x00, 0x00, 0x02]) HEATER_2_ACS_BRD = bytes([0x60, 0x00, 0x00, 0x02])
HEATER_3_PCDU_BRD = bytes([0x60, 0x00, 0x00, 0x03]) HEATER_3_OBC_BRD = bytes([0x60, 0x00, 0x00, 0x03])
HEATER_4_CAMERA = bytes([0x60, 0x00, 0x00, 0x04]) HEATER_4_CAMERA = bytes([0x60, 0x00, 0x00, 0x04])
HEATER_5_STR = bytes([0x60, 0x00, 0x00, 0x05]) HEATER_5_STR = bytes([0x60, 0x00, 0x00, 0x05])
HEATER_6_DRO = bytes([0x60, 0x00, 0x00, 0x06]) HEATER_6_DRO = bytes([0x60, 0x00, 0x00, 0x06])
HEATER_7_HPA = bytes([0x60, 0x00, 0x00, 0x07]) HEATER_7_SYRLINKS = bytes([0x60, 0x00, 0x00, 0x07])
# RTDs # RTDs
RTD_0_PLOC_HSPD = bytes([0x44, 0x42, 0x00, 0x16]) RTD_0_PLOC_HSPD = bytes([0x44, 0x42, 0x00, 0x16])

View File

@ -21,26 +21,26 @@ from spacepackets.ecss.tc import PusTelecommand
class Heater(enum.IntEnum): class Heater(enum.IntEnum):
HEATER_0_OBC_BRD = 0 HEATER_0_PLOC_PROC_BRD = 0
HEATER_1_PLOC_PROC_BRD = 1 HEATER_1_PCDU_BRD = 1
HEATER_2_ACS_BRD = 2 HEATER_2_ACS_BRD = 2
HEATER_3_PCDU_PDU = 3 HEATER_3_OBC_BRD = 3
HEATER_4_CAMERA = 4 HEATER_4_CAMERA = 4
HEATER_5_STR = 5 HEATER_5_STR = 5
HEATER_6_DRO = 6 HEATER_6_DRO = 6
HEATER_7_HPA = 7 HEATER_7_SYRLINKS = 7
NUMBER_OF_SWITCHES = 8 NUMBER_OF_SWITCHES = 8
HEATER_LOCATION = [ HEATER_LOCATION = [
"OBC Board",
"PLOC Processing Board", "PLOC Processing Board",
"ACS Board",
"PCDU PDU", "PCDU PDU",
"ACS Board",
"OBC Board",
"Camera", "Camera",
"Startracker", "Startracker",
"DRO", "DRO",
"HPA", "Syrlinks",
] ]
@ -135,25 +135,25 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, q: DefaultPusQueueHelpe
def heater_idx_to_obj(heater: int) -> ObjectIdU32: def heater_idx_to_obj(heater: int) -> ObjectIdU32:
from eive_tmtc.config.object_ids import ( from eive_tmtc.config.object_ids import (
HEATER_0_OBC_BRD, HEATER_0_PLOC_PROC_BRD,
HEATER_1_PLOC_PROC_BRD, HEATER_1_PCDU_BRD,
HEATER_2_ACS_BRD, HEATER_2_ACS_BRD,
HEATER_3_PCDU_BRD, HEATER_3_OBC_BRD,
HEATER_4_CAMERA, HEATER_4_CAMERA,
HEATER_5_STR, HEATER_5_STR,
HEATER_6_DRO, HEATER_6_DRO,
HEATER_7_HPA, HEATER_7_SYRLINKS,
) )
obj_id_array = [ obj_id_array = [
HEATER_0_OBC_BRD, HEATER_0_PLOC_PROC_BRD,
HEATER_1_PLOC_PROC_BRD, HEATER_1_PCDU_BRD,
HEATER_2_ACS_BRD, HEATER_2_ACS_BRD,
HEATER_3_PCDU_BRD, HEATER_3_OBC_BRD,
HEATER_4_CAMERA, HEATER_4_CAMERA,
HEATER_5_STR, HEATER_5_STR,
HEATER_6_DRO, HEATER_6_DRO,
HEATER_7_HPA, HEATER_7_SYRLINKS,
] ]
obj_dict = get_object_ids() obj_dict = get_object_ids()
obj_id_obj = obj_dict.get(obj_id_array[heater]) obj_id_obj = obj_dict.get(obj_id_array[heater])