modified timestamp format to HH:MM:SS.
authorMichael Moore <mmoore@wahoofitness.com>
Wed, 12 Oct 2016 02:05:56 +0000 (22:05 -0400)
committerMichael Moore <mmoore@wahoofitness.com>
Wed, 12 Oct 2016 02:05:56 +0000 (22:05 -0400)
- modified watch screen time format.
- modified 'progress' command time format.

src/modules/utils/panel/screens/3dprinter/WatchScreen.cpp
src/modules/utils/player/Player.cpp

index 6581fb9..b381e72 100644 (file)
@@ -250,7 +250,7 @@ void WatchScreen::display_menu_line(uint16_t line)
             break;
         }
         case 1: THEPANEL->lcd->printf("X%4d Y%4d Z%7.2f", (int)round(this->pos[0]), (int)round(this->pos[1]), this->pos[2]); break;
-        case 2: THEPANEL->lcd->printf("%3d%% %2lu:%02lu %3u%% sd", this->current_speed, this->elapsed_time / 60, this->elapsed_time % 60, this->sd_pcnt_played); break;
+               case 2: THEPANEL->lcd->printf("%3d%% %02lu:%02lu:%02lu %3u%% sd", this->current_speed, this->elapsed_time / 3600, (this->elapsed_time % 3600) / 60, this->elapsed_time % 60, this->sd_pcnt_played); break;
         case 3: THEPANEL->lcd->printf("%19s", this->get_status()); break;
     }
 }
index 4cd1a09..6c81c5f 100644 (file)
@@ -342,9 +342,9 @@ void Player::progress_command( string parameters, StreamOutput *stream )
         unsigned int pcnt = (file_size - (file_size - played_cnt)) * 100 / file_size;
         // If -b or -B is passed, report in the format used by Marlin and the others.
         if (!sdprinting) {
-            stream->printf("file: %s, %u %% complete, elapsed time: %lu s", this->filename.c_str(), pcnt, this->elapsed_secs);
+            stream->printf("file: %s, %u %% complete, elapsed time: %02lu:%02lu:%02lu", this->filename.c_str(), pcnt, this->elapsed_secs / 3600, (this->elapsed_secs % 3600) / 60, this->elapsed_secs % 60);
             if(est > 0) {
-                stream->printf(", est time: %lu s",  est);
+                stream->printf(", est time: %02lu:%02lu:%02lu",  est / 3600, (est % 3600) / 60, est % 60);
             }
             stream->printf("\r\n");
         } else {