|
@ -444,13 +444,13 @@ void lcd_update() { |
|
|
// If there was a print in progress, we need to emit the final
|
|
|
// If there was a print in progress, we need to emit the final
|
|
|
// print status as {TQ:100}. Reset last percent done so a new print will
|
|
|
// print status as {TQ:100}. Reset last percent done so a new print will
|
|
|
// issue a percent of 0.
|
|
|
// issue a percent of 0.
|
|
|
const uint8_t percent_done = card.sdprinting ? card.percentDone() : last_printing_status ? 100 : 0; |
|
|
const uint8_t percent_done = IS_SD_PRINTING() ? card.percentDone() : last_printing_status ? 100 : 0; |
|
|
if (percent_done != last_percent_done) { |
|
|
if (percent_done != last_percent_done) { |
|
|
char message_buffer[10]; |
|
|
char message_buffer[10]; |
|
|
sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); |
|
|
sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); |
|
|
write_to_lcd(message_buffer); |
|
|
write_to_lcd(message_buffer); |
|
|
last_percent_done = percent_done; |
|
|
last_percent_done = percent_done; |
|
|
last_printing_status = card.sdprinting; |
|
|
last_printing_status = IS_SD_PRINTING(); |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|