Parcourir la source

Revert nozzle_bed_fan_menu_items

For some reason that I cannot determine, using a sub-function causes
the Tune sub-menu to act strangely, yet replacing the function call
with its code content works perfectly.
Scott Lahteine il y a 9 ans
Parent
révision
60d5658da8
1 fichiers modifiés avec 55 ajouts et 27 suppressions
  1. 55
    27
      Marlin/ultralcd.cpp

+ 55
- 27
Marlin/ultralcd.cpp Voir le fichier

@@ -504,10 +504,25 @@ void lcd_set_home_offsets() {
504 504
     void watch_temp_callback_E3() {}
505 505
   #endif // EXTRUDERS > 3
506 506
 #endif
507
+
507 508
 /**
508
- * Items shared between Tune and Temperature menus
509
+ *
510
+ * "Tune" submenu
511
+ *
509 512
  */
510
-static void nozzle_bed_fan_menu_items(uint8_t &encoderLine, uint8_t &_lineNr, uint8_t &_drawLineNr, uint8_t &_menuItemNr, bool &wasClicked, bool &itemSelected) {
513
+static void lcd_tune_menu() {
514
+  START_MENU();
515
+
516
+  //
517
+  // ^ Main
518
+  //
519
+  MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
520
+
521
+  //
522
+  // Speed:
523
+  //
524
+  MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999);
525
+
511 526
   //
512 527
   // Nozzle:
513 528
   // Nozzle [1-4]:
@@ -546,29 +561,6 @@ static void nozzle_bed_fan_menu_items(uint8_t &encoderLine, uint8_t &_lineNr, ui
546 561
   // Fan Speed:
547 562
   //
548 563
   MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
549
-}
550
-
551
-
552
-/**
553
- *
554
- * "Tune" submenu
555
- *
556
- */
557
-static void lcd_tune_menu() {
558
-  START_MENU();
559
-
560
-  //
561
-  // ^ Main
562
-  //
563
-  MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
564
-
565
-  //
566
-  // Speed:
567
-  //
568
-  MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999);
569
-
570
-  // Nozzle, Bed, and Fan Control
571
-  nozzle_bed_fan_menu_items(encoderLine, _lineNr, _drawLineNr, _menuItemNr, wasClicked, itemSelected);
572 564
 
573 565
   //
574 566
   // Flow:
@@ -1033,8 +1025,44 @@ static void lcd_control_temperature_menu() {
1033 1025
   //
1034 1026
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
1035 1027
 
1036
-  // Nozzle, Bed, and Fan Control
1037
-  nozzle_bed_fan_menu_items(encoderLine, _lineNr, _drawLineNr, _menuItemNr, wasClicked, itemSelected);
1028
+  //
1029
+  // Nozzle:
1030
+  // Nozzle [1-4]:
1031
+  //
1032
+  #if EXTRUDERS == 1
1033
+    #if TEMP_SENSOR_0 != 0
1034
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
1035
+    #endif
1036
+  #else //EXTRUDERS > 1
1037
+    #if TEMP_SENSOR_0 != 0
1038
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
1039
+    #endif
1040
+    #if TEMP_SENSOR_1 != 0
1041
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
1042
+    #endif
1043
+    #if EXTRUDERS > 2
1044
+      #if TEMP_SENSOR_2 != 0
1045
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
1046
+      #endif
1047
+      #if EXTRUDERS > 3
1048
+        #if TEMP_SENSOR_3 != 0
1049
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
1050
+        #endif
1051
+      #endif // EXTRUDERS > 3
1052
+    #endif // EXTRUDERS > 2
1053
+  #endif // EXTRUDERS > 1
1054
+
1055
+  //
1056
+  // Bed:
1057
+  //
1058
+  #if TEMP_SENSOR_BED != 0
1059
+    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
1060
+  #endif
1061
+
1062
+  //
1063
+  // Fan Speed:
1064
+  //
1065
+  MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
1038 1066
 
1039 1067
   //
1040 1068
   // Autotemp, Min, Max, Fact

Chargement…
Annuler
Enregistrer