Commit b8154048 authored by Deucе's avatar Deucе 👌🏾
Browse files

Fix ETA calculation.

Use remaining bytes divided by CPS rather than total estimated time
minus elapsed time.

We squirrley on resumed ZModem downloads.
parent 30921159
Pipeline #2231 passed with stage
in 7 minutes and 46 seconds
......@@ -551,8 +551,7 @@ void zmodem_progress(void* cbdata, int64_t current_pos)
cps=1; /* cps so far */
l=zm->current_file_size/cps; /* total transfer est time */
l-=t; /* now, it's est time left */
l = (zm->current_file_size - current_pos) / cps; /* remaining transfer est time */
if(l<0) l=0;
cprintf("File (%u of %u): %-.*s"
,zm->current_file_num, zm->total_files, TRANSFER_WIN_WIDTH - 20, zm->current_file_name);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment