summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Didron <0x6664@hey.com>2020-10-08 13:07:18 +0900
committerFlorian Didron <0x6664@hey.com>2020-10-08 13:07:18 +0900
commit9a9d3d85a3fe00f7aaff6e719e73c1413a87ce05 (patch)
tree13a48bed2602e5754bdc26b9381ca16e9e74df50
parent7cb7c820cc36e9577e2a5a2ca6d475ac2f43d7d0 (diff)
fix: add sleep time before sending reboot command
-rw-r--r--wally/dfu.go2
-rw-r--r--wally/teensy.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/wally/dfu.go b/wally/dfu.go
index f30778f..bc8b7c5 100644
--- a/wally/dfu.go
+++ b/wally/dfu.go
@@ -236,6 +236,8 @@ func DFUFlash(s *State) {
s.emitUpdate()
}
+ time.Sleep(1 * time.Second)
+
s.Log("info", "Sending the reboot command")
err = dfuReboot(dev, &dfuStatus)
diff --git a/wally/teensy.go b/wally/teensy.go
index 5a6cc24..b63d1a4 100644
--- a/wally/teensy.go
+++ b/wally/teensy.go
@@ -114,6 +114,8 @@ func TeensyFlash(s *State) {
s.emitUpdate()
}
+ time.Sleep(1 * time.Second)
+
s.Log("info", "Sending the reboot command")
buf := make([]byte, ergodoxBlockSize+2)
buf[0] = byte(0xFF)