Add status_printf to print messages to the lcd status line.

Also add a hotend indicator to the heating message displayed on the lcd status line.
This commit is contained in:
dot-bob
2017-02-20 01:51:07 -07:00
committed by Scott Lahteine
parent 012aff6823
commit cd68380ce6
3 changed files with 14 additions and 2 deletions

View File

@ -3272,6 +3272,16 @@ void lcd_setstatuspgm(const char* const message, uint8_t level) {
lcd_finishstatus(level > 0);
}
void status_printf(uint8_t level, const char *status, ...) {
if (level < lcd_status_message_level) return;
lcd_status_message_level = level;
va_list args;
va_start(args, status);
vsnprintf(lcd_status_message, 3 * (LCD_WIDTH), status, args);
va_end(args);
lcd_finishstatus(level > 0);
}
void lcd_setalertstatuspgm(const char* const message) {
lcd_setstatuspgm(message, 1);
#if ENABLED(ULTIPANEL)