Commit Graph
27 Commits
Author SHA1 Message Date
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 2a3e9caa90 Add some missing license headers 2020-06-07 21:39:58 -05:00
David Lechner 16b8f71d81 Fix MPY ABI version check
fixes: 6b3d1464bb
2020-06-04 11:53:59 -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
Laurens Valk bbad88a502 Bump @pybricks/mpy-cross to v5 2020-06-04 13:21:18 +02: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 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 6713afe198 Add util funciton to format as hex 2020-05-26 21:20:08 -05:00
David Lechner 7a7eba407f add tests for bootloader protocol errors 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 f54f267762 simplify bootloader saga tests 2020-05-22 20:54:53 -05:00
David Lechner 6645a81d1c catch all message decode errors 2020-05-22 20:54:53 -05:00
David Lechner dd9d789e9a license 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 858cf26e5e smoother firmware flash progress
This waits for the OS to give a reply about the request being sent before updating progress. Before, we were just updating progress when requests were queued rather than actually sent.
2020-05-21 21:27:47 -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 0d57338d71 add bootloader message serialization test 2020-05-21 21:27:47 -05:00
David Lechner 9b06bc7bd1 add basic tests for bootloader message encoder
Doesn't test errors yet
2020-05-21 21:27:47 -05:00
David Lechner 3b22c0377f add tests for bootloader message decoder
also fix errors found by test
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 02d4726092 update to @pybricks/mpy-cross-4 v2
v2 allows us to pass the mpy-cross options from the firmware to the
mpy-cross compiler.
2020-05-04 14:05:18 -05:00
David Lechner c7b7162693 implement flashing firmware from new zip format 2020-05-02 14:40:18 -05:00
David Lechner 530f164af1 alphabetize imports 2020-04-19 15:53:28 -05:00
David Lechner a753fd77a7 wire up flash button 2020-04-18 21:58:03 -05:00