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

Restrict runtime saves #1178

Merged
merged 3 commits into from
Nov 23, 2024

Conversation

bsstephan
Copy link
Contributor

Details in #1176, but saving to flash and host USB conflict, with the current code making the flash write safe but disabling interrupts on host USB's core for long enough to cause the connected dongle to disconnect. This makes most of the saves only occur if host USB is disabled (though they are still forced in the webconfig), and add a hotkey to force a save if you know what you're doing.

Resolves #1176

@bsstephan bsstephan force-pushed the restrict-runtime-saves branch from 81773f5 to 4e54d50 Compare October 4, 2024 20:31
@arntsonl
Copy link
Contributor

This should work well to prevent host disconnect. We'll review the user experience on this one, but I imagine for now we can do something like this.

the USB host port uses the flash, as does our config. both cores
accessing the flash at the same time is no good and will crash the host
port, so the host port core is locked when writing flash for saving the
config, but this disables interrupts on the port and may interfere with
auth, so this only saves at runtime when it is safe to (when USB host is
disabled), with an optional flag to force saving the config, which
should only be used in limited circumstances.
it doesn't use the USB host port for anything so this should always be
fine
@bsstephan bsstephan force-pushed the restrict-runtime-saves branch from 4e54d50 to 93adf70 Compare October 17, 2024 18:32
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

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

Yeah let's add this in, and we can review user experience changes. This prevents auth from ever disconnecting

@arntsonl arntsonl merged commit f127a6b into OpenStickCommunity:main Nov 23, 2024
44 checks passed
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.

Conflicts between saving to the flash while the USB host is active
2 participants