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