This adds a firmware version check that shows an error message if the
connected hub is running an older Pybricks firmware version.
Issue: https://github.com/pybricks/support/issues/482
A previous commit broke buttons after connecting since state all state
transitions were changed to be ignored if the current state was
"disconnected". This made it impossible to get into any other state.
This brings back use of the "unknown" state upon initial connection
to provide a path out of the "disconnected" state.
Fixes: 7a5aa75894
This replaces the ace editor with the monaco editor. It fixes quite a
few small paper-cut bugs and should be easier to add code completion
to in the future.
Many of the snippets are omitted but can be added back later if needed.
Otherwise, we have tried to preserve the existing look and feel as much
as possible.
This fixes a bad hub runtime state when the hub disconnects during a
download. This caused the run button in the UI to be enabled when the
hub was disconnected.
Issue: https://github.com/pybricks/support/issues/378
It can take a while (especially on Windows) before the connection is
ready and the other buttons become enabled. So use a spinner to let
the user know that we are working on it.
Issue: https://github.com/pybricks/support/issues/315
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
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 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.