Преглед изворни кода

Changed slow buttons behavior.

Erik van der Zalm пре 11 година
родитељ
комит
a94e588765
2 измењених фајлова са 13 додато и 4 уклоњено
  1. 1
    1
      Marlin/Configuration_adv.h
  2. 12
    3
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/Configuration_adv.h Прегледај датотеку

366
 #endif
366
 #endif
367
 
367
 
368
 // Control heater 0 and heater 1 in parallel.
368
 // Control heater 0 and heater 1 in parallel.
369
-#define HEATERS_PARALLEL
369
+//#define HEATERS_PARALLEL
370
 
370
 
371
 //===========================================================================
371
 //===========================================================================
372
 //=============================Buffers           ============================
372
 //=============================Buffers           ============================

+ 12
- 3
Marlin/ultralcd.cpp Прегледај датотеку

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

Loading…
Откажи
Сачувај