-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add real-time dashboard for viewing connected peripherals on the EV3 #2229
Add real-time dashboard for viewing connected peripherals on the EV3 #2229
Conversation
* Only show dashboard when connected * Remove hardcoding * Support multiple sensor measurement modes * Improve abstraction
Pull Request Test Coverage Report for Build 3134625514Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
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. In the interest of speed, let's merge this one. @enrong has approved via telegram and github.
Description
Take note of the breaking change: the frontend, backend*, EV3-source, and Sling* needs to be updated at the same time due to changes in the Sling protocol.
*Technically, Sling can be updated separately, as the frontend and EV3-source uses locked versions of the library and can be updated independently. The backend can also be updated separately as it only involves updating security settings, but this must be done before the rest are updated.
This PR can be merged independently the moment the new sling package is published on npmjs.
Related PRs:
Depencency updates:
@sourceacademy/sling-client
:^0.0.1
~>^0.1.0
,Change summary: Subscribe to a new MQTT topic,
monitor
, and listens to its messages sent by the EV3 to display real-time connection info when the EV3 is connected:Backwards-compatible with older versions of EV3-source (hence can be merged independently). But not vice versa, so the frontend must be merged before EV3-source is updated.
As the
monitor
topic simply sends sensor/motor data (there are no "connect"/"disconnect" messages), the frontend auto marks a peripheral as "disconnected" and displays the unconnected port image when both of the following conditions are satisfied:monitor
update for any peripheralExample:
Assets added are adapted from this repo (MIT license) and optimised using this app.
Type of change
How to test
Due to the major scale of this PR, you will need to perform the following steps:
yarn build
there, and run:mosquitto.conf
file to enable both port 1883 (default port used for MQTT protocol) and 9001 (for MQTT over WebSockets), as well as allowing anonymous logins. Full instructions here.robot:maker
:192.168.139.10
). The-v
flag is optional and enables verbose mode (recommended for debugging):Checklist
I have updated the documentationNo documentation update required for frontend