Skip to content
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

Add config option to force module to always boot into the menu #361

Merged
merged 4 commits into from Apr 11, 2024

Conversation

chrisib
Copy link
Collaborator

@chrisib chrisib commented Mar 24, 2024

Some users may find it desirable to have the module always boot into the menu, rather than automatically re-launching the last-used program, and then needing to reset the module to get back to the menu.

This adds a new europi_config field called MENU_AFTER_POWER_ON that, when set, automatically clears the BootloaderMenu's saved-state upon launching a EuroPiScript. This will force the module back into the menu state on the next power-up.

The new field defaults to False, so the default behaviour is preserved; this just adds the option to force the menu to start if desired.

… module to always boot into the menu instead of re-launching the last-used program
@chrisib chrisib added firmware Software related issue new script feature Feature additions or improvements to a contrib script labels Mar 24, 2024
Copy link
Collaborator

@roryjamesallen roryjamesallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this all works on a module then it lookg good to me! Really useful change that I'll definitely be using for the module I use for testing

@chrisib
Copy link
Collaborator Author

chrisib commented Mar 25, 2024

If this all works on a module then it looking good to me! Really useful change that I'll definitely be using for the module I use for testing

I've got my one module set up to use this (also finding it helpful for development & testing!), but getting confirmation from 1-2 other users would probably be helpful just to make sure.

@chrisib
Copy link
Collaborator Author

chrisib commented Mar 25, 2024

Question: should we also automatically go back to the menu if the last-run program was the calibration tool?

I know we've had a few support questions (including from me!) where after building & calibrating the module, you power-cycle it, and it goes back to calibration instead of the menu. Given that calibration is a "once-and-done" script, as opposed to something users are likely going to want to run every time their module powers on, I can see a good argument in favour of making that change.

@roryjamesallen
Copy link
Collaborator

Changes look good to me now.

Question: should we also automatically go back to the menu if the last-run program was the calibration tool?

I think that's a good idea, there's no situation where someone would want to recalibrate immediately after calibrating other than if they messed up the calibration, in which case they can just re-enter the mode.

@chrisib
Copy link
Collaborator Author

chrisib commented Mar 25, 2024

Added the case for the calibration tool. I see there's also a BootloaderMode -- should that be handled the same way as Calibration?

@roryjamesallen
Copy link
Collaborator

Added the case for the calibration tool. I see there's also a BootloaderMode -- should that be handled the same way as Calibration?

Nice, the bootloader_mode script already removes the save state

Copy link
Collaborator

@roryjamesallen roryjamesallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally approved from my work account, but this all looks great now

@roryjamesallen roryjamesallen merged commit 5c79761 into Allen-Synthesis:main Apr 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firmware Software related issue new script feature Feature additions or improvements to a contrib script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants