From b5bb40474d3dbd73e0f6f67e4bc1d25349574159 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Wed, 19 Sep 2018 17:17:32 +0200 Subject: [PATCH] Fix print time overflow. --- Firmware/ultralcd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index b78b4c97..fcfcd799 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -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 |