Skip to content

Commit 33d05ce

Browse files
committed
dfu: reboot after restore
The leave command tells the device to leave DFU mode, effectively rebooting it. This is much easier than unplugging the device and fiddling with buttons.
1 parent e69e1f3 commit 33d05ce

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
## Changed
1010
- Changed udev rules to use `TAG+="uaccess"` instead of `MODE="0666"`.
1111

12+
## Fixed
13+
- Fixed device not rebooting after `dfu restore`.
14+
1215
## [1.0.0-alpha.13] - 2021-08-06
1316

1417
### Fixed

pybricksdev/dfu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def restore_dfu(file: BinaryIO) -> None:
146146
"--alt",
147147
"0",
148148
"--dfuse-address",
149-
f"{FIRMWARE_ADDRESS}",
149+
f"{FIRMWARE_ADDRESS}:leave",
150150
"--download",
151151
file.name,
152152
]

0 commit comments

Comments
 (0)