diff options
author | André Cruz <andre@cabine.org> | 2020-12-22 23:43:45 +0000 |
---|---|---|
committer | André Cruz <andre@cabine.org> | 2020-12-22 23:43:45 +0000 |
commit | 82f8e6f0add55914e4f0e15f1829e7d5daf6fcfe (patch) | |
tree | 12353ad416448108bbff14f803a51d3b2ba8da94 | |
parent | e5dde3c700beab39fb941c6941e55535bf9b2af6 (diff) |
Reset bytes sent each flash operation
When you drop a new firmware right after a previous flash operation the progress bar would not reset.
-rw-r--r-- | wally/dfu.go | 1 | ||||
-rw-r--r-- | wally/teensy.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/wally/dfu.go b/wally/dfu.go index bc8b7c5..2e6aa13 100644 --- a/wally/dfu.go +++ b/wally/dfu.go @@ -181,6 +181,7 @@ func DFUFlash(s *State) { defer cfg.Close() fileSize := len(firmwareData) + s.FlashProgress.Sent = 0 s.FlashProgress.Total = fileSize err = dfuClearStatus(dev) diff --git a/wally/teensy.go b/wally/teensy.go index b63d1a4..534cab0 100644 --- a/wally/teensy.go +++ b/wally/teensy.go @@ -19,6 +19,7 @@ func TeensyFlash(s *State) { } defer file.Close() + s.FlashProgress.Sent = 0 s.FlashProgress.Total = ergodoxCodeSize firmware := gohex.NewMemory() |