Add CLOCK_INTERVAL_TIME and ShortTimer IntervalTimer
This commit is contained in:
parent
b9a3fa2ddd
commit
14b4bf5fa5
|
|
@ -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.
|
// Control heater 0 and heater 1 in parallel.
|
||||||
//#define HEATERS_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 ============================
|
//=============================Buffers ============================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
||||||
|
|
@ -673,6 +673,7 @@ void lcdui_print_time(void)
|
||||||
{
|
{
|
||||||
//if remaining print time estimation is available print it else print elapsed time
|
//if remaining print time estimation is available print it else print elapsed time
|
||||||
int chars = 0;
|
int chars = 0;
|
||||||
|
ShortTimer IntervalTimer;
|
||||||
if ((PRINTER_ACTIVE) && (starttime != 0))
|
if ((PRINTER_ACTIVE) && (starttime != 0))
|
||||||
{
|
{
|
||||||
uint16_t print_t = 0;
|
uint16_t print_t = 0;
|
||||||
|
|
@ -708,17 +709,18 @@ void lcdui_print_time(void)
|
||||||
}
|
}
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
|
||||||
if (print_tc != 0)
|
if (print_tr != 0)
|
||||||
{
|
|
||||||
print_t = print_tc;
|
|
||||||
suff = 'C';
|
|
||||||
}
|
|
||||||
else if (print_tr != 0)
|
|
||||||
{
|
{
|
||||||
print_t = print_tr;
|
print_t = print_tr;
|
||||||
suff = 'R';
|
suff = 'R';
|
||||||
}
|
}
|
||||||
else
|
else if (print_tc != 0)
|
||||||
|
{
|
||||||
|
print_t = print_tc;
|
||||||
|
suff = 'C';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (print_tr == 0)
|
||||||
{
|
{
|
||||||
print_t = _millis() / 60000 - starttime / 60000;
|
print_t = _millis() / 60000 - starttime / 60000;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue