Fix print time overflow.

This commit is contained in:
Marek Bel 2018-09-19 17:17:32 +02:00
parent 0d4f4fe933
commit b5bb40474d

View file

@ -2468,10 +2468,10 @@ void lcd_menu_statistics()
{
float _met = ((float)total_filament_used) / (100000.f);
int _cm = (total_filament_used - (_met * 100000)) / 10;
int _t = (millis() - starttime) / 1000;
uint32_t _t = (millis() - starttime) / 1000;
int _h = _t / 3600;
int _m = (_t - (_h * 3600)) / 60;
int _s = _t - ((_h * 3600) + (_m * 60));
int _m = (_t - (_h * 3600ul)) / 60;
int _s = _t - ((_h * 3600ul) + (_m * 60));
//|01234567890123456789|
//|Filament used: |
//| 000m 00.000cm |