Commit Graph
689 Commits
Author SHA1 Message Date
David Lechner 1964c9c485 Add timeout while waiting for checksum
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
2021-04-12 13:24:10 -05:00
David Lechner 0d89f8daad Disable flash button when hub is connected.
Fixes: https://github.com/pybricks/support/issues/299
2021-04-12 10:34:59 -05:00
Laurens Valk 90e04916bc Bump @pybricks/ide-docs from 1.1.1 to 1.3.1 2021-04-12 11:27:40 +02:00
David Lechner 800acf5081 Merge pull request #395 from pybricks/dlech
Fix <p> element on notification action
2021-04-07 13:26:50 -05:00
David Lechner f39dea36fe Fix <p> element on notification action
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
2021-04-07 13:19:52 -05:00
David Lechner a21b8e8bab Merge pull request #393 from pybricks/dlech
beta 12
2021-04-07 12:37:29 -05:00
David Lechner 23c3190a13 v1.0.0-beta.12 v1.0.0-beta.12 2021-04-07 12:33:16 -05:00
David Lechner 7f9e6bd4db Fix download and run race condition
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.
2021-04-07 12:28:36 -05:00
David Lechner decf3e909d Merge pull request #391 from pybricks/dlech
beta 11
2021-04-07 11:37:59 -05:00
David Lechner c9dcf63475 Merge branch 'master' into dlech 2021-04-07 11:35:01 -05:00
David Lechner d75103c2a1 v1.0.0-beta.11 v1.0.0-beta.11 2021-04-07 11:29:22 -05:00
David Lechner a081c4a798 Fix download and run race condition
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
2021-04-07 11:27:40 -05:00
David Lechner 7a8dab1bb4 Merge pull request #389 from pybricks/dlech
yarn upgrade
2021-04-06 14:29:47 -05:00
David Lechner 3b1f6eb555 yarn upgrade 2021-04-06 14:25:56 -05:00
David Lechner 595cb05b04 Merge pull request #388 from pybricks/dlech
beta 10
2021-04-06 13:55:49 -05:00
David Lechner 8456450934 v1.0.0-beta.10 v1.0.0-beta.10 2021-04-06 13:50:59 -05:00
David Lechner 605a910746 Fix failing download and run
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
2021-04-06 13:48:38 -05:00
David Lechner 76a5f8fe26 drop HubRuntimeStatusType Idle and Running
These are no longer used
2021-04-06 13:42:26 -05:00
David Lechner 6dc700d396 Merge pull request #384 from pybricks/dlech
beta 9
2021-04-05 16:15:20 -05:00
David Lechner 21a6b902cc v1.0.0-beta.9 v1.0.0-beta.9 2021-04-05 16:11:14 -05:00
David Lechner d632d26b6a Pybricks firmware v3.0.0b4 2021-04-05 16:11:04 -05:00
David Lechner bbcfe4530e Merge pull request #383 from pybricks/dlech
beta 8
v1.0.0-beta.8
2021-04-02 16:13:45 -05:00
David Lechner 8be950036e beta 8 2021-04-02 16:09:38 -05:00
David Lechner e441c8b36d Pybricks firmware v3.0.0b3 (2nd release)
This includes a fix for Move hub.
2021-04-02 16:08:38 -05:00
David Lechner bb9a89d7d9 prettier 2021-04-02 12:48:06 -05:00
David Lechner 829e47c75a Wrap long lines in compiler error
This way we don't overflow the toast.
2021-04-01 14:24:31 -05:00
David Lechner 09ba8bb035 Increase toast max-width
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.
2021-04-01 14:13:25 -05:00
David Lechner 55e724e8d8 Allow splitting long notifications
This adds the ability to split notification messages in to multiple paragraphs.
2021-04-01 13:58:01 -05:00
David Lechner ca1ec0a64e Add Device Information Service support
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.
2021-04-01 13:29:10 -05:00
David Lechner ac07e4ba61 Merge pull request #378 from pybricks/dlech
update packages
2021-03-30 14:00:45 -05:00
David Lechner d50f1f840f Pybricks firmware v3.0.0b3 2021-03-30 13:56:25 -05:00
David Lechner 428aa326ba yarn upgrade 2021-03-30 13:53:50 -05:00
David Lechner 9f6c9846bf Merge pull request #359 from pybricks/dependabot/npm_and_yarn/web-vitals-1.1.1
build(deps): bump web-vitals from 1.1.0 to 1.1.1
2021-03-15 10:33:53 -05:00
dependabot[bot] c25316a5bf build(deps): bump web-vitals from 1.1.0 to 1.1.1
Bumps [web-vitals](https://github.com/GoogleChrome/web-vitals) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/GoogleChrome/web-vitals/releases)
- [Changelog](https://github.com/GoogleChrome/web-vitals/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GoogleChrome/web-vitals/compare/v1.1.0...v1.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-15 08:21:16 +00:00
David Lechner 6bb430009f Merge pull request #358 from pybricks/dependabot/npm_and_yarn/shopify/react-i18n-5.3.0
Bump @shopify/react-i18n from 5.2.4 to 5.3.0
2021-03-12 10:05:24 -06:00
dependabot[bot] a8fe64bb24 Bump @shopify/react-i18n from 5.2.4 to 5.3.0
Bumps [@shopify/react-i18n](https://github.com/Shopify/quilt/tree/HEAD/packages/react-i18n) from 5.2.4 to 5.3.0.
- [Release notes](https://github.com/Shopify/quilt/releases)
- [Changelog](https://github.com/Shopify/quilt/blob/main/packages/react-i18n/CHANGELOG.md)
- [Commits](https://github.com/Shopify/quilt/commits/@shopify/react-i18n@5.3.0/packages/react-i18n)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-12 15:09:39 +00:00
David Lechner b783f7f7d9 Merge pull request #353 from pybricks/dlech
Pybricks BLE service implementation
2021-03-12 08:58:32 -06:00
David Lechner 64c75640ba ble-pybricks-service: add some tests 2021-03-12 08:54:20 -06:00
David Lechner 4a294f8b25 Merge remote-tracking branch 'origin/master' into dlech 2021-03-11 15:25:56 -06:00
David Lechner 651040b47d Merge pull request #357 from pybricks/dependabot/npm_and_yarn/blueprintjs/core-3.41.0
Bump @blueprintjs/core from 3.40.1 to 3.41.0
2021-03-11 10:33:16 -06:00
dependabot[bot] 3d190c95ab Bump @blueprintjs/core from 3.40.1 to 3.41.0
Bumps [@blueprintjs/core](https://github.com/palantir/blueprint/tree/HEAD/packages/core) from 3.40.1 to 3.41.0.
- [Release notes](https://github.com/palantir/blueprint/releases)
- [Changelog](https://github.com/palantir/blueprint/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/palantir/blueprint/commits/@blueprintjs/core@3.41.0/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-11 06:54:30 +00:00
David Lechner 56829a502c ble-pybricks-service/sagas: fix filtering of command send completions
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.
2021-03-10 11:19:06 -06:00
David Lechner 684df491e0 ble-uart/sagas: use array to managed forked tasks
This simplifies keeping track of which tasks need to be canceled in the
error paths.
2021-03-10 11:00:54 -06:00
David Lechner 3db1cb9b9c yarn upgrade 2021-03-10 10:35:18 -06:00
David Lechner 4b3a6fea5e hub: fix missed notification when connecting
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.
2021-03-10 10:30:15 -06:00
David Lechner 430147487e implement Pybricks service stop command 2021-03-10 10:30:15 -06:00
David Lechner 61c34fc4b1 implement BLE Pybricks service status notifications
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.
2021-03-10 10:30:15 -06:00
David Lechner 257b843f38 reduce duplicated command line args in coverage script 2021-03-10 10:30:15 -06:00
David Lechner 9e34ec1de8 Merge pull request #354 from pybricks/dependabot/npm_and_yarn/xterm-4.11.0
Bump xterm from 4.10.0 to 4.11.0
2021-03-10 09:40:16 -06:00
dependabot[bot] e487858a3d Bump xterm from 4.10.0 to 4.11.0
Bumps [xterm](https://github.com/xtermjs/xterm.js) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/xtermjs/xterm.js/releases)
- [Commits](https://github.com/xtermjs/xterm.js/compare/4.10.0...4.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-10 07:09:10 +00:00