Browse Source

Rename local slow_buttons for clarity

Scott Lahteine 8 years ago
parent
commit
f2ffc8b28b
1 changed files with 6 additions and 7 deletions
  1. 6
    7
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 6
- 7
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

942
 
942
 
943
   static uint8_t lcd_implementation_read_slow_buttons() {
943
   static uint8_t lcd_implementation_read_slow_buttons() {
944
     #if ENABLED(LCD_I2C_TYPE_MCP23017)
944
     #if ENABLED(LCD_I2C_TYPE_MCP23017)
945
-      uint8_t slow_buttons;
946
       // Reading these buttons this is likely to be too slow to call inside interrupt context
945
       // Reading these buttons this is likely to be too slow to call inside interrupt context
947
       // so they are called during normal lcd_update
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
       #if ENABLED(LCD_I2C_VIKI)
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
 #endif // LCD_HAS_SLOW_BUTTONS
956
 #endif // LCD_HAS_SLOW_BUTTONS

Loading…
Cancel
Save