You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 9, 2018. It is now read-only.
Hmm, I think the global variable is just there to prevent calling SYSTEM_MODE(AUTOMATIC); and also SYSTEM_MODE(MANUAL); from the same program. You could start by directly trying to call the set_system_mode function from main. If that works then we can add a Rusty mechanism to prevent calling that function twice.
Thinking about this a bit more. Since this is C++ this global state may also be being used to call set_system_modebefore main runs. If that's the case then we can use something like .init_array to do the same from Rust. Better to look at the disassembly to figure out when set_system_mode is called.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there already a way to support system modes?
https://docs.particle.io/reference/firmware/photon/#system-modes
I tried to add bindings, but this is a bit above my knowledge level since it seems to set global state.
The text was updated successfully, but these errors were encountered: