-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
970 enable rc controller in webui #985
Conversation
#973 Now controllers take mode and recording as inputs and use those as defaults. The idea is that if one of the controllers get's user input that changes that state, then it get's propagated to the next controller via these defaults.
- web.py will send websocket message with changes to the client - client will iterate through the changes and update fields in state - If state actually changed then client we redraw the UI
- The python code uses 3 modes; 'local', 'user', 'local_angle' - The web code has the same functional modes, but calls them 'auto', 'user', 'auto_angle'. - So when the server sends a mode change to the javascript client it does not sync correctly because of the name differences. This commit makes them match.
- the mode change in the controller was getting overridden by the pass-through default - now we latch the change in the controller and if the latch has a value in run_threaded, then we use that rather than the pass-through default. - this change fixes the process that changes the webui when the user changes the mode with a controller button.
…m/autorope/donkeycar into 970-enable-RC-controller-in-webui
- added code to latch changes in the background thread and then commit them in run_threaded(). - added code to send only changed state from web to server, so we are not overwriting unchanged state. - now the drive mode can be changes with either the web ui or the game controller and it will be correctly syncronized and reflected in the webui. - added help for user mode shortcut keys in web controller.
…m/autorope/donkeycar into 970-enable-RC-controller-in-webui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, only minor comment
logger.debug(f"Updating web client: {data_str}") | ||
wsclient.write_message(data_str) | ||
except Exception as e: | ||
print(e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a logger error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you.
Addresses Issue #973 and Issue #972
For issue #973:
For Issue #972:
User
,Full Auto
andAuto Steering
. I chose not to use the suggest ofAuto Steering and Manual Throttle
because it was too long for the ui.In addition I added an explanation of the keyboard shortcuts for change the drive mode and recording in the web ui to the model help popup.