Add CLOCK_INTERVAL_TIME and ShortTimer IntervalTimer

This commit is contained in:
3d-gussner 2021-02-10 16:18:47 +01:00
parent b9a3fa2ddd
commit 14b4bf5fa5
2 changed files with 15 additions and 7 deletions

View file

@ -338,6 +338,12 @@ const unsigned int dropsegments=5; //everything with less than this number of st
// Control heater 0 and heater 1 in parallel.
//#define HEATERS_PARALLEL
//LCD status clock interval timer to switch between
// print time
// remaining print time
// and time to change/pause/interaction
#define CLOCK_INTERVAL_TIME 5000
//===========================================================================
//=============================Buffers ============================
//===========================================================================

View file

@ -673,6 +673,7 @@ void lcdui_print_time(void)
{
//if remaining print time estimation is available print it else print elapsed time
int chars = 0;
ShortTimer IntervalTimer;
if ((PRINTER_ACTIVE) && (starttime != 0))
{
uint16_t print_t = 0;
@ -708,17 +709,18 @@ void lcdui_print_time(void)
}
#endif //TMC2130
if (print_tc != 0)
{
print_t = print_tc;
suff = 'C';
}
else if (print_tr != 0)
if (print_tr != 0)
{
print_t = print_tr;
suff = 'R';
}
else
else if (print_tc != 0)
{
print_t = print_tc;
suff = 'C';
}
if (print_tr == 0)
{
print_t = _millis() / 60000 - starttime / 60000;
}