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

hexdrive.py function to report version - used by main app, EEPROM erase. #46

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

Robotmad
Copy link
Contributor

hexpansion now exposes function to return its app version.

main app attempts to call the new hexpansion function to check if hexpansion app needs to be upgraded. If it can't be called or returns version that isn't the current one (not strict about being higher or just that it isn't the same) then offers upgrade.

When hexpansions are inserted it takes time for the scheduler to be aware of their app (as it is sent from hexpansion app to scheduler via events) - so we have to be prepared that it can't be found immediately, yet still have a timeout of how long we will wait. If app can't be found then also assume hexpansion app needs to be updated.

use of settings: use same convention as EEH app "appname"."setting". Refactor to have defaults and dynamically build full setting name for use in get setttings.

Differentiate bad error message (red) from good message (green) requesting reboop after successful upgrade.

secret feature (enabled by setting "badgebot.erase_eeprom") to enable eeprom on hexpansion in specified slot to be erased (useful to being able to reuse hexpansion to test initialisation and upgrade features.)

rename ports_with_upgraded_hexdrive to ports_with_latest_hexdrive as clearer language as hexdrive may have started with the latest version rather than be upgraded.

@Robotmad Robotmad linked an issue Jun 20, 2024 that may be closed by this pull request
@DamTobor DamTobor self-requested a review June 20, 2024 22:23
@Robotmad Robotmad merged commit 12249a0 into main Jun 21, 2024
1 check passed
@Robotmad Robotmad deleted the 45-hexdrive-app-version-identification branch June 21, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hexdrive App version identification
3 participants