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

Replace state machine with a callback dictionary #8

Open
mxgrey opened this issue Dec 16, 2020 · 1 comment
Open

Replace state machine with a callback dictionary #8

mxgrey opened this issue Dec 16, 2020 · 1 comment

Comments

@mxgrey
Copy link
Collaborator

mxgrey commented Dec 16, 2020

There are some issues with the state machine, mostly caused by the asynchronous behavior of the MiR API. It doesn't report itself as executing until a brief delay after a mission has been posted. This messes with some of the state machine's logic and causes the state machine to jump forward too quickly.

I think a more manageable strategy will be to create a dictionary that maps from mission names to update callbacks. When we see the current mission that MiR is on, then we simply pull the relevant callback out of the dictionary and trigger it.

@cnboonhan
Copy link
Contributor

Thanks for making an issue on this! Im happy to hop on it once i clear up some other things on my end.

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

No branches or pull requests

2 participants