-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow stopwatch and printcounter to go over 18:12:15 #4287
Allow stopwatch and printcounter to go over 18:12:15 #4287
Conversation
259eb10
to
54e955b
Compare
@MarlinFirmware/host-software-team |
Stock OctoPrint doesn't even parse M31 output, so wouldn't be affected by any changes there. Don't know about other hosts though. |
@thinkyhead Oh, good idea to prevent overflow! I was trying to do exactly the same yesterday, but I wasn't successful enough to push it. I'm not sure, what But strange things happened and this snippet sprintf(printTime, "%02ud %02uh %02um",
(uint16_t)(stats.printTime / 86400),
((uint32_t)(stats.printTime / 60)) % 60,
((uint32_t)(stats.printTime / 3600)) % 24
); doesn't work on Arduino while in online C++ Shell does. I would certainly implement days, since @clexpert's printer is printing more than someone would expect. 😄 |
A search of the source code reveals… typedef unsigned long millis_t;
I would suggest instead… sprintf(printTime, "%id %02ih %02im",
int(stats.printTime / 60 / 60 / 24),
int(stats.printTime / 60 / 60) % 60,
int(stats.printTime / 60) % 60
); |
fcbdb68
to
f48dba3
Compare
5e3afc6
to
febf394
Compare
febf394
to
1618870
Compare
#define MSG_INFO_PRINT_TIME "Gesamte Druckzeit" | ||
|
||
#if LCD_WIDTH > 19 | ||
#define MSG_INFO_TOTAL_PRINTS "Gesamte Drucke " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that MSG_INFO_PRINT_COUNT
is right.
Excuse me I've a question, are |
I can't find their usage anywhere in the code (current RCBugfix).. maybe on a unmerged PR ? |
Yesterday removed with 34da77d |
Hmm, guess those strings are now obsolete. Print time on the display is now coming from M31. |
I see, thus I'll remove those from language files that I'm managing. |
Follow-up and fix the PR #4287 (Allow stopwatch and printcounter to go over 18:12:15)
a bit late here, but just to confirm that Cura LE also doesn't use M31 and counts the print time internally (and stops/resumes the counter when user pauses/resumes the print). |
…ntcounter to go over 18:12:15) ・Remove MSG_END_HOUR and MSG_END_MINUTE from all the language files ・Change from MSG_INFO_TOTAL_PRINTS to MSG_INFO_PRINT_COUNT in German file
Addressing #4195
After 18 hours, 12 minutes, and 16 seconds, a 16-bit integer counting seconds will overflow. This PR alters variables in stopwatch and printcounter to use
millis_t
instead of 16-bit integers.M31
to include days in its outputM31
at the end of an SD print rather than custom-printing the time