forked from vedderb/vesc_tool
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vedderb:master' into ci
- Loading branch information
Showing
4 changed files
with
102 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
; These files can be generated using the VESC Tool CLI | ||
|
||
;(def f (f-open "lbm/test_native.lpkg" "r")) | ||
;(def can-id 26) | ||
|
||
(def f (f-open "lbm/test.lpkg" "r")) | ||
(def can-id -1) | ||
|
||
(def fsize (f-size f)) | ||
|
||
(print "erase") | ||
(print (list "Erase res" (lbm-erase can-id))) | ||
|
||
(def offset 0) | ||
(loopwhile t { | ||
(var data (f-read f 256)) | ||
(if (eq data nil) { | ||
(print "Upload done") | ||
(break) | ||
}) | ||
|
||
(lbm-write offset data can-id) | ||
(setq offset (+ offset (buflen data))) | ||
(print (list "Progress" (floor (* 100 (/ (to-float offset) fsize))))) | ||
}) | ||
|
||
(print (list "Run res" (lbm-run 1 can-id))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters