add set ID for RTD
This commit is contained in:
parent
c99a0701d2
commit
d520a0e2f2
@ -934,7 +934,7 @@ def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
|||||||
alt = [
|
alt = [
|
||||||
f"{val:8.3f}"
|
f"{val:8.3f}"
|
||||||
for val in struct.unpack(
|
for val in struct.unpack(
|
||||||
fmt_scalar, hk_data[current_idx: current_idx + inc_len_scalar]
|
fmt_scalar, hk_data[current_idx : current_idx + inc_len_scalar]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
current_idx += inc_len_scalar
|
current_idx += inc_len_scalar
|
||||||
@ -985,7 +985,11 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
current_idx = 0
|
current_idx = 0
|
||||||
quat = struct.unpack(fmt_quat, hk_data[current_idx : current_idx + inc_len_quat])
|
quat = struct.unpack(fmt_quat, hk_data[current_idx : current_idx + inc_len_quat])
|
||||||
current_idx += inc_len_quat
|
current_idx += inc_len_quat
|
||||||
rate = struct.unpack(fmt_vec, hk_data[current_idx : current_idx + inc_len_vec])*180/math.pi
|
rate = (
|
||||||
|
struct.unpack(fmt_vec, hk_data[current_idx : current_idx + inc_len_vec])
|
||||||
|
* 180
|
||||||
|
/ math.pi
|
||||||
|
)
|
||||||
current_idx += inc_len_vec
|
current_idx += inc_len_vec
|
||||||
status = struct.unpack(fmt_sts, hk_data[current_idx : current_idx + inc_len_sts])[0]
|
status = struct.unpack(fmt_sts, hk_data[current_idx : current_idx + inc_len_sts])[0]
|
||||||
current_idx += inc_len_sts
|
current_idx += inc_len_sts
|
||||||
|
@ -284,7 +284,9 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
sid = make_sid(object_id=CORE_CONTROLLER_ID, set_id=SetId.HK)
|
sid = make_sid(object_id=CORE_CONTROLLER_ID, set_id=SetId.HK)
|
||||||
q.add_pus_tc(generate_one_hk_command(sid))
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
else:
|
else:
|
||||||
_LOGGER.warning(f"Unknown operation code {op_code} for core controller commands")
|
_LOGGER.warning(
|
||||||
|
f"Unknown operation code {op_code} for core controller commands"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def reset_specific_boot_counter(q: DefaultPusQueueHelper, chip: int, copy: int):
|
def reset_specific_boot_counter(q: DefaultPusQueueHelper, chip: int, copy: int):
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import enum
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
@ -36,6 +37,10 @@ class CommandId:
|
|||||||
WRITE_CONFIG = 6
|
WRITE_CONFIG = 6
|
||||||
|
|
||||||
|
|
||||||
|
class SetId(enum.IntEnum):
|
||||||
|
TEMPERATURE = 1
|
||||||
|
|
||||||
|
|
||||||
class OpCode:
|
class OpCode:
|
||||||
ON = ["0", "on"]
|
ON = ["0", "on"]
|
||||||
OFF = ["1", "off"]
|
OFF = ["1", "off"]
|
||||||
|
Loading…
Reference in New Issue
Block a user