|
@@ -942,16 +942,15 @@ void lcd_implementation_drawedit(const char* pstr, const char* value) {
|
942
|
942
|
|
943
|
943
|
static uint8_t lcd_implementation_read_slow_buttons() {
|
944
|
944
|
#if ENABLED(LCD_I2C_TYPE_MCP23017)
|
945
|
|
- uint8_t slow_buttons;
|
946
|
945
|
// Reading these buttons this is likely to be too slow to call inside interrupt context
|
947
|
946
|
// so they are called during normal lcd_update
|
948
|
|
- slow_buttons = lcd.readButtons() << B_I2C_BTN_OFFSET;
|
|
947
|
+ uint8_t slow_bits = lcd.readButtons() << B_I2C_BTN_OFFSET;
|
949
|
948
|
#if ENABLED(LCD_I2C_VIKI)
|
950
|
|
- if ((slow_buttons & (B_MI | B_RI)) && millis() < next_button_update_ms) // LCD clicked
|
951
|
|
- slow_buttons &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated
|
952
|
|
- #endif
|
953
|
|
- return slow_buttons;
|
954
|
|
- #endif
|
|
949
|
+ if ((slow_bits & (B_MI | B_RI)) && millis() < next_button_update_ms) // LCD clicked
|
|
950
|
+ slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated
|
|
951
|
+ #endif // LCD_I2C_VIKI
|
|
952
|
+ return slow_bits;
|
|
953
|
+ #endif // LCD_I2C_TYPE_MCP23017
|
955
|
954
|
}
|
956
|
955
|
|
957
|
956
|
#endif // LCD_HAS_SLOW_BUTTONS
|