The firmware was changed to send status updates at a regular interval
which caused the hub state to change back to idle prematurely during
download and run. This caused any program more than one or two lines
long to fail.
Issue: https://github.com/pybricks/support/issues/290
This makes it big enough to fit the compiler error message
IndentationError: unindent doesn't match any outer indent level
If we still have problems with overflow we should probably look at
ways to wrap <pre> text instead of making this wider.
The Pybricks firmware now includes the BLE Device Information Service
to provide firmware and Pybricks protocol versions.
For now, checking that the service is present is enough to know that the
firmware is up to date. But we will need to add additional checks as
soon as the protocol is changed.
Since didSend and didFailToSend are part of the same enum as the command
send actions types, we have to filter them out when subscribing to the
send actions.
This fixes the first notification being missed due to the notification
handler not being started until after notifications are enabled.
It also fixes the DidConnect action changing the state to Unknown after
a notification was received that set the state to a known value.
This is the beginning of the BLE Pybricks service implementation, so
changes are made to get a handle to the Pybricks control characteristic
and enable notifications.
Currently, only one event (the status report event) and no commands are
implemented on this characteristic.
The new status report event replaces monitoring the UART for >>>>
strings to get the current hub state.
Also includes some minor cleanup in the ble-uart/actions for consistency.
This adds custom styling for the toolbar (inspired by blueprintsjs
navbar). But this lets us use the correct role and not fight the
navbar styling so much.
This adds a button to call the ServiceWorkerRegistration.update()
function. This button will be hidden if there is already an update
pending.
This also adds a button to restart the app to apply the update. This
is nice in case users accidentally close the notification that asks
to restart.
The about button is moved to the new app group in the setting menu.
This makes the scrollbar flashing less noticeable, but there is still
a bit of a flash in dark mode due to the fact that we are still
injecting the class in the load event in that case.
Previously, the docs iframe was removed from the DOM when the docs
were hidden. This caused the docs to always go back to the main page
when shown.
This fixes it by using CSS to hide the docs instead of removing them
from the DOM. However, this comes with its own complications regarding
maintaining the scroll position.