Browse Source

Changed slow buttons behavior.

Erik van der Zalm 11 years ago
parent
commit
a94e588765
2 changed files with 13 additions and 4 deletions
  1. 1
    1
      Marlin/Configuration_adv.h
  2. 12
    3
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/Configuration_adv.h View File

@@ -366,7 +366,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
366 366
 #endif
367 367
 
368 368
 // Control heater 0 and heater 1 in parallel.
369
-#define HEATERS_PARALLEL
369
+//#define HEATERS_PARALLEL
370 370
 
371 371
 //===========================================================================
372 372
 //=============================Buffers           ============================

+ 12
- 3
Marlin/ultralcd.cpp View File

@@ -142,6 +142,9 @@ volatile uint8_t buttons;//Contains the bits of the currently pressed buttons.
142 142
 #else
143 143
 volatile uint8_t buttons_reprapworld_keypad; // to store the reprapworld_keypad shiftregister values
144 144
 #endif
145
+#ifdef LCD_HAS_SLOW_BUTTONS
146
+volatile uint8_t slow_buttons;//Contains the bits of the currently pressed buttons.
147
+#endif
145 148
 uint8_t currentMenuViewOffset;              /* scroll offset in the current menu */
146 149
 uint32_t blocking_enc;
147 150
 uint8_t lastEncoderBits;
@@ -1013,6 +1016,9 @@ void lcd_init()
1013 1016
     WRITE(SDCARDDETECT, HIGH);
1014 1017
     lcd_oldcardstatus = IS_SD_INSERTED;
1015 1018
 #endif//(SDCARDDETECT > 0)
1019
+    #ifdef LCD_HAS_SLOW_BUTTONS
1020
+    slow_buttons = 0;
1021
+    #endif
1016 1022
     lcd_buttons_update();
1017 1023
 #ifdef ULTIPANEL    
1018 1024
     encoderDiff = 0;
@@ -1023,12 +1029,12 @@ void lcd_update()
1023 1029
 {
1024 1030
     static unsigned long timeoutToStatus = 0;
1025 1031
     
1026
-    lcd_buttons_update();
1027
-    
1028 1032
     #ifdef LCD_HAS_SLOW_BUTTONS
1029
-    buttons |= lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
1033
+    slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context
1030 1034
     #endif
1031 1035
     
1036
+    lcd_buttons_update();
1037
+    
1032 1038
     #if (SDCARDDETECT > 0)
1033 1039
     if((IS_SD_INSERTED != lcd_oldcardstatus))
1034 1040
     {
@@ -1170,6 +1176,9 @@ void lcd_buttons_update()
1170 1176
         newbutton |= EN_C;
1171 1177
   #endif
1172 1178
     buttons = newbutton;
1179
+    #ifdef LCD_HAS_SLOW_BUTTONS
1180
+    buttons |= slow_buttons;
1181
+    #endif
1173 1182
     #ifdef REPRAPWORLD_KEYPAD
1174 1183
       // for the reprapworld_keypad
1175 1184
       uint8_t newbutton_reprapworld_keypad=0;

Loading…
Cancel
Save