From f2ffc8b28b943315c53983479557d32bad96a160 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 27 Mar 2016 03:15:10 -0700 Subject: [PATCH] Rename local slow_buttons for clarity --- Marlin/ultralcd_implementation_hitachi_HD44780.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 52a4926a0..f63d5f91d 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -942,16 +942,15 @@ void lcd_implementation_drawedit(const char* pstr, const char* value) { static uint8_t lcd_implementation_read_slow_buttons() { #if ENABLED(LCD_I2C_TYPE_MCP23017) - uint8_t slow_buttons; // Reading these buttons this is likely to be too slow to call inside interrupt context // so they are called during normal lcd_update - slow_buttons = lcd.readButtons() << B_I2C_BTN_OFFSET; + uint8_t slow_bits = lcd.readButtons() << B_I2C_BTN_OFFSET; #if ENABLED(LCD_I2C_VIKI) - if ((slow_buttons & (B_MI | B_RI)) && millis() < next_button_update_ms) // LCD clicked - slow_buttons &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated - #endif - return slow_buttons; - #endif + if ((slow_bits & (B_MI | B_RI)) && millis() < next_button_update_ms) // LCD clicked + slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated + #endif // LCD_I2C_VIKI + return slow_bits; + #endif // LCD_I2C_TYPE_MCP23017 } #endif // LCD_HAS_SLOW_BUTTONS