Skip to content

Fix UI Readme and improve target selection #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/config_editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ If you are using MacOS and the application looks weird, check [this guide from T

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

```
Command line arguments:
-t, --target <target> Comma-separated list of targets to be compiled.
Choose from: all, esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2. Default: all except esp32c2
Expand All @@ -36,3 +37,4 @@ Command line arguments:
-i, --idf-commit <commit> Commit of the ESP-IDF repository to be used. Default: set by the build script
-D, --debug-level <level> Debug level to be set to ESP-IDF.
Choose from: default, none, error, warning, info, debug, verbose. Default: default
```
11 changes: 8 additions & 3 deletions tools/config_editor/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,13 @@ def main() -> None:

args = parser.parse_args()

# Set the options in the app
if args.target.strip() == "default":
# Force targets to be lower case
args.target = args.target.lower()

# Check if the target is valid
if args.target == "default":
args.target = ",".join([x[0] for x in target_choices if x[1]])
elif args.target.strip() == "all":
elif args.target == "all":
args.target = ",".join([x[0] for x in target_choices])

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

app.setting_target = args.target

# Check if the Arduino path is valid
if args.copy:
if check_arduino_path(args.arduino_path):
app.setting_enable_copy = True
Expand All @@ -258,6 +262,7 @@ def main() -> None:
else:
app.setting_enable_copy = False

# Set the other options
app.setting_arduino_path = os.path.abspath(args.arduino_path)
app.setting_arduino_branch = args.arduino_branch
app.setting_idf_branch = args.idf_branch
Expand Down