Skip to content

Commit b61b73c

Browse files
authored
Run blue and run yellow in tbots.py (#3823)
* done * use map instead
1 parent 636760c commit b61b73c

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/cli/cli_params.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ class DebugBinary(str, Enum):
166166
title="Diagnostics",
167167
description="Run Thunderscope in diagnostics mode against real robots",
168168
),
169+
questionary.Choice(
170+
title="Run blue",
171+
description="run_blue",
172+
),
173+
questionary.Choice(
174+
title="Run yellow",
175+
description="run_yellow",
176+
),
169177
]
170178

171179
# Thunderscope simulator "Options:" checkbox.
@@ -236,3 +244,10 @@ class DebugBinary(str, Enum):
236244
description="Flash the motor controller firmware",
237245
),
238246
]
247+
248+
249+
THUNDERSCOPE_OPTIONS_MAP = {
250+
"Diagnostics": "run_diagnostics",
251+
"Run blue": "run_blue",
252+
"Run yellow": "run_yellow",
253+
}

src/tbots.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
INTERACTIVE_STYLE,
2020
LAUNCH_MODE_CHOICES,
2121
PLAYBOOK_CHOICES,
22+
THUNDERSCOPE_OPTIONS_MAP,
2223
THUNDERSCOPE_SIMULATOR_OPTION_CHOICES,
2324
ActionArgument,
2425
AnsiblePlaybook,
@@ -384,7 +385,9 @@ def start_interactive_cli():
384385
iface = questionary.text(
385386
"Network interface?", style=INTERACTIVE_STYLE
386387
).unsafe_ask()
387-
extra_args.extend(["--run_diagnostics", "--interface", iface])
388+
extra_args.extend(
389+
[f"--{THUNDERSCOPE_OPTIONS_MAP[launch]}", "--interface", iface]
390+
)
388391

389392
case "Test":
390393
config.action = ActionArgument.test

0 commit comments

Comments
 (0)