Browse Source

Merge pull request #4491 from thinkyhead/rc_fix_lcd_move_e

Use a default argument in _lcd_move_e
Scott Lahteine 8 years ago
parent
commit
34c60f1b55
2 changed files with 32 additions and 32 deletions
  1. 29
    28
      Marlin/pins_RAMBO.h
  2. 3
    4
      Marlin/ultralcd.cpp

+ 29
- 28
Marlin/pins_RAMBO.h View File

@@ -114,9 +114,6 @@
114 114
 
115 115
   #if ENABLED(NEWPANEL)
116 116
 
117
-    // Beeper on AUX-4
118
-    #define BEEPER_PIN 79
119
-
120 117
     #define LCD_PINS_RS 70
121 118
     #define LCD_PINS_ENABLE 71
122 119
     #define LCD_PINS_D4 72
@@ -124,12 +121,36 @@
124 121
     #define LCD_PINS_D6 74
125 122
     #define LCD_PINS_D7 75
126 123
 
127
-    //buttons are directly attached using AUX-2
128
-    #define BTN_EN1 76
129
-    #define BTN_EN2 77
130
-    #define BTN_ENC 78
124
+    #if ENABLED(VIKI2) || ENABLED(miniVIKI)
125
+      #define BEEPER_PIN 44
126
+
127
+      #define DOGLCD_A0  70
128
+      #define DOGLCD_CS  71
129
+      #define LCD_SCREEN_ROT_180
130
+
131
+      #define BTN_EN1 85
132
+      #define BTN_EN2 84
133
+      #define BTN_ENC 83
134
+
135
+      #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
136
+
137
+      #if ENABLED(TEMP_STAT_LEDS)
138
+        #define STAT_LED_RED      22
139
+        #define STAT_LED_BLUE     32
140
+      #endif
131 141
 
132
-    #define SD_DETECT_PIN 81 // Ramps doesn't use this
142
+    #else
143
+
144
+      #define BEEPER_PIN 79 // AUX-4
145
+
146
+      // AUX-2
147
+      #define BTN_EN1 76
148
+      #define BTN_EN2 77
149
+      #define BTN_ENC 78
150
+
151
+      #define SD_DETECT_PIN 81
152
+
153
+    #endif // VIKI2/miniVIKI
133 154
 
134 155
   #else //!NEWPANEL - old style panel with shift register
135 156
 
@@ -154,23 +175,3 @@
154 175
 
155 176
 #endif // ULTRA_LCD
156 177
 
157
-#if ENABLED(VIKI2) || ENABLED(miniVIKI)
158
-  #define BEEPER_PIN 44
159
-  // Pins for DOGM SPI LCD Support
160
-  #define DOGLCD_A0  70
161
-  #define DOGLCD_CS  71
162
-  #define LCD_SCREEN_ROT_180
163
-
164
-  //The encoder and click button
165
-  #define BTN_EN1 85
166
-  #define BTN_EN2 84
167
-  #define BTN_ENC 83
168
-
169
-  #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
170
-
171
-  #if ENABLED(TEMP_STAT_LEDS)
172
-    #define STAT_LED_RED      22
173
-    #define STAT_LED_BLUE     32
174
-  #endif
175
-#endif // VIKI2/miniVIKI
176
-

+ 3
- 4
Marlin/ultralcd.cpp View File

@@ -1359,7 +1359,7 @@ void kill_screen(const char* lcd_msg) {
1359 1359
   static void lcd_move_z() { _lcd_move_xyz(PSTR(MSG_MOVE_Z), Z_AXIS, sw_endstop_min[Z_AXIS], sw_endstop_max[Z_AXIS]); }
1360 1360
   static void _lcd_move_e(
1361 1361
     #if E_MANUAL > 1
1362
-      int8_t eindex
1362
+      int8_t eindex=-1
1363 1363
     #endif
1364 1364
   ) {
1365 1365
     if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
@@ -1437,9 +1437,8 @@ void kill_screen(const char* lcd_msg) {
1437 1437
           MENU_ITEM(gcode, MSG_SELECT MSG_E2, PSTR("T1"));
1438 1438
       #endif
1439 1439
 
1440
-      #if E_MANUAL == 1
1441
-        MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
1442
-      #else
1440
+      MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
1441
+      #if E_MANUAL > 1
1443 1442
         MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E1, lcd_move_e0);
1444 1443
         MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E2, lcd_move_e1);
1445 1444
         #if E_MANUAL > 2

Loading…
Cancel
Save