Browse Source

Fix Move E menu items

Scott Lahteine 10 years ago
parent
commit
5bc480fee8
1 changed files with 26 additions and 6 deletions
  1. 26
    6
      Marlin/ultralcd.cpp

+ 26
- 6
Marlin/ultralcd.cpp View File

809
 static void lcd_move_y() { _lcd_move(PSTR(MSG_MOVE_Y), Y_AXIS, Y_MIN_POS, Y_MAX_POS); }
809
 static void lcd_move_y() { _lcd_move(PSTR(MSG_MOVE_Y), Y_AXIS, Y_MIN_POS, Y_MAX_POS); }
810
 static void lcd_move_z() { _lcd_move(PSTR(MSG_MOVE_Z), Z_AXIS, Z_MIN_POS, Z_MAX_POS); }
810
 static void lcd_move_z() { _lcd_move(PSTR(MSG_MOVE_Z), Z_AXIS, Z_MIN_POS, Z_MAX_POS); }
811
 static void lcd_move_e(
811
 static void lcd_move_e(
812
-#if EXTRUDERS > 1
813
-  uint8_t e = 0
814
-#endif
812
+  #if EXTRUDERS > 1
813
+    uint8_t e
814
+  #endif
815
 ) {
815
 ) {
816
   #if EXTRUDERS > 1
816
   #if EXTRUDERS > 1
817
     unsigned short original_active_extruder = active_extruder;
817
     unsigned short original_active_extruder = active_extruder;
823
     line_to_current(E_AXIS);
823
     line_to_current(E_AXIS);
824
     lcdDrawUpdate = 1;
824
     lcdDrawUpdate = 1;
825
   }
825
   }
826
-  if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_MOVE_E), ftostr31(current_position[E_AXIS]));
826
+  if (lcdDrawUpdate) {
827
+    PGM_P pos_label;
828
+    #if EXTRUDERS == 1
829
+      pos_label = PSTR(MSG_MOVE_E);
830
+    #else
831
+      switch (e) {
832
+        case 0: pos_label = PSTR(MSG_MOVE_E0); break;
833
+        case 1: pos_label = PSTR(MSG_MOVE_E1); break;
834
+        #if EXTRUDERS > 2
835
+          case 2: pos_label = PSTR(MSG_MOVE_E2); break;
836
+          #if EXTRUDERS > 3
837
+            case 3: pos_label = PSTR(MSG_MOVE_E3); break;
838
+          #endif //EXTRUDERS > 3
839
+        #endif //EXTRUDERS > 2
840
+      }
841
+    #endif //EXTRUDERS > 1
842
+    lcd_implementation_drawedit(pos_label, ftostr31(current_position[E_AXIS]));
843
+  }
827
   if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
844
   if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
828
   #if EXTRUDERS > 1
845
   #if EXTRUDERS > 1
829
     active_extruder = original_active_extruder;
846
     active_extruder = original_active_extruder;
831
 }
848
 }
832
 
849
 
833
 #if EXTRUDERS > 1
850
 #if EXTRUDERS > 1
851
+  static void lcd_move_e0() { lcd_move_e(0); }
834
   static void lcd_move_e1() { lcd_move_e(1); }
852
   static void lcd_move_e1() { lcd_move_e(1); }
835
   #if EXTRUDERS > 2
853
   #if EXTRUDERS > 2
836
     static void lcd_move_e2() { lcd_move_e(2); }
854
     static void lcd_move_e2() { lcd_move_e(2); }
853
   MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
871
   MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
854
   if (move_menu_scale < 10.0) {
872
   if (move_menu_scale < 10.0) {
855
     MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
873
     MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
856
-    MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
857
-    #if EXTRUDERS > 1
874
+    #if EXTRUDERS == 1
875
+      MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
876
+    #else
877
+      MENU_ITEM(submenu, MSG_MOVE_E0, lcd_move_e0);
858
       MENU_ITEM(submenu, MSG_MOVE_E1, lcd_move_e1);
878
       MENU_ITEM(submenu, MSG_MOVE_E1, lcd_move_e1);
859
       #if EXTRUDERS > 2
879
       #if EXTRUDERS > 2
860
         MENU_ITEM(submenu, MSG_MOVE_E2, lcd_move_e2);
880
         MENU_ITEM(submenu, MSG_MOVE_E2, lcd_move_e2);

Loading…
Cancel
Save