Skip to content

Commit 5e9cda7

Browse files
authored
Fix UI Readme and improve target selection (#168)
* Fix UI Readme * Force targets to be lower case
1 parent 6026f5f commit 5e9cda7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Diff for: tools/config_editor/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ If you are using MacOS and the application looks weird, check [this guide from T
2626

2727
These command line arguments can be used to pre-configure the application:
2828

29+
```
2930
Command line arguments:
3031
-t, --target <target> Comma-separated list of targets to be compiled.
3132
Choose from: all, esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2. Default: all except esp32c2
@@ -36,3 +37,4 @@ Command line arguments:
3637
-i, --idf-commit <commit> Commit of the ESP-IDF repository to be used. Default: set by the build script
3738
-D, --debug-level <level> Debug level to be set to ESP-IDF.
3839
Choose from: default, none, error, warning, info, debug, verbose. Default: default
40+
```

Diff for: tools/config_editor/app.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,13 @@ def main() -> None:
231231

232232
args = parser.parse_args()
233233

234-
# Set the options in the app
235-
if args.target.strip() == "default":
234+
# Force targets to be lower case
235+
args.target = args.target.lower()
236+
237+
# Check if the target is valid
238+
if args.target == "default":
236239
args.target = ",".join([x[0] for x in target_choices if x[1]])
237-
elif args.target.strip() == "all":
240+
elif args.target == "all":
238241
args.target = ",".join([x[0] for x in target_choices])
239242

240243
app.supported_targets = [x[0] for x in target_choices]
@@ -246,6 +249,7 @@ def main() -> None:
246249

247250
app.setting_target = args.target
248251

252+
# Check if the Arduino path is valid
249253
if args.copy:
250254
if check_arduino_path(args.arduino_path):
251255
app.setting_enable_copy = True
@@ -258,6 +262,7 @@ def main() -> None:
258262
else:
259263
app.setting_enable_copy = False
260264

265+
# Set the other options
261266
app.setting_arduino_path = os.path.abspath(args.arduino_path)
262267
app.setting_arduino_branch = args.arduino_branch
263268
app.setting_idf_branch = args.idf_branch

0 commit comments

Comments
 (0)