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
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
9a64e68c60
hub: change size to little-endian
...
firmware now expects little endian checksum
2020-05-04 12:03:34 -05:00
David Lechner
c7b7162693
implement flashing firmware from new zip format
2020-05-02 14:40:18 -05:00
David Lechner
9d545f8f5c
add polyfill for new Web Bluetooth methods
2020-05-01 21:37:45 -05:00
David Lechner
0a50ebddd7
bootloader: add withResponse option
...
This takes advantage of new (not implemented yet) Web Bluetooth APIs to write with or without response
2020-05-01 21:11:01 -05:00
David Lechner
03dba3ab9a
use published @pybricks/mpy-cross-4 package
2020-05-01 19:13:17 -05:00
David Lechner
13a2b271b0
remove debug code
...
This was just there for debugging and forgot to remove it before pushing.
2020-04-20 17:25:33 -05:00
David Lechner
b1e99e0582
implement notifications
2020-04-20 13:57:58 -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
David Lechner
629fbb928d
wire up repl button
2020-04-17 17:24:10 -05:00
David Lechner
18417cb37c
wire up stop button
2020-04-17 17:16:23 -05:00
David Lechner
454475980a
wire up run button
2020-04-17 16:57:51 -05:00
David Lechner
232a8f5db5
supress cryptic error message
2020-04-17 00:55:29 -05:00
David Lechner
c7c11f0040
fix bluetooth stuck in connecting state after cancel
2020-04-17 00:07:15 -05:00
David Lechner
a67656def6
wire terminal to ble
2020-04-16 23:58:35 -05:00
David Lechner
b4d81fd3e5
implement bluetooth connect using redux
2020-04-16 19:09:50 -05:00