David Lechner
dcaf9f6ff4
fix checksum verification
...
the checksum returned by the hub is only one byte, so the 4-byte
checksum used in the firmware can't be used
2021-01-23 15:28:38 -06:00
David Lechner
5d1311216c
add notifications for firmware flash errors
2021-01-23 15:27:36 -06:00
David Lechner
1a6f77ece3
remove disconnectMonitor()
...
This fixes multiple didFailToFinish() actions for a single flash
firmware request in certain cases.
Since 783f7e2 is fixed, waitForDidRequest() will always return with
success or error. So when used alone, waitForDidRequest() will process
the error. When using race(waitForDidRequest(), waitForResponse()),
waitForResponse() will handle the error if it wins the race and cancel
waitForResponse().
2021-01-23 13:46:54 -06:00
David Lechner
819810e52a
add workaround for bluez notification issue
...
https://crbug.com/1170085
2021-01-23 13:36:33 -06:00
David Lechner
783f7e2337
fix write function being cancelled on disconnect
2021-01-22 20:25:01 -06:00
David Lechner
bf6d64c211
fix unbound method call
2021-01-22 19:03:37 -06:00
David Lechner
b5d3fe17da
add proper error handling for checksum mismatch
2021-01-22 18:54:43 -06:00
David Lechner
768762347a
add proper error handling for firmware flash size
2021-01-22 18:29:47 -06:00
David Lechner
4bbd1efad5
add proper error handling for init command error
2021-01-22 18:23:59 -06:00
David Lechner
3208faa7e6
add proper error handling for fail to fetch
2021-01-22 17:44:10 -06:00
David Lechner
b1883a9d1c
make sure we are getting coverage of checksum messages
2021-01-22 16:51:42 -06:00
David Lechner
2f5d1fb976
add another test for mismatch device type
2021-01-22 16:39:41 -06:00
David Lechner
e984cffbb4
add try/catch for unexpected errors
2021-01-22 16:30:52 -06:00
David Lechner
e5d98cdd84
add proper error handling for bad device id
2021-01-22 16:22:54 -06:00
David Lechner
3ec067e930
add test for unknown bootloader command
2021-01-22 16:08:13 -06:00
David Lechner
8ad2b78d4c
add proper error handling for hub erase fail
2021-01-22 15:58:10 -06:00
David Lechner
b58ec9a754
fix HubError type check
2021-01-22 15:58:10 -06:00
David Lechner
c1c08e5ced
add state initializer in async saga constructor
2021-01-22 15:58:10 -06:00
David Lechner
08fea237c9
change setState() to updateState()
...
this way we don't wipe out state if we change a different value
2021-01-22 15:58:10 -06:00
David Lechner
79e06bcd51
add test for response timeout
2021-01-22 15:58:10 -06:00
David Lechner
7a5e344b66
add helper function to disconnect and cancel
2021-01-22 15:58:10 -06:00
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
2d44705112
proper error handling for failure to connect
2021-01-22 15:58:10 -06:00
David Lechner
d38ae70ab2
proper error handling for bad checksum algorithm
2021-01-22 15:58:10 -06:00
David Lechner
9261b8743c
proper error handling for firmware too big
2021-01-22 15:58:10 -06:00
David Lechner
4707b77135
proper error handling for compiler error
2021-01-22 15:58:10 -06:00
David Lechner
e229f08ffd
switch to inline snapshots in tests
2021-01-22 15:58:10 -06:00
David Lechner
b1efa04947
proper error handling for mpy-cross ABI version
2021-01-22 15:58:10 -06:00
David Lechner
95652a5eb2
Merge pull request #253 from pybricks/dlech
...
UI and firmware updates
2021-01-22 10:40:19 -06:00
David Lechner
9551bdc7f0
Pybricks firmware v3.0.0b1
2021-01-22 10:35:11 -06:00
David Lechner
caacaad341
use recursive partial so we don't have to use "as"
2021-01-22 10:35:11 -06:00
David Lechner
e1932febb2
drop CurrentEditSession type
...
It is better to not hide the nullability.
2021-01-21 22:25:13 -06:00
David Lechner
218dda4d0b
use typed-redux-saga in flash-firmware sagas
...
This make things a bit more type safe and a bit easier to read.
2021-01-21 22:22:46 -06:00
David Lechner
ab0c850b80
add proper error handling for firmware zip error
2021-01-21 19:49:53 -06:00
David Lechner
a7ae66021b
add firmware flash failure reasons
2021-01-21 19:45:24 -06:00
David Lechner
3b31412186
minor code improvements in flash-firmware
2021-01-21 12:37:29 -06:00
David Lechner
6f6bf26854
add basic flash-firmware sagas tests
...
So far just testing the success paths, no errors.
2021-01-21 12:37:29 -06:00
David Lechner
9d7845237c
rename waitForDidSend to waitForDidRequest
...
This better reflects what the function actually does.
2021-01-21 12:37:29 -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
0333fa51c0
add developer settings with pseudolocalization
...
This is currently broken due to https://github.com/Shopify/quilt/pull/1725
2021-01-21 12:37:29 -06:00
David Lechner
91938e34d9
add special notification for unexpected errors
...
Since these errors are not expected, we want to make it really easy to
report them.
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
647985906d
add test for app sagas
2021-01-19 17:20:56 -06:00
David Lechner
bab35e8c45
move progress from status bar to firmware button
2021-01-19 17:20:56 -06:00
David Lechner
816053ba7c
don't expect response on disconnect commands
...
The LWP3 bootloader disconnect and reboot commands cause the device
to disconnect before sending a response, so we must always use
write without response for these, otherwise the program can hang
waiting for a response.
2021-01-19 17:20:56 -06:00
David Lechner
2ff5ce9852
dismiss compile error notification on successful compile
...
If we got a successful compile, then the error is no longer applicable.
2021-01-19 17:20:56 -06:00
David Lechner
9033659c76
Merge pull request #252 from pybricks/dlech
...
updates
2021-01-18 19:05:14 -06:00