Fix print time display.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define CUSTOM_BUILD_VERSION "1.5.0-b4"
|
||||
#define CUSTOM_BUILD_VERSION "1.5.0-b5"
|
||||
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2023-05-24"
|
||||
|
@@ -1283,13 +1283,14 @@
|
||||
break;
|
||||
case 7: // A7 GET PRINTING TIME
|
||||
{
|
||||
const uint32_t elapsedSeconds = getProgress_seconds_elapsed();
|
||||
SEND_PGM("A7V ");
|
||||
if (starttime != 0) { // print time
|
||||
uint16_t time = millis() / 60000 - starttime / 60000;
|
||||
SEND(itostr2(time / 60));
|
||||
if (elapsedSeconds != 0) { // print time
|
||||
const uint32_t elapsedMinutes = elapsedSeconds / 60;
|
||||
SEND(ui8tostr2(elapsedMinutes / 60));
|
||||
SEND_PGM(" H ");
|
||||
SEND(itostr2(time % 60));
|
||||
SEND_PGM(" M");
|
||||
SEND(ui8tostr2(elapsedMinutes % 60));
|
||||
SENDLINE_PGM(" M");
|
||||
}
|
||||
else
|
||||
SENDLINE_PGM(" 999:999");
|
||||
|
Reference in New Issue
Block a user