added missing act cmd #295
@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Fixed
|
||||
|
||||
- GNSS commands working again (again).
|
||||
|
||||
## Added
|
||||
|
||||
- Added handling for new clock events.
|
||||
|
@ -227,7 +227,7 @@ def handle_acs_procedure(queue_helper: DefaultPusQueueHelper, cmd_path_list: Lis
|
||||
object_id=RW4_ID, rw_idx=4, q=queue_helper, cmd_str=cmd_path_list[2]
|
||||
)
|
||||
|
||||
if cmd_path_list[0] == "gnss_devs":
|
||||
if cmd_path_list[0] == "gnss_ctrl":
|
||||
return pack_gps_command(
|
||||
object_id=oids.GPS_CONTROLLER, q=queue_helper, cmd_str=cmd_path_list[1]
|
||||
)
|
||||
|
@ -23,7 +23,11 @@ class GpsInfo:
|
||||
MAX_SATELLITES = 30
|
||||
|
||||
|
||||
class GnssChip(enum.IntEnum):
|
||||
class ActIds:
|
||||
RESET_GNSS = 5
|
||||
|
||||
|
||||
class AcsBoardSides(enum.IntEnum):
|
||||
A_SIDE = 0
|
||||
B_SIDE = 1
|
||||
|
||||
@ -37,7 +41,7 @@ class OpCode:
|
||||
REQ_SKYVIEW_HK = "skyview_hk_request"
|
||||
ENABLE_SKYVIEW_HK = "skyview_hk_enable"
|
||||
DISABLE_SKYVIEW_HK = "skyview_hk_disable"
|
||||
RESET_GNSS = "reset"
|
||||
RESET_GNSS = "reset_gnss"
|
||||
|
||||
|
||||
class Info:
|
||||
@ -63,7 +67,7 @@ def create_gnss_node() -> CmdTreeNode:
|
||||
]
|
||||
info_strs = [getattr(Info, key) for key in dir(OpCode) if not key.startswith("__")]
|
||||
combined_dict = dict(zip(op_code_strs, info_strs))
|
||||
node = CmdTreeNode("gnss_devs", "GNSS Controller", hide_children_for_print=True)
|
||||
node = CmdTreeNode("gnss_ctrl", "GNSS Ctrl", hide_children_for_print=True)
|
||||
for op_code, info in combined_dict.items():
|
||||
node.add_child(CmdTreeNode(op_code, info))
|
||||
return node
|
||||
@ -73,16 +77,17 @@ def pack_gps_command( # noqa: C901
|
||||
object_id: bytes, q: DefaultPusQueueHelper, cmd_str: str
|
||||
): # noqa: C901:
|
||||
if cmd_str == OpCode.RESET_GNSS:
|
||||
for val in GnssChip:
|
||||
for val in AcsBoardSides:
|
||||
print("{:<2}: {:<20}".format(val, val.name))
|
||||
chip: str = ""
|
||||
while chip not in ["0", "1"]:
|
||||
chip = input("Please specify which chip to reset: ")
|
||||
q.add_log_cmd(f"gps: {Info.DISABLE_CORE_HK}")
|
||||
board_side = int(input("Select Board Side \n" ""))
|
||||
q.add_log_cmd(f"GPS: {Info.RESET_GNSS}")
|
||||
q.add_pus_tc(
|
||||
create_action_cmd(object_id=object_id, action_id=5, user_data=chip.encode())
|
||||
create_action_cmd(
|
||||
object_id=object_id,
|
||||
action_id=ActIds.RESET_GNSS,
|
||||
user_data=bytearray([board_side]),
|
||||
)
|
||||
)
|
||||
_LOGGER.warning("Reset pin handling needs to be re-implemented")
|
||||
if cmd_str == OpCode.ENABLE_CORE_HK:
|
||||
interval = float(input("Please specify interval in floating point seconds: "))
|
||||
if interval <= 0:
|
||||
|
Loading…
Reference in New Issue
Block a user