Browse Source

Centralize click-handling in the LCD loop

Scott Lahteine 7 years ago
parent
commit
50ee749082
5 changed files with 72 additions and 115 deletions
  1. 1
    1
      Marlin/Marlin.h
  2. 1
    4
      Marlin/MarlinSerial.cpp
  3. 24
    45
      Marlin/Marlin_main.cpp
  4. 38
    57
      Marlin/ultralcd.cpp
  5. 8
    8
      Marlin/ultralcd.h

+ 1
- 1
Marlin/Marlin.h View File

@@ -270,7 +270,7 @@ extern bool axis_known_position[XYZ]; // axis[n].is_known
270 270
 extern bool axis_homed[XYZ]; // axis[n].is_homed
271 271
 extern volatile bool wait_for_heatup;
272 272
 
273
-#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
273
+#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
274 274
   extern volatile bool wait_for_user;
275 275
 #endif
276 276
 

+ 1
- 4
Marlin/MarlinSerial.cpp View File

@@ -508,10 +508,7 @@ MarlinSerial customizedSerial;
508 508
         if (c == '\n') {
509 509
           switch (state) {
510 510
             case state_M108:
511
-              wait_for_heatup = false;
512
-              #if DISABLED(ULTIPANEL)
513
-                wait_for_user = false;
514
-              #endif
511
+              wait_for_user = wait_for_heatup = false;
515 512
               break;
516 513
             case state_M112:
517 514
               kill(PSTR(MSG_KILLED));

+ 24
- 45
Marlin/Marlin_main.cpp View File

@@ -1046,7 +1046,12 @@ inline void get_serial_commands() {
1046 1046
 
1047 1047
       #if DISABLED(EMERGENCY_PARSER)
1048 1048
         // If command was e-stop process now
1049
-        if (strcmp(command, "M108") == 0) wait_for_heatup = false;
1049
+        if (strcmp(command, "M108") == 0) {
1050
+          wait_for_heatup = false;
1051
+          #if ENABLED(ULTIPANEL)
1052
+            wait_for_user = false;
1053
+          #endif
1054
+        }
1050 1055
         if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
1051 1056
         if (strcmp(command, "M410") == 0) { quickstop_stepper(); }
1052 1057
       #endif
@@ -4414,7 +4419,6 @@ inline void gcode_G92() {
4414 4419
           dontExpireStatus();
4415 4420
         #endif
4416 4421
       }
4417
-      lcd_ignore_click();
4418 4422
 
4419 4423
     #else
4420 4424
 
@@ -4425,53 +4429,28 @@ inline void gcode_G92() {
4425 4429
 
4426 4430
     #endif
4427 4431
 
4428
-    #if ENABLED(EMERGENCY_PARSER)
4429
-      wait_for_user = true;
4430
-    #endif
4431
-
4432
+    wait_for_user = true;
4432 4433
     KEEPALIVE_STATE(PAUSED_FOR_USER);
4433 4434
 
4434 4435
     stepper.synchronize();
4435 4436
     refresh_cmd_timeout();
4436 4437
 
4437
-    #if ENABLED(ULTIPANEL)
4438
-
4439
-      #if ENABLED(EMERGENCY_PARSER)
4440
-        #define M1_WAIT_CONDITION (!lcd_clicked() && wait_for_user)
4438
+    if (codenum > 0) {
4439
+      codenum += previous_cmd_ms;  // wait until this time for a click
4440
+      while (PENDING(millis(), codenum) && wait_for_user) idle();
4441
+    }
4442
+    else {
4443
+      #if ENABLED(ULTIPANEL)
4444
+        if (lcd_detected()) {
4445
+          while (wait_for_user) idle();
4446
+          IS_SD_PRINTING ? LCD_MESSAGEPGM(MSG_RESUMING) : LCD_MESSAGEPGM(WELCOME_MSG);
4447
+        }
4441 4448
       #else
4442
-        #define M1_WAIT_CONDITION !lcd_clicked()
4449
+        while (wait_for_user) idle();
4443 4450
       #endif
4451
+    }
4444 4452
 
4445
-      if (codenum > 0) {
4446
-        codenum += previous_cmd_ms;  // wait until this time for a click
4447
-        while (PENDING(millis(), codenum) && M1_WAIT_CONDITION) idle();
4448
-        lcd_ignore_click(false);
4449
-      }
4450
-      else if (lcd_detected()) {
4451
-        while (M1_WAIT_CONDITION) idle();
4452
-      }
4453
-      else goto ExitM1;
4454
-
4455
-      IS_SD_PRINTING ? LCD_MESSAGEPGM(MSG_RESUMING) : LCD_MESSAGEPGM(WELCOME_MSG);
4456
-
4457
-    #else
4458
-
4459
-      if (codenum > 0) {
4460
-        codenum += previous_cmd_ms;  // wait until this time for an M108
4461
-        while (PENDING(millis(), codenum) && wait_for_user) idle();
4462
-      }
4463
-      else while (wait_for_user) idle();
4464
-
4465
-    #endif
4466
-
4467
-#if ENABLED(ULTIPANEL)
4468
-  ExitM1:
4469
-#endif
4470
-
4471
-    #if ENABLED(EMERGENCY_PARSER)
4472
-      wait_for_user = false;
4473
-    #endif
4474
-
4453
+    wait_for_user = false;
4475 4454
     KEEPALIVE_STATE(IN_HANDLER);
4476 4455
   }
4477 4456
 
@@ -6874,7 +6853,10 @@ inline void gcode_M503() {
6874 6853
     // Wait for filament insert by user and press button
6875 6854
     lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INSERT);
6876 6855
 
6877
-    while (!lcd_clicked()) {
6856
+    // LCD click or M108 will clear this
6857
+    wait_for_user = true;
6858
+
6859
+    while (wait_for_user) {
6878 6860
       #if HAS_BUZZER
6879 6861
         millis_t ms = millis();
6880 6862
         if (ms >= next_buzz) {
@@ -6884,9 +6866,6 @@ inline void gcode_M503() {
6884 6866
       #endif
6885 6867
       idle(true);
6886 6868
     }
6887
-    delay(100);
6888
-    while (lcd_clicked()) idle(true);
6889
-    delay(100);
6890 6869
 
6891 6870
     // Show load message
6892 6871
     lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_LOAD);

+ 38
- 57
Marlin/ultralcd.cpp View File

@@ -243,7 +243,6 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
243 243
    *
244 244
    * START_MENU    Opening code for a screen with menu items.
245 245
    *               Scroll as-needed to keep the selected line in view.
246
-   *               'wasClicked' indicates the controller was clicked.
247 246
    */
248 247
   #define START_SCREEN() \
249 248
     START_SCREEN_OR_MENU(LCD_HEIGHT); \
@@ -257,7 +256,6 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
257 256
     if (encoderLine >= encoderTopLine + LCD_HEIGHT) { \
258 257
       encoderTopLine = encoderLine - (LCD_HEIGHT - 1); \
259 258
     } \
260
-    bool wasClicked = LCD_CLICKED; \
261 259
     bool _skipStatic = true; \
262 260
     SCREEN_OR_MENU_LOOP()
263 261
 
@@ -288,8 +286,7 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
288 286
     if (_menuLineNr == _thisItemNr) { \
289 287
       if (lcdDrawUpdate) \
290 288
         lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
291
-      if (wasClicked && encoderLine == _thisItemNr) { \
292
-        lcd_quick_feedback()
289
+      if (lcd_clicked && encoderLine == _thisItemNr) {
293 290
 
294 291
   #define _MENU_ITEM_PART_2(TYPE, ...) \
295 292
         menu_action_ ## TYPE(__VA_ARGS__); \
@@ -381,9 +378,8 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
381 378
   menuPosition screen_history[10];
382 379
   uint8_t screen_history_depth = 0;
383 380
 
384
-  bool ignore_click = false;
385
-  bool wait_for_unclick;
386
-  bool defer_return_to_status = false;
381
+  // LCD and menu clicks
382
+  bool lcd_clicked, wait_for_unclick, defer_return_to_status;
387 383
 
388 384
   // Variables used when editing values.
389 385
   const char* editLabel;
@@ -392,9 +388,9 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
392 388
   screenFunc_t callbackFunc;              // call this after editing
393 389
 
394 390
   /**
395
-   * General function to go directly to a menu
391
+   * General function to go directly to a screen
396 392
    */
397
-  static void lcd_goto_screen(screenFunc_t screen, const bool feedback = false, const uint32_t encoder = 0) {
393
+  static void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0) {
398 394
     if (currentScreen != screen) {
399 395
       currentScreen = screen;
400 396
       encoderPosition = encoder;
@@ -402,7 +398,6 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
402 398
         defer_return_to_status = false;
403 399
         screen_history_depth = 0;
404 400
       }
405
-      if (feedback) lcd_quick_feedback();
406 401
       lcd_implementation_clear();
407 402
       #if ENABLED(LCD_PROGRESS_BAR)
408 403
         // For LCD_PROGRESS_BAR re-initialize custom characters
@@ -427,7 +422,6 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
427 422
       --screen_history_depth;
428 423
       lcd_goto_screen(
429 424
         screen_history[screen_history_depth].menu_function,
430
-        feedback,
431 425
         screen_history[screen_history_depth].encoder_position
432 426
       );
433 427
     }
@@ -435,11 +429,6 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
435 429
       lcd_return_to_status();
436 430
   }
437 431
 
438
-  void lcd_ignore_click(bool b) {
439
-    ignore_click = b;
440
-    wait_for_unclick = false;
441
-  }
442
-
443 432
 #endif // ULTIPANEL
444 433
 
445 434
 /**
@@ -493,23 +482,7 @@ static void lcd_status_screen() {
493 482
 
494 483
   #if ENABLED(ULTIPANEL)
495 484
 
496
-    bool current_click = LCD_CLICKED;
497
-
498
-    if (ignore_click) {
499
-      if (wait_for_unclick) {
500
-        if (!current_click)
501
-          ignore_click = wait_for_unclick = false;
502
-        else
503
-          current_click = false;
504
-      }
505
-      else if (current_click) {
506
-        lcd_quick_feedback();
507
-        wait_for_unclick = true;
508
-        current_click = false;
509
-      }
510
-    }
511
-
512
-    if (current_click) {
485
+    if (lcd_clicked) {
513 486
       #if ENABLED(FILAMENT_LCD_DISPLAY)
514 487
         previous_lcd_status_ms = millis();  // get status message to show up for a while
515 488
       #endif
@@ -518,7 +491,7 @@ static void lcd_status_screen() {
518 491
           false
519 492
         #endif
520 493
       );
521
-      lcd_goto_screen(lcd_main_menu, true);
494
+      lcd_goto_screen(lcd_main_menu);
522 495
     }
523 496
 
524 497
     #if ENABLED(ULTIPANEL_FEEDMULTIPLY)
@@ -676,7 +649,7 @@ void kill_screen(const char* lcd_msg) {
676 649
     long babysteps_done = 0;
677 650
 
678 651
     static void _lcd_babystep(const AxisEnum axis, const char* msg) {
679
-      if (LCD_CLICKED) { defer_return_to_status = false; lcd_goto_previous_menu(true); return; }
652
+      if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(true); }
680 653
       ENCODER_DIRECTION_NORMAL();
681 654
       if (encoderPosition) {
682 655
         int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
@@ -1092,12 +1065,12 @@ void kill_screen(const char* lcd_msg) {
1092 1065
       }
1093 1066
 
1094 1067
       static bool debounce_click = false;
1095
-      if (LCD_CLICKED) {
1068
+      if (lcd_clicked) {
1096 1069
         if (!debounce_click) {
1097 1070
           debounce_click = true; // ignore multiple "clicks" in a row
1098 1071
           mbl.set_zigzag_z(_lcd_level_bed_position++, current_position[Z_AXIS]);
1099 1072
           if (_lcd_level_bed_position == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
1100
-            lcd_goto_screen(_lcd_level_bed_done, true);
1073
+            lcd_goto_screen(_lcd_level_bed_done);
1101 1074
 
1102 1075
             current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT;
1103 1076
             line_to_current(Z_AXIS);
@@ -1113,7 +1086,7 @@ void kill_screen(const char* lcd_msg) {
1113 1086
             #endif
1114 1087
           }
1115 1088
           else {
1116
-            lcd_goto_screen(_lcd_level_goto_next_point, true);
1089
+            lcd_goto_screen(_lcd_level_goto_next_point);
1117 1090
           }
1118 1091
         }
1119 1092
       }
@@ -1171,7 +1144,7 @@ void kill_screen(const char* lcd_msg) {
1171 1144
      */
1172 1145
     static void _lcd_level_bed_homing_done() {
1173 1146
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
1174
-      if (LCD_CLICKED) {
1147
+      if (lcd_clicked) {
1175 1148
         _lcd_level_bed_position = 0;
1176 1149
         current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
1177 1150
           #if Z_HOME_DIR > 0
@@ -1179,7 +1152,7 @@ void kill_screen(const char* lcd_msg) {
1179 1152
           #endif
1180 1153
         ;
1181 1154
         planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1182
-        lcd_goto_screen(_lcd_level_goto_next_point, true);
1155
+        lcd_goto_screen(_lcd_level_goto_next_point);
1183 1156
       }
1184 1157
     }
1185 1158
 
@@ -1385,7 +1358,7 @@ void kill_screen(const char* lcd_msg) {
1385 1358
    */
1386 1359
 
1387 1360
   static void _lcd_move_xyz(const char* name, AxisEnum axis) {
1388
-    if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1361
+    if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1389 1362
     ENCODER_DIRECTION_NORMAL();
1390 1363
     if (encoderPosition) {
1391 1364
       refresh_cmd_timeout();
@@ -1425,7 +1398,7 @@ void kill_screen(const char* lcd_msg) {
1425 1398
       int8_t eindex=-1
1426 1399
     #endif
1427 1400
   ) {
1428
-    if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1401
+    if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1429 1402
     ENCODER_DIRECTION_NORMAL();
1430 1403
     if (encoderPosition) {
1431 1404
       current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale;
@@ -1924,7 +1897,7 @@ void kill_screen(const char* lcd_msg) {
1924 1897
    */
1925 1898
   #if HAS_LCD_CONTRAST
1926 1899
     static void lcd_set_contrast() {
1927
-      if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
1900
+      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1928 1901
       ENCODER_DIRECTION_NORMAL();
1929 1902
       if (encoderPosition) {
1930 1903
         set_lcd_contrast(lcd_contrast + encoderPosition);
@@ -1991,7 +1964,7 @@ void kill_screen(const char* lcd_msg) {
1991 1964
      */
1992 1965
     void lcd_sdcard_menu() {
1993 1966
       ENCODER_DIRECTION_MENUS();
1994
-      if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
1967
+      if (!lcdDrawUpdate && !lcd_clicked) return; // nothing to do (so don't thrash the SD card)
1995 1968
       uint16_t fileCnt = card.getnrfilenames();
1996 1969
       START_MENU();
1997 1970
       MENU_BACK(MSG_MAIN);
@@ -2037,7 +2010,7 @@ void kill_screen(const char* lcd_msg) {
2037 2010
        *
2038 2011
        */
2039 2012
       static void lcd_info_stats_menu() {
2040
-        if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
2013
+        if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2041 2014
 
2042 2015
         char buffer[21];
2043 2016
         printStatistics stats = print_job_timer.getStats();
@@ -2071,7 +2044,7 @@ void kill_screen(const char* lcd_msg) {
2071 2044
      *
2072 2045
      */
2073 2046
     static void lcd_info_thermistors_menu() {
2074
-      if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
2047
+      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2075 2048
       START_SCREEN();
2076 2049
       #define THERMISTOR_ID TEMP_SENSOR_0
2077 2050
       #include "thermistornames.h"
@@ -2123,7 +2096,7 @@ void kill_screen(const char* lcd_msg) {
2123 2096
      *
2124 2097
      */
2125 2098
     static void lcd_info_board_menu() {
2126
-      if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
2099
+      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2127 2100
       START_SCREEN();
2128 2101
       STATIC_ITEM(BOARD_NAME, true, true);                           // MyPrinterController
2129 2102
       STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000
@@ -2144,7 +2117,7 @@ void kill_screen(const char* lcd_msg) {
2144 2117
      *
2145 2118
      */
2146 2119
     static void lcd_info_printer_menu() {
2147
-      if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
2120
+      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2148 2121
       START_SCREEN();
2149 2122
       STATIC_ITEM(MSG_MARLIN, true, true);                             // Marlin
2150 2123
       STATIC_ITEM(SHORT_BUILD_VERSION, true);                          // x.x.x-Branch
@@ -2334,16 +2307,15 @@ void kill_screen(const char* lcd_msg) {
2334 2307
   #define menu_edit_type(_type, _name, _strFunc, scale) \
2335 2308
     bool _menu_edit_ ## _name () { \
2336 2309
       ENCODER_DIRECTION_NORMAL(); \
2337
-      bool isClicked = LCD_CLICKED; \
2338 2310
       if ((int32_t)encoderPosition < 0) encoderPosition = 0; \
2339 2311
       if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \
2340 2312
       if (lcdDrawUpdate) \
2341 2313
         lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) / scale)); \
2342
-      if (isClicked) { \
2314
+      if (lcd_clicked) { \
2343 2315
         *((_type*)editValue) = ((_type)((int32_t)encoderPosition + minEditValue)) / scale; \
2344 2316
         lcd_goto_previous_menu(true); \
2345 2317
       } \
2346
-      return isClicked; \
2318
+      return lcd_clicked; \
2347 2319
     } \
2348 2320
     void menu_edit_ ## _name () { _menu_edit_ ## _name(); } \
2349 2321
     void menu_edit_callback_ ## _name () { if (_menu_edit_ ## _name ()) (*callbackFunc)(); } \
@@ -2614,9 +2586,20 @@ void lcd_update() {
2614 2586
   #if ENABLED(ULTIPANEL)
2615 2587
     static millis_t return_to_status_ms = 0;
2616 2588
     manage_manual_move();
2617
-  #endif
2618 2589
 
2619
-  lcd_buttons_update();
2590
+    lcd_buttons_update();
2591
+
2592
+    // If the action button is pressed...
2593
+    if (LCD_CLICKED) {
2594
+      if (!wait_for_unclick) {           // If not waiting for a debounce release:
2595
+        wait_for_unclick = true;         //  Set debounce flag to ignore continous clicks
2596
+        lcd_clicked = !wait_for_user;    //  Keep the click if not waiting for a user-click
2597
+        wait_for_user = false;           //  Any click clears wait for user
2598
+        lcd_quick_feedback();            //  Always make a click sound
2599
+      }
2600
+    }
2601
+    else wait_for_unclick = false;
2602
+  #endif
2620 2603
 
2621 2604
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
2622 2605
 
@@ -2691,7 +2674,7 @@ void lcd_update() {
2691 2674
       #endif // REPRAPWORLD_KEYPAD
2692 2675
 
2693 2676
       bool encoderPastThreshold = (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP);
2694
-      if (encoderPastThreshold || LCD_CLICKED) {
2677
+      if (encoderPastThreshold || lcd_clicked) {
2695 2678
         if (encoderPastThreshold) {
2696 2679
           int32_t encoderMultiplier = 1;
2697 2680
 
@@ -2757,7 +2740,7 @@ void lcd_update() {
2757 2740
       }
2758 2741
 
2759 2742
       #if ENABLED(ULTIPANEL)
2760
-        #define CURRENTSCREEN() (*currentScreen)()
2743
+        #define CURRENTSCREEN() (*currentScreen)(), lcd_clicked = false
2761 2744
       #else
2762 2745
         #define CURRENTSCREEN() lcd_status_screen()
2763 2746
       #endif
@@ -3020,8 +3003,6 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
3020 3003
     #endif
3021 3004
   }
3022 3005
 
3023
-  bool lcd_clicked() { return LCD_CLICKED; }
3024
-
3025 3006
 #endif // ULTIPANEL
3026 3007
 
3027 3008
 #endif // ULTRA_LCD

+ 8
- 8
Marlin/ultralcd.h View File

@@ -68,8 +68,6 @@
68 68
     extern volatile uint8_t buttons;  //the last checked buttons in a bit array.
69 69
     void lcd_buttons_update();
70 70
     void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
71
-    bool lcd_clicked();
72
-    void lcd_ignore_click(bool b=true);
73 71
 
74 72
     #if ENABLED(FILAMENT_CHANGE_FEATURE)
75 73
       void lcd_filament_change_show_message(FilamentChangeMessage message);
@@ -79,12 +77,12 @@
79 77
     FORCE_INLINE void lcd_buttons_update() {}
80 78
   #endif
81 79
 
82
-  extern int preheatHotendTemp1;
83
-  extern int preheatBedTemp1;
84
-  extern int preheatFanSpeed1;
85
-  extern int preheatHotendTemp2;
86
-  extern int preheatBedTemp2;
87
-  extern int preheatFanSpeed2;
80
+  extern int preheatHotendTemp1,
81
+             preheatBedTemp1,
82
+             preheatFanSpeed1,
83
+             preheatHotendTemp2,
84
+             preheatBedTemp2,
85
+             preheatFanSpeed2;
88 86
 
89 87
   #if ENABLED(FILAMENT_LCD_DISPLAY)
90 88
     extern millis_t previous_lcd_status_ms;
@@ -150,6 +148,8 @@
150 148
     #define LCD_CLICKED ((buttons & EN_C) || (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F1))
151 149
   #elif ENABLED(NEWPANEL)
152 150
     #define LCD_CLICKED (buttons & EN_C)
151
+  #else
152
+    #define LCD_CLICKED false
153 153
   #endif
154 154
 
155 155
 #else //no LCD

Loading…
Cancel
Save