David Lechner
0d30e113da
use i18n for buttons
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
9d789c13e1
add test for util.assert
2020-05-27 20:57:22 -05:00
David Lechner
59c14a3ad7
add test for util.hex
2020-05-27 20:57:22 -05:00
David Lechner
5da915851c
strongly type MessageId
...
This way we can add tests to ensure proper mapping in .json
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
ec05ad38aa
Add error logger service
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
3e4ea382e5
move images out of public/static folder
...
This way, we get compile error if there problem with images. Also allows
images to be optimized.
2020-05-26 21:20:08 -05:00
David Lechner
8045332dde
remove react logo
2020-05-26 21:20:08 -05:00
David Lechner
a8f959c6eb
Show popup notifications for serviceWorker
...
These need more user-friendly handling, but this will suffice for now.
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
df34cd4ae5
Ignore CTRL+S in editor
...
Some programmers have the habbit of always pressing
CTRL+S which opens the browsers save as dialog and
interrupts workflow. We already automatically save
the current file, so we can just ignore they keypress.
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
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
2a0cba80b8
remove incorrect use of ThunkDispatch
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
21208344be
Add error notification for service error
...
On Linux/BlueZ, sometimes the services are not enumerated properly and
the user has to remove the Bluetooth device from BlueZ, then it should
work correctly.
2020-05-22 19:54:48 -05:00
David Lechner
6ef0dee20c
test utils/web-bluetooth
2020-05-21 21:27:47 -05:00
David Lechner
c979d21255
use describe in math tests
...
just for better organization
2020-05-21 21:27:47 -05:00
David Lechner
ae21501aa2
test sumComplement32
2020-05-21 21:27:47 -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
0171255be9
fix lint error
2020-05-20 16:30:39 -05:00
David Lechner
90817a1ae7
github: add CI for pull requests
...
and hacks to get tests working
2020-05-20 14:52:45 -05:00
David Lechner
01374b6890
update for react-dropzone API change
2020-05-20 13:08:34 -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
a44e97f4a3
terminal resizing
2020-05-04 22:08:44 -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
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
cf5d801a9a
enable progressive web app
2020-04-19 17:54:44 -05:00
David Lechner
530f164af1
alphabetize imports
2020-04-19 15:53:28 -05:00