Fix timer issue
The remaining time stays for ~5 seconds while the change time stays just for ~1 second
This commit is contained in:
parent
14b4bf5fa5
commit
cf982b0d4d
|
|
@ -673,7 +673,6 @@ 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;
|
||||||
|
|
@ -681,6 +680,8 @@ void lcdui_print_time(void)
|
||||||
uint16_t print_tc = 0;
|
uint16_t print_tc = 0;
|
||||||
char suff = ' ';
|
char suff = ' ';
|
||||||
char suff_doubt = ' ';
|
char suff_doubt = ' ';
|
||||||
|
static ShortTimer IntervalTimer;
|
||||||
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
if (SilentModeMenu != SILENT_MODE_OFF)
|
if (SilentModeMenu != SILENT_MODE_OFF)
|
||||||
|
|
@ -714,10 +715,15 @@ void lcdui_print_time(void)
|
||||||
print_t = print_tr;
|
print_t = print_tr;
|
||||||
suff = 'R';
|
suff = 'R';
|
||||||
}
|
}
|
||||||
else if (print_tc != 0)
|
|
||||||
|
if (print_tc != 0)
|
||||||
{
|
{
|
||||||
print_t = print_tc;
|
if (IntervalTimer.expired(5000))
|
||||||
suff = 'C';
|
{
|
||||||
|
print_t = print_tc;
|
||||||
|
suff = 'C';
|
||||||
|
IntervalTimer.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print_tr == 0)
|
if (print_tr == 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue