added confirm character for messages which waits for user to press the knob

This commit is contained in:
PavelSindler 2017-09-13 15:41:19 +02:00
parent c3e01dd449
commit 827a9ce6cb
2 changed files with 33 additions and 8 deletions

View File

@ -2096,13 +2096,13 @@ const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines)
}
if (multi_screen) {
// Display the "next screen" indicator character.
// lcd_set_custom_characters_arrows();
lcd_set_custom_characters_nextpage();
lcd.setCursor(19, 3);
// Display the "next screen" indicator character.
// lcd_set_custom_characters_arrows();
lcd_set_custom_characters_nextpage();
lcd.setCursor(19, 3);
// Display the down arrow.
lcd.print(char(1));
}
}
nlines = row;
return multi_screen ? msgend : NULL;
@ -2123,15 +2123,30 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg)
while (lcd_clicked()) ;
delay(10);
while (lcd_clicked()) ;
lcd_set_custom_characters();
lcd_update_enable(true);
lcd_update(2);
KEEPALIVE_STATE(IN_HANDLER);
return;
}
}
if (multi_screen) {
if (msg_next == NULL)
msg_next = msg;
if (msg_next == NULL)
msg_next = msg;
msg_next = lcd_display_message_fullscreen_P(msg_next);
}
if (msg_next == NULL) {
lcd_set_custom_characters_nextpage();
lcd.setCursor(19, 3);
// Display the confirm char.
lcd.print(char(2));
}
}
else {
lcd_set_custom_characters_nextpage();
lcd.setCursor(19, 3);
// Display the confirm char.
lcd.print(char(2));
}
}
}

View File

@ -491,8 +491,18 @@ void lcd_set_custom_characters_nextpage()
B01010,
B00100
};
byte confirm[8] = {
B00000,
B00001,
B00011,
B10110,
B11100,
B01000,
B00000
};
lcd.createChar(1, arrdown);
lcd.createChar(2, confirm);
}
void lcd_set_custom_characters_degree()