examples/lvgldemo: Select default demo#1494
Merged
xiaoxiang781216 merged 1 commit intoapache:masterfrom Jan 16, 2023
Merged
Conversation
The LVGL Example App `lvgldemo` currently requires 1 argument: the name of the demo to show. ```bash lvgldemo widgets ``` In this PR, we propose to make the argument optional if there is only one demo configured. This will enable PINE64 PinePhone to boot straight into `lvgldemo` and auto-start the LVGL App, without entering any `nsh` commands. ### Modified Files `examples/lvgldemo/lvgldemo.c`: If no arguments are specified and only 1 demo exists, select the demo
pkarashchenko
approved these changes
Jan 16, 2023
xiaoxiang781216
approved these changes
Jan 16, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The LVGL Example App
lvgldemocurrently requires 1 argument: the name of the demo to show.In this PR, we propose to make the argument optional if there is only one demo configured. This will enable PINE64 PinePhone to boot straight into
lvgldemoand auto-start the LVGL App, without entering anynshcommands.Modified Files
examples/lvgldemo/lvgldemo.c: If no arguments are specified and only 1 demo exists, select the demoImpact
With this PR,
lvgldemowill no longer require an argument if there is only one demo configured. So this command:Is equivalent to
lvgldemo widgetsif there is only one demowidgetsconfigured.If there is more than one demo configured, or if an argument is provided,
lvgldemowill work the same way as before.Testing
We successfully tested
lvgldemowith a Single Configured Demo:(See the Test Log)
And we tested
lvgldemowith Multiple Configured Demos:(See the Test Log)
Also we verified that PinePhone boots successfully to the
lvgldemo widgetsdemo automatically, without entering anynshcommands.(Demo Video)
(Another Demo)
We configured the PinePhone build as follows:
RTOS Features > Tasks and Scheduling
Set "Application entry point" to
lvgldemo_main(INIT_ENTRYPOINT)
Set "Application entry name" to
lvgldemo_main(INIT_ENTRYNAME)
Application Configuration > NSH Library
Disable "Have architecture-specific initialization"
(NSH_ARCHINIT)