vouch-opensource / mcumgr-client

client for mcumgr commands
Apache License 2.0
31 stars 13 forks source link

better progress display #4

Closed Frank-Buss closed 1 year ago

Frank-Buss commented 1 year ago

Currently when uploading an image, it shows lots of lines which scrolls:

06:42:40 [INFO] 17% uploaded
06:42:40 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
06:42:41 [INFO] 17% uploaded
...

This should be improved with ANSI escape sequences, e.g. move cursor one line up so that it is all displayed in one line, as usual for such progress messages. Probably also a good idea to not print it with the logging crate. And would be nice to have a used time and transfer rate (x kB/s) at the end, and maybe during the process, estimated remaining time.

Frank-Buss commented 1 year ago

implemented in this PR: https://github.com/vouch-opensource/mcumgr-client/pull/6