consume click

This commit is contained in:
PavelSindler 2018-12-07 18:31:30 +01:00
parent 9adf441d5c
commit 6d6de67c3f

View file

@ -3239,6 +3239,7 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg)
const char *msg_next = lcd_display_message_fullscreen_P(msg);
bool multi_screen = msg_next != NULL;
lcd_set_custom_characters_nextpage();
lcd_consume_click();
KEEPALIVE_STATE(PAUSED_FOR_USER);
// Until confirmed by a button click.
for (;;) {
@ -3283,7 +3284,7 @@ bool lcd_wait_for_click_delay(uint16_t nDelay)
{
bool bDelayed;
long nTime0 = millis()/1000;
lcd_consume_click();
KEEPALIVE_STATE(PAUSED_FOR_USER);
for (;;) {
manage_heater();
@ -3332,6 +3333,7 @@ int8_t lcd_show_multiscreen_message_two_choices_and_wait_P(const char *msg, bool
// Wait for user confirmation or a timeout.
unsigned long previous_millis_cmd = millis();
int8_t enc_dif = lcd_encoder_diff;
lcd_consume_click();
//KEEPALIVE_STATE(PAUSED_FOR_USER);
for (;;) {
for (uint8_t i = 0; i < 100; ++i) {
@ -3421,6 +3423,7 @@ int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow
// Wait for user confirmation or a timeout.
unsigned long previous_millis_cmd = millis();
int8_t enc_dif = lcd_encoder_diff;
lcd_consume_click();
KEEPALIVE_STATE(PAUSED_FOR_USER);
for (;;) {
if (allow_timeouting && millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS)