pause print statistics
This commit is contained in:
parent
2060d319f5
commit
7b962d666f
3 changed files with 6 additions and 5 deletions
|
@ -1523,7 +1523,8 @@ void get_command()
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_FILE_PRINTED);
|
SERIAL_PROTOCOLLNRPGM(MSG_FILE_PRINTED);
|
||||||
stoptime=millis();
|
stoptime=millis();
|
||||||
char time[30];
|
char time[30];
|
||||||
unsigned long t=(stoptime-starttime)/1000;
|
unsigned long t=(stoptime-starttime-pause_time)/1000;
|
||||||
|
pause_time = 0;
|
||||||
int hours, minutes;
|
int hours, minutes;
|
||||||
minutes=(t/60)%60;
|
minutes=(t/60)%60;
|
||||||
hours=t/60/60;
|
hours=t/60/60;
|
||||||
|
@ -3962,7 +3963,7 @@ Sigma_Exit:
|
||||||
heating_status = 2;
|
heating_status = 2;
|
||||||
if (farm_mode) { prusa_statistics(2); };
|
if (farm_mode) { prusa_statistics(2); };
|
||||||
|
|
||||||
starttime=millis();
|
//starttime=millis();
|
||||||
previous_millis_cmd = millis();
|
previous_millis_cmd = millis();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -545,7 +545,6 @@ void lcd_commands()
|
||||||
enquecommand(cmd1);
|
enquecommand(cmd1);
|
||||||
isPrintPaused = false;
|
isPrintPaused = false;
|
||||||
card.startFileprint();
|
card.startFileprint();
|
||||||
//starttime = pause_time;
|
|
||||||
lcd_commands_step = 0;
|
lcd_commands_step = 0;
|
||||||
lcd_commands_type = 0;
|
lcd_commands_type = 0;
|
||||||
}
|
}
|
||||||
|
@ -3591,7 +3590,8 @@ void lcd_sdcard_stop()
|
||||||
card.closefile();
|
card.closefile();
|
||||||
|
|
||||||
stoptime = millis();
|
stoptime = millis();
|
||||||
unsigned long t = (stoptime - starttime) / 1000; //time in s
|
unsigned long t = (stoptime - starttime - pause_time) / 1000; //time in s
|
||||||
|
pause_time = 0;
|
||||||
save_statistics(total_filament_used, t);
|
save_statistics(total_filament_used, t);
|
||||||
|
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
|
|
|
@ -792,7 +792,7 @@ static void lcd_implementation_status_screen()
|
||||||
lcd.print(LCD_STR_CLOCK[0]);
|
lcd.print(LCD_STR_CLOCK[0]);
|
||||||
if(starttime != 0)
|
if(starttime != 0)
|
||||||
{
|
{
|
||||||
uint16_t time = (isPrintPaused || (!heating_status))? pause_time/60000 : (millis() + pause_time /*- start_time*/)/60000; //is print is paused, pause also print time
|
uint16_t time = millis() / 60000 - starttime / 60000;
|
||||||
lcd.print(itostr2(time/60));
|
lcd.print(itostr2(time/60));
|
||||||
lcd.print(':');
|
lcd.print(':');
|
||||||
lcd.print(itostr2(time%60));
|
lcd.print(itostr2(time%60));
|
||||||
|
|
Loading…
Reference in a new issue