add prompts for custom file name
This commit is contained in:
parent
9edbdf1a8d
commit
268c9e3f0b
@ -343,7 +343,11 @@ def determine_chip_and_copy() -> (int, int):
|
|||||||
|
|
||||||
def pack_obsw_update_cmd(action_id: int) -> PusTelecommand:
|
def pack_obsw_update_cmd(action_id: int) -> PusTelecommand:
|
||||||
chip, copy = determine_chip_and_copy()
|
chip, copy = determine_chip_and_copy()
|
||||||
user_data = bytes([chip, copy])
|
user_data = bytearray([chip, copy])
|
||||||
|
custom_file_name = input("Use custom filename [y/n] ?: ")
|
||||||
|
if custom_file_name.lower() in ["y", "yes", "1"]:
|
||||||
|
custom_file_name = input("Specify custom filename: ")
|
||||||
|
user_data.extend(custom_file_name.encode())
|
||||||
return create_action_cmd(
|
return create_action_cmd(
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=action_id, user_data=user_data
|
object_id=CORE_CONTROLLER_ID, action_id=action_id, user_data=user_data
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user