This adds a timeout while waiting for the checksum from the hub when
downloading and running a program. Without this, we can get stuck in
the "loading" state if the hub doesn't respond as expected. This can
happen, for example, if a program is started with the hub button at the
same time as the start button in Pybricks Code is pressed.
Issue: https://github.com/pybricks/support/issues/301
55e724e8d8 introduced <p> elements on
notifications. however this is undesirable on the notification action
text. This splits the Notification component into one that is pre change
and one that is post change.
Fixes #394
It was possible for a program to start and finish running before the
final checksum message was received, which resulted in a bad state
(run button disabled).
This fixes it by using proper didStart/didFinish/didFailToFinish
actions for the download saga and updates the reducer to handle all
cases.
This fixes a race condition where the hub program running status flag
is received before the last checksum from the download process.
Issue: https://github.com/pybricks/support/issues/290
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.