tmtc improvements #62

Merged
muellerr merged 14 commits from meier/ploc into develop 2022-05-02 12:36:33 +02:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit ad53f3e9bb - Show all commits

View File

@ -32,6 +32,8 @@ MANUAL_INPUT = "1"
update_file_dict = { update_file_dict = {
MANUAL_INPUT: ["manual input", ""], MANUAL_INPUT: ["manual input", ""],
"2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"], "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 = { 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: def pack_set_adc_threshold_cmd(object_id: bytearray) -> bytearray:
threshold = int(input("Specify threshold:")) threshold = int(input("Specify threshold: "))
command = bytearray() command = bytearray()
command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_THRESHOLD) command = object_id + struct.pack("!I", SupvActionIds.SET_ADC_THRESHOLD)
command = command + struct.pack("!I", 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: def pack_set_gpio_cmd(object_id: bytearray) -> bytearray:
port = int(input("Specify port: ")) port = int(input("Specify port : 0x"), 16)
pin = int(input("Specify pin: ")) pin = int(input("Specify pin: 0x"), 16)
val = int(input("Specify val: ")) val = int(input("Specify val: 0x"), 16)
command = bytearray()
command = object_id + struct.pack("!I", SupvActionIds.SET_GPIO) command = object_id + struct.pack("!I", SupvActionIds.SET_GPIO)
command = command + struct.pack("!B", port) command = command + struct.pack("!B", port)
command = command + struct.pack("!B", pin) 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: def pack_read_gpio_cmd(object_id: bytearray) -> bytearray:
port = int(input("Specify port: ")) port = int(input("Specify port: 0x"), 16)
pin = int(input("Specify pin: ")) pin = int(input("Specify pin: 0x"), 16)
command = bytearray()
command = object_id + struct.pack("!I", SupvActionIds.READ_GPIO) command = object_id + struct.pack("!I", SupvActionIds.READ_GPIO)
command = command + struct.pack("!B", port) command = command + struct.pack("!B", port)
command = command + struct.pack("!B", pin) command = command + struct.pack("!B", pin)

@ -1 +1 @@
Subproject commit 5d6db96ffccab2fb64670875bab81fdd1ddd3816 Subproject commit 48b6b8396eb3ea5ec4527ccb96f5909a29cd95f6