This setting will be used to customize the hub name when flashing
firmware. This commit just implements the setting.
Some changes needed to be made to the existing settings infrastructure
since previously it only allowed boolean settings.
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
Since the firmware version is the most important version, make it the
primary version. (We still need the Pybricks Code version since not
every update includes a firmware update.)
Since we are using the checksum message for throttling flash speed
anyway, we can validate the checksum during the flash process to
catch errors earlier.
Issue: https://github.com/pybricks/support/issues/433
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
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.