Commit Graph
67 Commits
Author SHA1 Message Date
David Lechner a88fa3d425 consolidate firmware fail to start and finish
they had too much overlap
2021-01-22 15:58:10 -06:00
David Lechner f3eef68131 add proper error handling of BLE send error 2021-01-22 15:58:10 -06:00
David Lechner 18edc7870e add disconnect monitor to firmware flash sagas 2021-01-22 15:58:10 -06:00
David Lechner a7ae66021b add firmware flash failure reasons 2021-01-21 19:45:24 -06:00
David Lechner f186e6414d decouple message id counter from actions
Actions should be pure functions for ease of testing.
2021-01-21 12:37:29 -06:00
David Lechner 2659c064fa make bootloader failure reasons more strongly typed
This way we don't have to do extra null checks elsewhere.
2021-01-21 12:37:29 -06:00
David Lechner 904de515c0 fix missing newlines in compiler error 2021-01-21 12:37:29 -06:00
David Lechner bab35e8c45 move progress from status bar to firmware button 2021-01-19 17:20:56 -06:00
David Lechner 5a66f041f2 update new version experience
This changes the new version message to be more user-friendly and allows
using the new version without restarting the browser or clearing the
cache.
2021-01-18 18:51:38 -06:00
David Lechner f72c6ad5de rename app startup action using do/did pattern 2021-01-18 17:29:03 -06:00
David Lechner 54439a4cbc convert notifications to static API
This converts notifications from a reducer to a saga. This way, our
state doesn't get bogged down with a bunch of notifications.
2021-01-18 17:29:03 -06:00
David Lechner 8c1e9a8273 implement license saga tests 2021-01-17 14:59:03 -06:00
David Lechner 1626533cca add license dialog 2021-01-17 10:39:38 -06:00
David Lechner dcb432583c add basic about dialog 2021-01-15 12:51:52 -06:00
David Lechner efb474b727 rename service worker actions to do/did pattern 2021-01-15 11:23:26 -06:00
David Lechner f54beab97f use consistent tooltip delay 2021-01-15 11:08:04 -06:00
David Lechner a66331840c remove unused app.action.toggleDocs 2021-01-15 10:57:37 -06:00
David Lechner a48f3f381e convert settings to do/did action pattern 2021-01-14 15:12:49 -06:00
David Lechner b15b2e1dea move docs toggle to settings 2021-01-14 10:55:00 -06:00
David Lechner d7dbaaa12d add dark mode setting 2021-01-11 23:36:48 -06:00
David Lechner 41a1cee092 change support button to settings button
and add new empty settings drawer
2021-01-11 23:36:48 -06:00
David Lechner ae996453e8 drop polyfill for chromimum < v85
This removes the polyfill for using older chrome browsers before the
writeWithResponse and writeWithoutResponse APIs were added.
2020-12-21 13:05:47 -06:00
David Lechner 71ad9c1b1b Update to create-react-app 4
- had to update eslint deps
- ran into https://github.com/palantir/blueprint/issues/4112
- had to move beta.svg out of static/
- had to fix prettier formatting changes
- ran into https://github.com/facebook/jest/issues/7780
2020-11-20 21:08:53 -06:00
David Lechner 1e0ef476ef Add docs toggle button 2020-06-12 21:46:00 -05:00
David Lechner bda007c17a convert ble service to saga 2020-06-11 22:53:38 -05:00
David Lechner f3425e2f0f rename BLEData to BleUart
These actions all relate specifically to the nRF UART GATT service
2020-06-11 22:53:38 -05:00
David Lechner 802f2bc05d use type = instead of interface extends
for consistency
2020-06-11 22:53:38 -05:00
David Lechner a411bfc92d improve serialization of BLE writes 2020-06-10 21:59:34 -05:00
David Lechner e09fd8713f convert terminal from epic to saga 2020-06-10 21:59:34 -05:00
David Lechner 07d0b5ef39 split firmware flashing from lwp3-bootloader
BLE won't always be the only way to flash firmware
2020-06-09 23:51:32 -05:00
David Lechner 6d81da0df0 Show notification when program is changed in another window 2020-06-09 23:51:32 -05:00
David Lechner f721f959f0 do soft reset after connecting
When we first connect, we don't know what state the hub is in. This adds
a new state for that called Unknown and sends a stop request as soon
as we connect to try to get to a known state.
2020-06-09 23:51:32 -05:00
David Lechner 2a3e9caa90 Add some missing license headers 2020-06-07 21:39:58 -05:00
David Lechner c975613e1c rename bootloader to lwp3-bootloader
we will probably have DFU bootloader in the future
2020-06-04 11:28:13 -05:00
David Lechner 297faafc27 convert mpy to saga
- unit tests depend on bug fix in @pybricks/mpy-cross-v4
- removes last use of redux-thunk
2020-05-27 20:57:22 -05:00
David Lechner 24acab901c remove use of thunk action in ble and hub
This is a step towards moving these to sagas
2020-05-27 20:57:22 -05:00
David Lechner 99fd62100d rename open and save as buttons 2020-05-27 20:57:22 -05:00
David Lechner c373b3abc5 begin rework of notifications
The notification reducer should decide when to display notifications rather than having notifications scattered throughout the code.

Also start using translations so that user-visible strings are not scattered in code.
2020-05-26 21:20:08 -05:00
David Lechner 6e4b22f841 Add common top-level Action type
This makes for better type inference.
2020-05-26 21:20:08 -05:00
David Lechner 33861d970b Package firmware in app
- includes firmware .zip for movehub and cplushub
- firmware flash button no longer opens file dialog
  - now connects first, then choses firmware based on connected device
  - drag and drop of custom firmware still works
2020-05-25 21:31:35 -05:00
David Lechner 5160d29c7e change to @pybricks/mpy-cross-v4
This package is associated with the pybricks/pybricks-micropython repository.
2020-05-25 21:31:35 -05:00
David Lechner 2854ab422b Rename BLE connect actions
This matches the naming patter used in other files.
2020-05-24 20:00:13 -05:00
David Lechner dd9d789e9a license 2020-05-22 19:54:48 -05:00
David Lechner 1898787eb5 add open and save button
Chrome has an annoying warning when downloading .py files, e.g https://stackoverflow.com/q/34130774/1976323

Workaround is to enable the "Ask where to save each file before downloading" setting.
2020-05-22 19:54:48 -05:00
David Lechner ac6c798148 Fix city hub bootloader compatibility
The city hub requires that certain messages are write with response and
others are write without response, otherwise it will cause BlueZ to
disconnect because it does not follow proper BLE protocol.
2020-05-22 19:54:48 -05:00
David Lechner ed5bd4728a add id to bootloader request actions
This will be used to match didRequest to a requst to avoid issues with messages being queued concurrently
2020-05-21 21:27:47 -05:00
David Lechner 23566a7d4a Check Web Bluetooth capabilities
This adds/improves checks for the various Web Bluetooth capabilities
that we are using and notifies the user when capabilities are missing.
2020-05-20 21:31:51 -05:00
David Lechner 3ae2fb2eef wire up firmware flash progress
Also turn off logging and longer checksum interval to improve performance

94K movehub fw flashes in about 1:45
2020-05-20 19:57:23 -05:00
David Lechner 0171255be9 fix lint error 2020-05-20 16:30:39 -05:00
Laurens Valk 93e0bf8902 hub: check response to size message
The hub responds to every message with a checksum. The mpy size message is no different, so we need to read it.

This fixes the checksum messages being out of sync by one.
2020-05-08 12:08:25 +02:00