fixes in procedures and hk handling

This commit is contained in:
2022-06-03 18:04:59 +02:00
parent ae0217066b
commit 58ed46e110
4 changed files with 35 additions and 28 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ def handle_adis_gyro_hk(
def handle_l3g_gyro_hk(
object_id: ObjectId, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
):
if set_id == L3gGyroSetIds:
if set_id == L3gGyroSetIds.CORE_HK:
pw = PrintWrapper(printer)
fmt_str = "!ffff"
inc_len = struct.calcsize(fmt_str)
+4 -2
View File
@@ -10,8 +10,10 @@ import config.object_ids as obj_ids
def handle_mgm_hk_data(
object_id: ObjectId, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
):
if object_id in [obj_ids.MGM_0_LIS3_HANDLER_ID, obj_ids.MGM_2_LIS3_HANDLER_ID]:
if object_id.as_bytes in [obj_ids.MGM_0_LIS3_HANDLER_ID, obj_ids.MGM_2_LIS3_HANDLER_ID]:
handle_mgm_lis3_hk_data(object_id, printer, set_id, hk_data)
elif object_id.as_bytes in [obj_ids.MGM_1_RM3100_HANDLER_ID, obj_ids.MGM_3_RM3100_HANDLER_ID]:
handle_mgm_rm3100_hk_data(object_id, printer, set_id, hk_data)
pass
@@ -23,7 +25,7 @@ def handle_mgm_lis3_hk_data(
fmt_str = "!ffff"
inc_len = struct.calcsize(fmt_str)
(field_x, field_y, field_z, temp) = struct.unpack(
fmt_str, hk_data[0 : 0 + inc_len]
fmt_str, hk_data[0: 0 + inc_len]
)
pw.dlog(f"Received MGM LIS3 from object {object_id}")
pw.dlog(