added hardcoded update test mode

This commit is contained in:
Robin Müller 2022-11-17 17:34:46 +01:00
parent 066adee13a
commit 2cdc210541
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -36,9 +36,11 @@ latchup_id_dict = {
"6": "SAFECOTS", "6": "SAFECOTS",
} }
HARDCODED = "0"
MANUAL_INPUT = "1" MANUAL_INPUT = "1"
update_file_dict = { update_file_dict = {
HARDCODED: ["hardcoded", ""],
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": [ "3": [
@ -684,7 +686,9 @@ def get_update_file() -> str:
LOGGER.info("Specify update file ") LOGGER.info("Specify update file ")
input_helper = InputHelper(update_file_dict) input_helper = InputHelper(update_file_dict)
key = input_helper.get_key() key = input_helper.get_key()
if key == MANUAL_INPUT: if key == HARDCODED:
file = "/home/rmueller/EIVE/eive-obsw/tmtc/filetest"
elif key == MANUAL_INPUT:
file = input("Ploc Supervisor: Specify absolute name of update file: ") file = input("Ploc Supervisor: Specify absolute name of update file: ")
else: else:
file = update_file_dict[key][1] file = update_file_dict[key][1]