From 28983d387b82578a73fbfe052cb53dec1910d021 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 21 Apr 2022 16:40:12 +0200 Subject: [PATCH 1/3] minor tmtccmd fix --- tmtccmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtccmd b/tmtccmd index 48b6b83..5d6db96 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit 48b6b8396eb3ea5ec4527ccb96f5909a29cd95f6 +Subproject commit 5d6db96ffccab2fb64670875bab81fdd1ddd3816 From 6d80ad74769200e896bbc6aa546b3ca132fb3135 Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L15 Date: Fri, 22 Apr 2022 14:21:08 +0200 Subject: [PATCH 2/3] adc channel input in hex --- pus_tc/devs/ploc_supervisor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pus_tc/devs/ploc_supervisor.py b/pus_tc/devs/ploc_supervisor.py index 348c92d..b074d0b 100644 --- a/pus_tc/devs/ploc_supervisor.py +++ b/pus_tc/devs/ploc_supervisor.py @@ -626,7 +626,7 @@ def pack_set_adc_enabled_channels_cmd(object_id: bytearray) -> bytearray: @brief This function packs the command to enable or disable channels of the ADC. @param object_id The object id of the PLOC supervisor handler. """ - ch = int(input("Specify ch:")) + ch = int(input("Specify ch: 0x"), 16) command = bytearray() command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_ENABLED_CHANNELS) command = command + struct.pack("!H", ch) From ad53f3e9bb526bf030905d24781af57ae6ac5b01 Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L15 Date: Fri, 22 Apr 2022 18:02:49 +0200 Subject: [PATCH 3/3] improved supervsior commanding --- pus_tc/devs/ploc_supervisor.py | 16 ++++++++-------- tmtccmd | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pus_tc/devs/ploc_supervisor.py b/pus_tc/devs/ploc_supervisor.py index 4a2f8cf..9038928 100644 --- a/pus_tc/devs/ploc_supervisor.py +++ b/pus_tc/devs/ploc_supervisor.py @@ -32,6 +32,8 @@ MANUAL_INPUT = "1" update_file_dict = { MANUAL_INPUT: ["manual input", ""], "2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"], + "3": ["/mnt/sd0/ploc/supervisor/update-large.bin", "/mnt/sd0/ploc/supervisor/update-large.bin"], + "4": ["/mnt/sd0/ploc/supervisor/update-small.bin", "/mnt/sd0/ploc/supervisor/update-small.bin"], } event_buffer_path_dict = { @@ -649,7 +651,7 @@ def pack_set_adc_window_and_stride_cmd(object_id: bytearray) -> bytearray: def pack_set_adc_threshold_cmd(object_id: bytearray) -> bytearray: - threshold = int(input("Specify threshold:")) + threshold = int(input("Specify threshold: ")) command = bytearray() command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_THRESHOLD) command = command + struct.pack("!I", threshold) @@ -767,10 +769,9 @@ def get_debug_verbosity() -> int: def pack_set_gpio_cmd(object_id: bytearray) -> bytearray: - port = int(input("Specify port: ")) - pin = int(input("Specify pin: ")) - val = int(input("Specify val: ")) - command = bytearray() + port = int(input("Specify port : 0x"), 16) + pin = int(input("Specify pin: 0x"), 16) + val = int(input("Specify val: 0x"), 16) command = object_id + struct.pack("!I", SupvActionIds.SET_GPIO) command = command + struct.pack("!B", port) command = command + struct.pack("!B", pin) @@ -779,9 +780,8 @@ def pack_set_gpio_cmd(object_id: bytearray) -> bytearray: def pack_read_gpio_cmd(object_id: bytearray) -> bytearray: - port = int(input("Specify port: ")) - pin = int(input("Specify pin: ")) - command = bytearray() + port = int(input("Specify port: 0x"), 16) + pin = int(input("Specify pin: 0x"), 16) command = object_id + struct.pack("!I", SupvActionIds.READ_GPIO) command = command + struct.pack("!B", port) command = command + struct.pack("!B", pin) diff --git a/tmtccmd b/tmtccmd index 5d6db96..48b6b83 160000 --- a/tmtccmd +++ b/tmtccmd @@ -1 +1 @@ -Subproject commit 5d6db96ffccab2fb64670875bab81fdd1ddd3816 +Subproject commit 48b6b8396eb3ea5ec4527ccb96f5909a29cd95f6