Browse Source

Merge pull request #5140 from esenapaj/Follow-up-the-PR-#5089

Follow-up the PR #5089 (Centralize click-handling in the LCD loop)
Scott Lahteine 8 years ago
parent
commit
1ee0fdcad7
1 changed files with 10 additions and 10 deletions
  1. 10
    10
      Marlin/ultralcd.cpp

+ 10
- 10
Marlin/ultralcd.cpp View File

@@ -416,7 +416,7 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
416 416
     }
417 417
   }
418 418
 
419
-  static void lcd_goto_previous_menu(bool feedback=false) {
419
+  static void lcd_goto_previous_menu() {
420 420
     if (screen_history_depth > 0) {
421 421
       --screen_history_depth;
422 422
       lcd_goto_screen(
@@ -648,7 +648,7 @@ void kill_screen(const char* lcd_msg) {
648 648
     long babysteps_done = 0;
649 649
 
650 650
     static void _lcd_babystep(const AxisEnum axis, const char* msg) {
651
-      if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(true); }
651
+      if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(); }
652 652
       ENCODER_DIRECTION_NORMAL();
653 653
       if (encoderPosition) {
654 654
         int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
@@ -1357,7 +1357,7 @@ void kill_screen(const char* lcd_msg) {
1357 1357
    */
1358 1358
 
1359 1359
   static void _lcd_move_xyz(const char* name, AxisEnum axis) {
1360
-    if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1360
+    if (lcd_clicked) { return lcd_goto_previous_menu(); }
1361 1361
     ENCODER_DIRECTION_NORMAL();
1362 1362
     if (encoderPosition) {
1363 1363
       refresh_cmd_timeout();
@@ -1397,7 +1397,7 @@ void kill_screen(const char* lcd_msg) {
1397 1397
       int8_t eindex=-1
1398 1398
     #endif
1399 1399
   ) {
1400
-    if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1400
+    if (lcd_clicked) { return lcd_goto_previous_menu(); }
1401 1401
     ENCODER_DIRECTION_NORMAL();
1402 1402
     if (encoderPosition) {
1403 1403
       current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale;
@@ -1884,7 +1884,7 @@ void kill_screen(const char* lcd_msg) {
1884 1884
    */
1885 1885
   #if HAS_LCD_CONTRAST
1886 1886
     static void lcd_set_contrast() {
1887
-      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1887
+      if (lcd_clicked) { return lcd_goto_previous_menu(); }
1888 1888
       ENCODER_DIRECTION_NORMAL();
1889 1889
       if (encoderPosition) {
1890 1890
         set_lcd_contrast(lcd_contrast + encoderPosition);
@@ -1997,7 +1997,7 @@ void kill_screen(const char* lcd_msg) {
1997 1997
        *
1998 1998
        */
1999 1999
       static void lcd_info_stats_menu() {
2000
-        if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2000
+        if (lcd_clicked) { return lcd_goto_previous_menu(); }
2001 2001
 
2002 2002
         char buffer[21];
2003 2003
         printStatistics stats = print_job_timer.getStats();
@@ -2031,7 +2031,7 @@ void kill_screen(const char* lcd_msg) {
2031 2031
      *
2032 2032
      */
2033 2033
     static void lcd_info_thermistors_menu() {
2034
-      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2034
+      if (lcd_clicked) { return lcd_goto_previous_menu(); }
2035 2035
       START_SCREEN();
2036 2036
       #define THERMISTOR_ID TEMP_SENSOR_0
2037 2037
       #include "thermistornames.h"
@@ -2083,7 +2083,7 @@ void kill_screen(const char* lcd_msg) {
2083 2083
      *
2084 2084
      */
2085 2085
     static void lcd_info_board_menu() {
2086
-      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2086
+      if (lcd_clicked) { return lcd_goto_previous_menu(); }
2087 2087
       START_SCREEN();
2088 2088
       STATIC_ITEM(BOARD_NAME, true, true);                           // MyPrinterController
2089 2089
       STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000
@@ -2104,7 +2104,7 @@ void kill_screen(const char* lcd_msg) {
2104 2104
      *
2105 2105
      */
2106 2106
     static void lcd_info_printer_menu() {
2107
-      if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2107
+      if (lcd_clicked) { return lcd_goto_previous_menu(); }
2108 2108
       START_SCREEN();
2109 2109
       STATIC_ITEM(MSG_MARLIN, true, true);                             // Marlin
2110 2110
       STATIC_ITEM(SHORT_BUILD_VERSION, true);                          // x.x.x-Branch
@@ -2300,7 +2300,7 @@ void kill_screen(const char* lcd_msg) {
2300 2300
         lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) / scale)); \
2301 2301
       if (lcd_clicked) { \
2302 2302
         *((_type*)editValue) = ((_type)((int32_t)encoderPosition + minEditValue)) / scale; \
2303
-        lcd_goto_previous_menu(true); \
2303
+        lcd_goto_previous_menu(); \
2304 2304
       } \
2305 2305
       return lcd_clicked; \
2306 2306
     } \

Loading…
Cancel
Save