Add real-time dashboard for viewing connected peripherals on the EV3#2229
Merged
martin-henz merged 15 commits intosource-academy:masterfrom Sep 27, 2022
Merged
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 |
chownces
approved these changes
Sep 27, 2022
martin-henz
approved these changes
Sep 27, 2022
Member
There was a problem hiding this comment.
Looks good to me. In the interest of speed, let's merge this one. @enrong has approved via telegram and github.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
monitortopic 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:monitorupdate 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 buildthere, and run:mosquitto.conffile 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-vflag is optional and enables verbose mode (recommended for debugging):Checklist
I have updated the documentationNo documentation update required for frontend