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
Adds a pop up modal alerting to the crash of V3 to all pages which monitor V3 (i.e Dashboard, Logs, Status, Boost and Camera system pages when observing V3)
The modal will appear when the crash detection topic (/v3/wireless_module/3/crash_detection) sends a true value.
It will provide the timestamp of the latest detected crash, along with the number of crashes which have occurred if the modal hasn't been dismissed and the bike has crashed again.
Screenshots
Steps to Test
Use the following command in the terminal to simulate a crash occurring:
mosquitto_pub -t "/v3/wireless_module/3/crash_detection" -m '{\"value\":true}'
To simulate a false value, simply change the above to false.
Use the command multiple times to check the counter works as intended