Просмотр исходного кода

Move Advanced Settings Menu to its own file

Scott Lahteine 6 лет назад
Родитель
Сommit
d87ab3ed20
2 измененных файлов: 632 добавлений и 596 удалений
  1. 0
    596
      Marlin/src/lcd/menu/menu.cpp
  2. 632
    0
      Marlin/src/lcd/menu/menu_advanced.cpp

+ 0
- 596
Marlin/src/lcd/menu/menu.cpp Просмотреть файл

@@ -53,10 +53,6 @@
53 53
   #include "../../libs/duration_t.h"
54 54
 #endif
55 55
 
56
-#if ENABLED(BLTOUCH)
57
-  #include "../../module/endstops.h"
58
-#endif
59
-
60 56
 #if HAS_LEVELING
61 57
   #include "../../feature/bedlevel/bedlevel.h"
62 58
 #endif
@@ -92,10 +88,6 @@ int32_t minEditValue, maxEditValue;
92 88
 screenFunc_t callbackFunc;
93 89
 bool liveEdit;
94 90
 
95
-#if ENABLED(PIDTEMP)
96
-  float raw_Ki, raw_Kd; // place-holders for Ki and Kd edits
97
-#endif
98
-
99 91
 bool no_reentry = false;
100 92
 
101 93
 // Initialized by settings.load()
@@ -251,10 +243,6 @@ void menu_action_setting_edit_callback_bool(PGM_P pstr, bool* ptr, screenFunc_t
251 243
 ///////////////// Menu Tree ////////////////
252 244
 ////////////////////////////////////////////
253 245
 
254
-#if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
255
-  void menu_advanced_filament();
256
-#endif
257
-
258 246
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
259 247
   #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
260 248
     void menu_change_filament();
@@ -661,18 +649,6 @@ void watch_temp_callback_bed() {
661 649
 #if ENABLED(EEPROM_SETTINGS)
662 650
   void lcd_store_settings()   { lcd_completion_feedback(settings.save()); }
663 651
   void lcd_load_settings()    { lcd_completion_feedback(settings.load()); }
664
-  #if DISABLED(SLIM_LCD_MENUS)
665
-    static void lcd_init_eeprom() {
666
-      lcd_completion_feedback(settings.init_eeprom());
667
-      lcd_goto_previous_menu();
668
-    }
669
-    static void lcd_init_eeprom_confirm() {
670
-      START_MENU();
671
-      MENU_BACK(MSG_ADVANCED_SETTINGS);
672
-      MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom);
673
-      END_MENU();
674
-    }
675
-  #endif
676 652
 #endif
677 653
 
678 654
 void _lcd_draw_homing() {
@@ -783,578 +759,6 @@ void _lcd_draw_homing() {
783 759
 
784 760
 #endif // DELTA_CALIBRATION_MENU || DELTA_AUTO_CALIBRATION
785 761
 
786
-/**
787
- *
788
- * "Temperature" submenu
789
- *
790
- */
791
-
792
-#if ENABLED(PID_AUTOTUNE_MENU)
793
-
794
-  #if ENABLED(PIDTEMP)
795
-    int16_t autotune_temp[HOTENDS] = ARRAY_BY_HOTENDS1(150);
796
-  #endif
797
-
798
-  #if ENABLED(PIDTEMPBED)
799
-    int16_t autotune_temp_bed = 70;
800
-  #endif
801
-
802
-  void _lcd_autotune(int16_t e) {
803
-    char cmd[30];
804
-    sprintf_P(cmd, PSTR("M303 U1 E%i S%i"), e,
805
-      #if HAS_PID_FOR_BOTH
806
-        e < 0 ? autotune_temp_bed : autotune_temp[e]
807
-      #elif ENABLED(PIDTEMPBED)
808
-        autotune_temp_bed
809
-      #else
810
-        autotune_temp[e]
811
-      #endif
812
-    );
813
-    lcd_enqueue_command(cmd);
814
-  }
815
-
816
-#endif // PID_AUTOTUNE_MENU
817
-
818
-#if ENABLED(PIDTEMP)
819
-
820
-  // Helpers for editing PID Ki & Kd values
821
-  // grab the PID value out of the temp variable; scale it; then update the PID driver
822
-  void copy_and_scalePID_i(int16_t e) {
823
-    #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1
824
-      UNUSED(e);
825
-    #endif
826
-    PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
827
-    thermalManager.updatePID();
828
-  }
829
-  void copy_and_scalePID_d(int16_t e) {
830
-    #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1
831
-      UNUSED(e);
832
-    #endif
833
-    PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
834
-    thermalManager.updatePID();
835
-  }
836
-  #define _DEFINE_PIDTEMP_BASE_FUNCS(N) \
837
-    void copy_and_scalePID_i_E ## N() { copy_and_scalePID_i(N); } \
838
-    void copy_and_scalePID_d_E ## N() { copy_and_scalePID_d(N); }
839
-
840
-  #if ENABLED(PID_AUTOTUNE_MENU)
841
-    #define DEFINE_PIDTEMP_FUNCS(N) \
842
-      _DEFINE_PIDTEMP_BASE_FUNCS(N); \
843
-      void lcd_autotune_callback_E ## N() { _lcd_autotune(N); } typedef void _pid_##N##_void
844
-  #else
845
-    #define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N) typedef void _pid_##N##_void
846
-  #endif
847
-
848
-  DEFINE_PIDTEMP_FUNCS(0);
849
-  #if ENABLED(PID_PARAMS_PER_HOTEND)
850
-    #if HOTENDS > 1
851
-      DEFINE_PIDTEMP_FUNCS(1);
852
-      #if HOTENDS > 2
853
-        DEFINE_PIDTEMP_FUNCS(2);
854
-        #if HOTENDS > 3
855
-          DEFINE_PIDTEMP_FUNCS(3);
856
-          #if HOTENDS > 4
857
-            DEFINE_PIDTEMP_FUNCS(4);
858
-            #if HOTENDS > 5
859
-              DEFINE_PIDTEMP_FUNCS(5);
860
-            #endif // HOTENDS > 5
861
-          #endif // HOTENDS > 4
862
-        #endif // HOTENDS > 3
863
-      #endif // HOTENDS > 2
864
-    #endif // HOTENDS > 1
865
-  #endif // PID_PARAMS_PER_HOTEND
866
-
867
-#endif // PIDTEMP
868
-
869
-/**
870
- *
871
- * "Advanced Settings" -> "Temperature" submenu
872
- *
873
- */
874
-void menu_advanced_temperature() {
875
-  START_MENU();
876
-  MENU_BACK(MSG_ADVANCED_SETTINGS);
877
-  //
878
-  // Autotemp, Min, Max, Fact
879
-  //
880
-  #if ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND
881
-    MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
882
-    MENU_ITEM_EDIT(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
883
-    MENU_ITEM_EDIT(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
884
-    MENU_ITEM_EDIT(float52, MSG_FACTOR, &planner.autotemp_factor, 0, 1);
885
-  #endif
886
-
887
-  //
888
-  // PID-P, PID-I, PID-D, PID-C, PID Autotune
889
-  // PID-P E1, PID-I E1, PID-D E1, PID-C E1, PID Autotune E1
890
-  // PID-P E2, PID-I E2, PID-D E2, PID-C E2, PID Autotune E2
891
-  // PID-P E3, PID-I E3, PID-D E3, PID-C E3, PID Autotune E3
892
-  // PID-P E4, PID-I E4, PID-D E4, PID-C E4, PID Autotune E4
893
-  // PID-P E5, PID-I E5, PID-D E5, PID-C E5, PID Autotune E5
894
-  //
895
-  #if ENABLED(PIDTEMP)
896
-
897
-    #define _PID_BASE_MENU_ITEMS(ELABEL, eindex) \
898
-      raw_Ki = unscalePID_i(PID_PARAM(Ki, eindex)); \
899
-      raw_Kd = unscalePID_d(PID_PARAM(Kd, eindex)); \
900
-      MENU_ITEM_EDIT(float52sign, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \
901
-      MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_I ELABEL, &raw_Ki, 0.01f, 9990, copy_and_scalePID_i_E ## eindex); \
902
-      MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex)
903
-
904
-    #if ENABLED(PID_EXTRUSION_SCALING)
905
-      #define _PID_MENU_ITEMS(ELABEL, eindex) \
906
-        _PID_BASE_MENU_ITEMS(ELABEL, eindex); \
907
-        MENU_ITEM_EDIT(float3, MSG_PID_C ELABEL, &PID_PARAM(Kc, eindex), 1, 9990)
908
-    #else
909
-      #define _PID_MENU_ITEMS(ELABEL, eindex) _PID_BASE_MENU_ITEMS(ELABEL, eindex)
910
-    #endif
911
-
912
-    #if ENABLED(PID_AUTOTUNE_MENU)
913
-      #define PID_MENU_ITEMS(ELABEL, eindex) \
914
-        _PID_MENU_ITEMS(ELABEL, eindex); \
915
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex)
916
-    #else
917
-      #define PID_MENU_ITEMS(ELABEL, eindex) _PID_MENU_ITEMS(ELABEL, eindex)
918
-    #endif
919
-
920
-    #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1
921
-      PID_MENU_ITEMS(" " MSG_E1, 0);
922
-      PID_MENU_ITEMS(" " MSG_E2, 1);
923
-      #if HOTENDS > 2
924
-        PID_MENU_ITEMS(" " MSG_E3, 2);
925
-        #if HOTENDS > 3
926
-          PID_MENU_ITEMS(" " MSG_E4, 3);
927
-          #if HOTENDS > 4
928
-            PID_MENU_ITEMS(" " MSG_E5, 4);
929
-            #if HOTENDS > 5
930
-              PID_MENU_ITEMS(" " MSG_E6, 5);
931
-            #endif // HOTENDS > 5
932
-          #endif // HOTENDS > 4
933
-        #endif // HOTENDS > 3
934
-      #endif // HOTENDS > 2
935
-    #else // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
936
-      PID_MENU_ITEMS("", 0);
937
-    #endif // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
938
-
939
-  #endif // PIDTEMP
940
-
941
-  END_MENU();
942
-}
943
-
944
-#if DISABLED(SLIM_LCD_MENUS)
945
-
946
-  void _reset_acceleration_rates() { planner.reset_acceleration_rates(); }
947
-  #if ENABLED(DISTINCT_E_FACTORS)
948
-    void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) _reset_acceleration_rates(); }
949
-    void _reset_e0_acceleration_rate() { _reset_e_acceleration_rate(0); }
950
-    void _reset_e1_acceleration_rate() { _reset_e_acceleration_rate(1); }
951
-    #if E_STEPPERS > 2
952
-      void _reset_e2_acceleration_rate() { _reset_e_acceleration_rate(2); }
953
-      #if E_STEPPERS > 3
954
-        void _reset_e3_acceleration_rate() { _reset_e_acceleration_rate(3); }
955
-        #if E_STEPPERS > 4
956
-          void _reset_e4_acceleration_rate() { _reset_e_acceleration_rate(4); }
957
-          #if E_STEPPERS > 5
958
-            void _reset_e5_acceleration_rate() { _reset_e_acceleration_rate(5); }
959
-          #endif // E_STEPPERS > 5
960
-        #endif // E_STEPPERS > 4
961
-      #endif // E_STEPPERS > 3
962
-    #endif // E_STEPPERS > 2
963
-  #endif
964
-
965
-  void _planner_refresh_positioning() { planner.refresh_positioning(); }
966
-  #if ENABLED(DISTINCT_E_FACTORS)
967
-    void _planner_refresh_e_positioning(const uint8_t e) {
968
-      if (e == active_extruder)
969
-        _planner_refresh_positioning();
970
-      else
971
-        planner.steps_to_mm[E_AXIS + e] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS + e];
972
-    }
973
-    void _planner_refresh_e0_positioning() { _planner_refresh_e_positioning(0); }
974
-    void _planner_refresh_e1_positioning() { _planner_refresh_e_positioning(1); }
975
-    #if E_STEPPERS > 2
976
-      void _planner_refresh_e2_positioning() { _planner_refresh_e_positioning(2); }
977
-      #if E_STEPPERS > 3
978
-        void _planner_refresh_e3_positioning() { _planner_refresh_e_positioning(3); }
979
-        #if E_STEPPERS > 4
980
-          void _planner_refresh_e4_positioning() { _planner_refresh_e_positioning(4); }
981
-          #if E_STEPPERS > 5
982
-            void _planner_refresh_e5_positioning() { _planner_refresh_e_positioning(5); }
983
-          #endif // E_STEPPERS > 5
984
-        #endif // E_STEPPERS > 4
985
-      #endif // E_STEPPERS > 3
986
-    #endif // E_STEPPERS > 2
987
-  #endif
988
-
989
-  // M203 / M205 Velocity options
990
-  void menu_advanced_velocity() {
991
-    START_MENU();
992
-    MENU_BACK(MSG_ADVANCED_SETTINGS);
993
-
994
-    // M203 Max Feedrate
995
-    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_A, &planner.settings.max_feedrate_mm_s[A_AXIS], 1, 999);
996
-    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_B, &planner.settings.max_feedrate_mm_s[B_AXIS], 1, 999);
997
-    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_C, &planner.settings.max_feedrate_mm_s[C_AXIS], 1, 999);
998
-
999
-    #if ENABLED(DISTINCT_E_FACTORS)
1000
-      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS + active_extruder], 1, 999);
1001
-      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E1, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, 999);
1002
-      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E2, &planner.settings.max_feedrate_mm_s[E_AXIS + 1], 1, 999);
1003
-      #if E_STEPPERS > 2
1004
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E3, &planner.settings.max_feedrate_mm_s[E_AXIS + 2], 1, 999);
1005
-        #if E_STEPPERS > 3
1006
-          MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E4, &planner.settings.max_feedrate_mm_s[E_AXIS + 3], 1, 999);
1007
-          #if E_STEPPERS > 4
1008
-            MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E5, &planner.settings.max_feedrate_mm_s[E_AXIS + 4], 1, 999);
1009
-            #if E_STEPPERS > 5
1010
-              MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E6, &planner.settings.max_feedrate_mm_s[E_AXIS + 5], 1, 999);
1011
-            #endif // E_STEPPERS > 5
1012
-          #endif // E_STEPPERS > 4
1013
-        #endif // E_STEPPERS > 3
1014
-      #endif // E_STEPPERS > 2
1015
-    #else
1016
-      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, 999);
1017
-    #endif
1018
-
1019
-    // M205 S Min Feedrate
1020
-    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMIN, &planner.settings.min_feedrate_mm_s, 0, 999);
1021
-
1022
-    // M205 T Min Travel Feedrate
1023
-    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.settings.min_travel_feedrate_mm_s, 0, 999);
1024
-
1025
-    END_MENU();
1026
-  }
1027
-
1028
-  // M201 / M204 Accelerations
1029
-  void menu_advanced_acceleration() {
1030
-    START_MENU();
1031
-    MENU_BACK(MSG_ADVANCED_SETTINGS);
1032
-
1033
-    // M204 P Acceleration
1034
-    MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_ACC, &planner.settings.acceleration, 10, 99000);
1035
-
1036
-    // M204 R Retract Acceleration
1037
-    MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, 99000);
1038
-
1039
-    // M204 T Travel Acceleration
1040
-    MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 100, 99000);
1041
-
1042
-    // M201 settings
1043
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_A, &planner.settings.max_acceleration_mm_per_s2[A_AXIS], 100, 99000, _reset_acceleration_rates);
1044
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_B, &planner.settings.max_acceleration_mm_per_s2[B_AXIS], 100, 99000, _reset_acceleration_rates);
1045
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_C, &planner.settings.max_acceleration_mm_per_s2[C_AXIS], 10, 99000, _reset_acceleration_rates);
1046
-
1047
-    #if ENABLED(DISTINCT_E_FACTORS)
1048
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + active_extruder], 100, 99000, _reset_acceleration_rates);
1049
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E1, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_e0_acceleration_rate);
1050
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E2, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 1], 100, 99000, _reset_e1_acceleration_rate);
1051
-      #if E_STEPPERS > 2
1052
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E3, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 2], 100, 99000, _reset_e2_acceleration_rate);
1053
-        #if E_STEPPERS > 3
1054
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E4, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 3], 100, 99000, _reset_e3_acceleration_rate);
1055
-          #if E_STEPPERS > 4
1056
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E5, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 4], 100, 99000, _reset_e4_acceleration_rate);
1057
-            #if E_STEPPERS > 5
1058
-              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E6, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 5], 100, 99000, _reset_e5_acceleration_rate);
1059
-            #endif // E_STEPPERS > 5
1060
-          #endif // E_STEPPERS > 4
1061
-        #endif // E_STEPPERS > 3
1062
-      #endif // E_STEPPERS > 2
1063
-    #else
1064
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
1065
-    #endif
1066
-
1067
-    END_MENU();
1068
-  }
1069
-
1070
-  // M205 Jerk
1071
-  void menu_advanced_jerk() {
1072
-    START_MENU();
1073
-    MENU_BACK(MSG_ADVANCED_SETTINGS);
1074
-
1075
-    #if ENABLED(JUNCTION_DEVIATION)
1076
-      #if ENABLED(LIN_ADVANCE)
1077
-        MENU_ITEM_EDIT_CALLBACK(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f, planner.recalculate_max_e_jerk);
1078
-      #else
1079
-        MENU_ITEM_EDIT(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f);
1080
-      #endif
1081
-    #endif
1082
-    #if HAS_CLASSIC_JERK
1083
-      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VA_JERK, &planner.max_jerk[A_AXIS], 1, 990);
1084
-      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VB_JERK, &planner.max_jerk[B_AXIS], 1, 990);
1085
-      #if ENABLED(DELTA)
1086
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 1, 990);
1087
-      #else
1088
-        MENU_MULTIPLIER_ITEM_EDIT(float52sign, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 0.1f, 990);
1089
-      #endif
1090
-      #if DISABLED(JUNCTION_DEVIATION) || DISABLED(LIN_ADVANCE)
1091
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
1092
-      #endif
1093
-    #endif
1094
-
1095
-    END_MENU();
1096
-  }
1097
-
1098
-  // M92 Steps-per-mm
1099
-  void menu_advanced_steps_per_mm() {
1100
-    START_MENU();
1101
-    MENU_BACK(MSG_ADVANCED_SETTINGS);
1102
-
1103
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ASTEPS, &planner.settings.axis_steps_per_mm[A_AXIS], 5, 9999, _planner_refresh_positioning);
1104
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_BSTEPS, &planner.settings.axis_steps_per_mm[B_AXIS], 5, 9999, _planner_refresh_positioning);
1105
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_CSTEPS, &planner.settings.axis_steps_per_mm[C_AXIS], 5, 9999, _planner_refresh_positioning);
1106
-
1107
-    #if ENABLED(DISTINCT_E_FACTORS)
1108
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS + active_extruder], 5, 9999, _planner_refresh_positioning);
1109
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E1STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_e0_positioning);
1110
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E2STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 1], 5, 9999, _planner_refresh_e1_positioning);
1111
-      #if E_STEPPERS > 2
1112
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E3STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 2], 5, 9999, _planner_refresh_e2_positioning);
1113
-        #if E_STEPPERS > 3
1114
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E4STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 3], 5, 9999, _planner_refresh_e3_positioning);
1115
-          #if E_STEPPERS > 4
1116
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E5STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 4], 5, 9999, _planner_refresh_e4_positioning);
1117
-            #if E_STEPPERS > 5
1118
-              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E6STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 5], 5, 9999, _planner_refresh_e5_positioning);
1119
-            #endif // E_STEPPERS > 5
1120
-          #endif // E_STEPPERS > 4
1121
-        #endif // E_STEPPERS > 3
1122
-      #endif // E_STEPPERS > 2
1123
-    #else
1124
-      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
1125
-    #endif
1126
-
1127
-    END_MENU();
1128
-  }
1129
-
1130
-#endif // !SLIM_LCD_MENUS
1131
-
1132
-/**
1133
- *
1134
- * "Advanced Settings" submenu
1135
- *
1136
- */
1137
-
1138
-#if HAS_M206_COMMAND
1139
-  /**
1140
-   * Set the home offset based on the current_position
1141
-   */
1142
-  void lcd_set_home_offsets() {
1143
-    // M428 Command
1144
-    enqueue_and_echo_commands_P(PSTR("M428"));
1145
-    lcd_return_to_status();
1146
-  }
1147
-#endif
1148
-
1149
-#if ENABLED(SD_FIRMWARE_UPDATE)
1150
-  /**
1151
-   * Toggle the SD Firmware Update state in EEPROM
1152
-   */
1153
-  static void _lcd_toggle_sd_update() {
1154
-    const bool new_state = !settings.sd_update_status();
1155
-    lcd_completion_feedback(settings.set_sd_update_status(new_state));
1156
-    lcd_return_to_status();
1157
-    if (new_state) LCD_MESSAGEPGM(MSG_RESET_PRINTER); else lcd_reset_status();
1158
-  }
1159
-#endif
1160
-
1161
-void menu_advanced_settings() {
1162
-  START_MENU();
1163
-  MENU_BACK(MSG_CONFIGURATION);
1164
-
1165
-  #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
1166
-    MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
1167
-  #elif HAS_BED_PROBE
1168
-    MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
1169
-  #endif
1170
-
1171
-  #if DISABLED(SLIM_LCD_MENUS)
1172
-
1173
-    #if HAS_M206_COMMAND
1174
-      //
1175
-      // Set Home Offsets
1176
-      //
1177
-      MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
1178
-    #endif
1179
-
1180
-    // M203 / M205 - Feedrate items
1181
-    MENU_ITEM(submenu, MSG_VELOCITY, menu_advanced_velocity);
1182
-
1183
-    // M201 - Acceleration items
1184
-    MENU_ITEM(submenu, MSG_ACCELERATION, menu_advanced_acceleration);
1185
-
1186
-    // M205 - Max Jerk
1187
-    MENU_ITEM(submenu, MSG_JERK, menu_advanced_jerk);
1188
-
1189
-    if (!printer_busy()) {
1190
-      // M92 - Steps Per mm
1191
-      MENU_ITEM(submenu, MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);
1192
-    }
1193
-
1194
-  #endif // !SLIM_LCD_MENUS
1195
-
1196
-  MENU_ITEM(submenu, MSG_TEMPERATURE, menu_advanced_temperature);
1197
-
1198
-  #if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
1199
-    MENU_ITEM(submenu, MSG_FILAMENT, menu_advanced_filament);
1200
-  #elif ENABLED(LIN_ADVANCE)
1201
-    #if EXTRUDERS == 1
1202
-      MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
1203
-    #elif EXTRUDERS > 1
1204
-      MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E1, &planner.extruder_advance_K[0], 0, 999);
1205
-      MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E2, &planner.extruder_advance_K[1], 0, 999);
1206
-      #if EXTRUDERS > 2
1207
-        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E3, &planner.extruder_advance_K[2], 0, 999);
1208
-        #if EXTRUDERS > 3
1209
-          MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E4, &planner.extruder_advance_K[3], 0, 999);
1210
-          #if EXTRUDERS > 4
1211
-            MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E5, &planner.extruder_advance_K[4], 0, 999);
1212
-            #if EXTRUDERS > 5
1213
-              MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E6, &planner.extruder_advance_K[5], 0, 999);
1214
-            #endif // EXTRUDERS > 5
1215
-          #endif // EXTRUDERS > 4
1216
-        #endif // EXTRUDERS > 3
1217
-      #endif // EXTRUDERS > 2
1218
-    #endif // EXTRUDERS > 1
1219
-  #endif
1220
-
1221
-  // M540 S - Abort on endstop hit when SD printing
1222
-  #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
1223
-    MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &planner.abort_on_endstop_hit);
1224
-  #endif
1225
-
1226
-  //
1227
-  // BLTouch Self-Test and Reset
1228
-  //
1229
-  #if ENABLED(BLTOUCH)
1230
-    MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
1231
-    if (!endstops.z_probe_enabled && TEST_BLTOUCH())
1232
-      MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
1233
-  #endif
1234
-
1235
-  #if ENABLED(SD_FIRMWARE_UPDATE)
1236
-    bool sd_update_state = settings.sd_update_status();
1237
-    MENU_ITEM_EDIT_CALLBACK(bool, MSG_SD_UPDATE, &sd_update_state, _lcd_toggle_sd_update);
1238
-  #endif
1239
-
1240
-  #if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS)
1241
-    MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
1242
-  #endif
1243
-
1244
-  END_MENU();
1245
-}
1246
-
1247
-#if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
1248
-  /**
1249
-   *
1250
-   * "Advanced Settings" > "Filament" submenu
1251
-   *
1252
-   */
1253
-  void menu_advanced_filament() {
1254
-    START_MENU();
1255
-    MENU_BACK(MSG_ADVANCED_SETTINGS);
1256
-
1257
-    #if ENABLED(LIN_ADVANCE)
1258
-      #if EXTRUDERS == 1
1259
-        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
1260
-      #elif EXTRUDERS > 1
1261
-        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E1, &planner.extruder_advance_K[0], 0, 999);
1262
-        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E2, &planner.extruder_advance_K[1], 0, 999);
1263
-        #if EXTRUDERS > 2
1264
-          MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E3, &planner.extruder_advance_K[2], 0, 999);
1265
-          #if EXTRUDERS > 3
1266
-            MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E4, &planner.extruder_advance_K[3], 0, 999);
1267
-            #if EXTRUDERS > 4
1268
-              MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E5, &planner.extruder_advance_K[4], 0, 999);
1269
-              #if EXTRUDERS > 5
1270
-                MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E6, &planner.extruder_advance_K[5], 0, 999);
1271
-              #endif // EXTRUDERS > 5
1272
-            #endif // EXTRUDERS > 4
1273
-          #endif // EXTRUDERS > 3
1274
-        #endif // EXTRUDERS > 2
1275
-      #endif // EXTRUDERS > 1
1276
-    #endif
1277
-
1278
-    #if DISABLED(NO_VOLUMETRICS)
1279
-      MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &parser.volumetric_enabled, planner.calculate_volumetric_multipliers);
1280
-
1281
-      if (parser.volumetric_enabled) {
1282
-        #if EXTRUDERS == 1
1283
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1284
-        #else // EXTRUDERS > 1
1285
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[active_extruder], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1286
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E1, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1287
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E2, &planner.filament_size[1], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1288
-          #if EXTRUDERS > 2
1289
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E3, &planner.filament_size[2], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1290
-            #if EXTRUDERS > 3
1291
-              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E4, &planner.filament_size[3], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1292
-              #if EXTRUDERS > 4
1293
-                MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E5, &planner.filament_size[4], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1294
-                #if EXTRUDERS > 5
1295
-                  MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E6, &planner.filament_size[5], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
1296
-                #endif // EXTRUDERS > 5
1297
-              #endif // EXTRUDERS > 4
1298
-            #endif // EXTRUDERS > 3
1299
-          #endif // EXTRUDERS > 2
1300
-        #endif // EXTRUDERS > 1
1301
-      }
1302
-    #endif
1303
-
1304
-    #if ENABLED(ADVANCED_PAUSE_FEATURE)
1305
-      constexpr float extrude_maxlength =
1306
-        #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
1307
-          EXTRUDE_MAXLENGTH
1308
-        #else
1309
-          999
1310
-        #endif
1311
-      ;
1312
-
1313
-      #if EXTRUDERS == 1
1314
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD, &fc_settings[0].unload_length, 0, extrude_maxlength);
1315
-      #else // EXTRUDERS > 1
1316
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength);
1317
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E1, &fc_settings[0].unload_length, 0, extrude_maxlength);
1318
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E2, &fc_settings[1].unload_length, 0, extrude_maxlength);
1319
-        #if EXTRUDERS > 2
1320
-          MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E3, &fc_settings[2].unload_length, 0, extrude_maxlength);
1321
-          #if EXTRUDERS > 3
1322
-            MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E4, &fc_settings[3].unload_length, 0, extrude_maxlength);
1323
-            #if EXTRUDERS > 4
1324
-              MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E5, &fc_settings[4].unload_length, 0, extrude_maxlength);
1325
-              #if EXTRUDERS > 5
1326
-                MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E6, &fc_settings[5].unload_length, 0, extrude_maxlength);
1327
-              #endif // EXTRUDERS > 5
1328
-            #endif // EXTRUDERS > 4
1329
-          #endif // EXTRUDERS > 3
1330
-        #endif // EXTRUDERS > 2
1331
-      #endif // EXTRUDERS > 1
1332
-
1333
-      #if EXTRUDERS == 1
1334
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD, &fc_settings[0].load_length, 0, extrude_maxlength);
1335
-      #else // EXTRUDERS > 1
1336
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD, &fc_settings[active_extruder].load_length, 0, extrude_maxlength);
1337
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E1, &fc_settings[0].load_length, 0, extrude_maxlength);
1338
-        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E2, &fc_settings[1].load_length, 0, extrude_maxlength);
1339
-        #if EXTRUDERS > 2
1340
-          MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E3, &fc_settings[2].load_length, 0, extrude_maxlength);
1341
-          #if EXTRUDERS > 3
1342
-            MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E4, &fc_settings[3].load_length, 0, extrude_maxlength);
1343
-            #if EXTRUDERS > 4
1344
-              MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E5, &fc_settings[4].load_length, 0, extrude_maxlength);
1345
-              #if EXTRUDERS > 5
1346
-                MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E6, &fc_settings[5].load_length, 0, extrude_maxlength);
1347
-              #endif // EXTRUDERS > 5
1348
-            #endif // EXTRUDERS > 4
1349
-          #endif // EXTRUDERS > 3
1350
-        #endif // EXTRUDERS > 2
1351
-      #endif // EXTRUDERS > 1
1352
-    #endif
1353
-
1354
-    END_MENU();
1355
-  }
1356
-#endif // !NO_VOLUMETRICS || ADVANCED_PAUSE_FEATURE
1357
-
1358 762
 #if ENABLED(SDSUPPORT)
1359 763
 
1360 764
   #if !PIN_EXISTS(SD_DETECT)

+ 632
- 0
Marlin/src/lcd/menu/menu_advanced.cpp Просмотреть файл

@@ -0,0 +1,632 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+//
24
+// Advanced Settings Menus
25
+//
26
+
27
+#include "../../inc/MarlinConfigPre.h"
28
+
29
+#if HAS_LCD_MENU
30
+
31
+#include "menu.h"
32
+#include "../../module/planner.h"
33
+
34
+#if DISABLED(NO_VOLUMETRICS)
35
+  #include "../../gcode/parser.h"
36
+#endif
37
+
38
+#if HAS_BED_PROBE
39
+  #include "../../module/probe.h"
40
+  #if ENABLED(BLTOUCH)
41
+    #include "../../module/endstops.h"
42
+  #endif
43
+#endif
44
+
45
+#if ENABLED(PIDTEMP)
46
+  #include "../../module/temperature.h"
47
+#endif
48
+
49
+#if HAS_M206_COMMAND
50
+  //
51
+  // Set the home offset based on the current_position
52
+  //
53
+  void _lcd_set_home_offsets() {
54
+    enqueue_and_echo_commands_P(PSTR("M428"));
55
+    lcd_return_to_status();
56
+  }
57
+#endif
58
+
59
+#if ENABLED(SD_FIRMWARE_UPDATE)
60
+
61
+  #include "../../module/configuration_store.h"
62
+
63
+  //
64
+  // Toggle the SD Firmware Update state in EEPROM
65
+  //
66
+  static void _lcd_toggle_sd_update() {
67
+    const bool new_state = !settings.sd_update_status();
68
+    lcd_completion_feedback(settings.set_sd_update_status(new_state));
69
+    lcd_return_to_status();
70
+    if (new_state) LCD_MESSAGEPGM(MSG_RESET_PRINTER); else lcd_reset_status();
71
+  }
72
+#endif
73
+
74
+#if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
75
+  //
76
+  // Advanced Settings > Filament
77
+  //
78
+  void menu_advanced_filament() {
79
+    START_MENU();
80
+    MENU_BACK(MSG_ADVANCED_SETTINGS);
81
+
82
+    #if ENABLED(LIN_ADVANCE)
83
+      #if EXTRUDERS == 1
84
+        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
85
+      #elif EXTRUDERS > 1
86
+        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E1, &planner.extruder_advance_K[0], 0, 999);
87
+        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E2, &planner.extruder_advance_K[1], 0, 999);
88
+        #if EXTRUDERS > 2
89
+          MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E3, &planner.extruder_advance_K[2], 0, 999);
90
+          #if EXTRUDERS > 3
91
+            MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E4, &planner.extruder_advance_K[3], 0, 999);
92
+            #if EXTRUDERS > 4
93
+              MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E5, &planner.extruder_advance_K[4], 0, 999);
94
+              #if EXTRUDERS > 5
95
+                MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E6, &planner.extruder_advance_K[5], 0, 999);
96
+              #endif // EXTRUDERS > 5
97
+            #endif // EXTRUDERS > 4
98
+          #endif // EXTRUDERS > 3
99
+        #endif // EXTRUDERS > 2
100
+      #endif // EXTRUDERS > 1
101
+    #endif
102
+
103
+    #if DISABLED(NO_VOLUMETRICS)
104
+      MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &parser.volumetric_enabled, planner.calculate_volumetric_multipliers);
105
+
106
+      if (parser.volumetric_enabled) {
107
+        #if EXTRUDERS == 1
108
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
109
+        #else // EXTRUDERS > 1
110
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[active_extruder], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
111
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E1, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
112
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E2, &planner.filament_size[1], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
113
+          #if EXTRUDERS > 2
114
+            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E3, &planner.filament_size[2], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
115
+            #if EXTRUDERS > 3
116
+              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E4, &planner.filament_size[3], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
117
+              #if EXTRUDERS > 4
118
+                MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E5, &planner.filament_size[4], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
119
+                #if EXTRUDERS > 5
120
+                  MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E6, &planner.filament_size[5], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
121
+                #endif // EXTRUDERS > 5
122
+              #endif // EXTRUDERS > 4
123
+            #endif // EXTRUDERS > 3
124
+          #endif // EXTRUDERS > 2
125
+        #endif // EXTRUDERS > 1
126
+      }
127
+    #endif
128
+
129
+    #if ENABLED(ADVANCED_PAUSE_FEATURE)
130
+      constexpr float extrude_maxlength =
131
+        #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
132
+          EXTRUDE_MAXLENGTH
133
+        #else
134
+          999
135
+        #endif
136
+      ;
137
+
138
+      #if EXTRUDERS == 1
139
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD, &fc_settings[0].unload_length, 0, extrude_maxlength);
140
+      #else // EXTRUDERS > 1
141
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength);
142
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E1, &fc_settings[0].unload_length, 0, extrude_maxlength);
143
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E2, &fc_settings[1].unload_length, 0, extrude_maxlength);
144
+        #if EXTRUDERS > 2
145
+          MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E3, &fc_settings[2].unload_length, 0, extrude_maxlength);
146
+          #if EXTRUDERS > 3
147
+            MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E4, &fc_settings[3].unload_length, 0, extrude_maxlength);
148
+            #if EXTRUDERS > 4
149
+              MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E5, &fc_settings[4].unload_length, 0, extrude_maxlength);
150
+              #if EXTRUDERS > 5
151
+                MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E6, &fc_settings[5].unload_length, 0, extrude_maxlength);
152
+              #endif // EXTRUDERS > 5
153
+            #endif // EXTRUDERS > 4
154
+          #endif // EXTRUDERS > 3
155
+        #endif // EXTRUDERS > 2
156
+      #endif // EXTRUDERS > 1
157
+
158
+      #if EXTRUDERS == 1
159
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD, &fc_settings[0].load_length, 0, extrude_maxlength);
160
+      #else // EXTRUDERS > 1
161
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD, &fc_settings[active_extruder].load_length, 0, extrude_maxlength);
162
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E1, &fc_settings[0].load_length, 0, extrude_maxlength);
163
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E2, &fc_settings[1].load_length, 0, extrude_maxlength);
164
+        #if EXTRUDERS > 2
165
+          MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E3, &fc_settings[2].load_length, 0, extrude_maxlength);
166
+          #if EXTRUDERS > 3
167
+            MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E4, &fc_settings[3].load_length, 0, extrude_maxlength);
168
+            #if EXTRUDERS > 4
169
+              MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E5, &fc_settings[4].load_length, 0, extrude_maxlength);
170
+              #if EXTRUDERS > 5
171
+                MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E6, &fc_settings[5].load_length, 0, extrude_maxlength);
172
+              #endif // EXTRUDERS > 5
173
+            #endif // EXTRUDERS > 4
174
+          #endif // EXTRUDERS > 3
175
+        #endif // EXTRUDERS > 2
176
+      #endif // EXTRUDERS > 1
177
+    #endif
178
+
179
+    END_MENU();
180
+  }
181
+
182
+#endif // !NO_VOLUMETRICS || ADVANCED_PAUSE_FEATURE
183
+
184
+//
185
+// Advanced Settings > Temperature helpers
186
+//
187
+
188
+#if ENABLED(PID_AUTOTUNE_MENU)
189
+
190
+  #if ENABLED(PIDTEMP)
191
+    int16_t autotune_temp[HOTENDS] = ARRAY_BY_HOTENDS1(150);
192
+  #endif
193
+
194
+  #if ENABLED(PIDTEMPBED)
195
+    int16_t autotune_temp_bed = 70;
196
+  #endif
197
+
198
+  void _lcd_autotune(const int16_t e) {
199
+    char cmd[30];
200
+    sprintf_P(cmd, PSTR("M303 U1 E%i S%i"), e,
201
+      #if HAS_PID_FOR_BOTH
202
+        e < 0 ? autotune_temp_bed : autotune_temp[e]
203
+      #elif ENABLED(PIDTEMPBED)
204
+        autotune_temp_bed
205
+      #else
206
+        autotune_temp[e]
207
+      #endif
208
+    );
209
+    lcd_enqueue_command(cmd);
210
+  }
211
+
212
+#endif // PID_AUTOTUNE_MENU
213
+
214
+#if ENABLED(PIDTEMP)
215
+
216
+  float raw_Ki, raw_Kd; // place-holders for Ki and Kd edits
217
+
218
+  // Helpers for editing PID Ki & Kd values
219
+  // grab the PID value out of the temp variable; scale it; then update the PID driver
220
+  void copy_and_scalePID_i(int16_t e) {
221
+    #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1
222
+      UNUSED(e);
223
+    #endif
224
+    PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
225
+    thermalManager.updatePID();
226
+  }
227
+  void copy_and_scalePID_d(int16_t e) {
228
+    #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1
229
+      UNUSED(e);
230
+    #endif
231
+    PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
232
+    thermalManager.updatePID();
233
+  }
234
+  #define _DEFINE_PIDTEMP_BASE_FUNCS(N) \
235
+    void copy_and_scalePID_i_E ## N() { copy_and_scalePID_i(N); } \
236
+    void copy_and_scalePID_d_E ## N() { copy_and_scalePID_d(N); }
237
+
238
+  #if ENABLED(PID_AUTOTUNE_MENU)
239
+    #define DEFINE_PIDTEMP_FUNCS(N) \
240
+      _DEFINE_PIDTEMP_BASE_FUNCS(N); \
241
+      void lcd_autotune_callback_E ## N() { _lcd_autotune(N); } typedef void _pid_##N##_void
242
+  #else
243
+    #define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N) typedef void _pid_##N##_void
244
+  #endif
245
+
246
+  DEFINE_PIDTEMP_FUNCS(0);
247
+  #if ENABLED(PID_PARAMS_PER_HOTEND)
248
+    #if HOTENDS > 1
249
+      DEFINE_PIDTEMP_FUNCS(1);
250
+      #if HOTENDS > 2
251
+        DEFINE_PIDTEMP_FUNCS(2);
252
+        #if HOTENDS > 3
253
+          DEFINE_PIDTEMP_FUNCS(3);
254
+          #if HOTENDS > 4
255
+            DEFINE_PIDTEMP_FUNCS(4);
256
+            #if HOTENDS > 5
257
+              DEFINE_PIDTEMP_FUNCS(5);
258
+            #endif // HOTENDS > 5
259
+          #endif // HOTENDS > 4
260
+        #endif // HOTENDS > 3
261
+      #endif // HOTENDS > 2
262
+    #endif // HOTENDS > 1
263
+  #endif // PID_PARAMS_PER_HOTEND
264
+
265
+#endif // PIDTEMP
266
+
267
+//
268
+// Advanced Settings > Temperature
269
+//
270
+void menu_advanced_temperature() {
271
+  START_MENU();
272
+  MENU_BACK(MSG_ADVANCED_SETTINGS);
273
+  //
274
+  // Autotemp, Min, Max, Fact
275
+  //
276
+  #if ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND
277
+    MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
278
+    MENU_ITEM_EDIT(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
279
+    MENU_ITEM_EDIT(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
280
+    MENU_ITEM_EDIT(float52, MSG_FACTOR, &planner.autotemp_factor, 0, 1);
281
+  #endif
282
+
283
+  //
284
+  // PID-P, PID-I, PID-D, PID-C, PID Autotune
285
+  // PID-P E1, PID-I E1, PID-D E1, PID-C E1, PID Autotune E1
286
+  // PID-P E2, PID-I E2, PID-D E2, PID-C E2, PID Autotune E2
287
+  // PID-P E3, PID-I E3, PID-D E3, PID-C E3, PID Autotune E3
288
+  // PID-P E4, PID-I E4, PID-D E4, PID-C E4, PID Autotune E4
289
+  // PID-P E5, PID-I E5, PID-D E5, PID-C E5, PID Autotune E5
290
+  //
291
+  #if ENABLED(PIDTEMP)
292
+
293
+    #define _PID_BASE_MENU_ITEMS(ELABEL, eindex) \
294
+      raw_Ki = unscalePID_i(PID_PARAM(Ki, eindex)); \
295
+      raw_Kd = unscalePID_d(PID_PARAM(Kd, eindex)); \
296
+      MENU_ITEM_EDIT(float52sign, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \
297
+      MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_I ELABEL, &raw_Ki, 0.01f, 9990, copy_and_scalePID_i_E ## eindex); \
298
+      MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex)
299
+
300
+    #if ENABLED(PID_EXTRUSION_SCALING)
301
+      #define _PID_MENU_ITEMS(ELABEL, eindex) \
302
+        _PID_BASE_MENU_ITEMS(ELABEL, eindex); \
303
+        MENU_ITEM_EDIT(float3, MSG_PID_C ELABEL, &PID_PARAM(Kc, eindex), 1, 9990)
304
+    #else
305
+      #define _PID_MENU_ITEMS(ELABEL, eindex) _PID_BASE_MENU_ITEMS(ELABEL, eindex)
306
+    #endif
307
+
308
+    #if ENABLED(PID_AUTOTUNE_MENU)
309
+      #define PID_MENU_ITEMS(ELABEL, eindex) \
310
+        _PID_MENU_ITEMS(ELABEL, eindex); \
311
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex)
312
+    #else
313
+      #define PID_MENU_ITEMS(ELABEL, eindex) _PID_MENU_ITEMS(ELABEL, eindex)
314
+    #endif
315
+
316
+    #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1
317
+      PID_MENU_ITEMS(" " MSG_E1, 0);
318
+      PID_MENU_ITEMS(" " MSG_E2, 1);
319
+      #if HOTENDS > 2
320
+        PID_MENU_ITEMS(" " MSG_E3, 2);
321
+        #if HOTENDS > 3
322
+          PID_MENU_ITEMS(" " MSG_E4, 3);
323
+          #if HOTENDS > 4
324
+            PID_MENU_ITEMS(" " MSG_E5, 4);
325
+            #if HOTENDS > 5
326
+              PID_MENU_ITEMS(" " MSG_E6, 5);
327
+            #endif // HOTENDS > 5
328
+          #endif // HOTENDS > 4
329
+        #endif // HOTENDS > 3
330
+      #endif // HOTENDS > 2
331
+    #else // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
332
+      PID_MENU_ITEMS("", 0);
333
+    #endif // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
334
+
335
+  #endif // PIDTEMP
336
+
337
+  END_MENU();
338
+}
339
+
340
+#if DISABLED(SLIM_LCD_MENUS)
341
+
342
+  void _reset_acceleration_rates() { planner.reset_acceleration_rates(); }
343
+  #if ENABLED(DISTINCT_E_FACTORS)
344
+    void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) _reset_acceleration_rates(); }
345
+    void _reset_e0_acceleration_rate() { _reset_e_acceleration_rate(0); }
346
+    void _reset_e1_acceleration_rate() { _reset_e_acceleration_rate(1); }
347
+    #if E_STEPPERS > 2
348
+      void _reset_e2_acceleration_rate() { _reset_e_acceleration_rate(2); }
349
+      #if E_STEPPERS > 3
350
+        void _reset_e3_acceleration_rate() { _reset_e_acceleration_rate(3); }
351
+        #if E_STEPPERS > 4
352
+          void _reset_e4_acceleration_rate() { _reset_e_acceleration_rate(4); }
353
+          #if E_STEPPERS > 5
354
+            void _reset_e5_acceleration_rate() { _reset_e_acceleration_rate(5); }
355
+          #endif // E_STEPPERS > 5
356
+        #endif // E_STEPPERS > 4
357
+      #endif // E_STEPPERS > 3
358
+    #endif // E_STEPPERS > 2
359
+  #endif
360
+
361
+  void _planner_refresh_positioning() { planner.refresh_positioning(); }
362
+  #if ENABLED(DISTINCT_E_FACTORS)
363
+    void _planner_refresh_e_positioning(const uint8_t e) {
364
+      if (e == active_extruder)
365
+        _planner_refresh_positioning();
366
+      else
367
+        planner.steps_to_mm[E_AXIS + e] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS + e];
368
+    }
369
+    void _planner_refresh_e0_positioning() { _planner_refresh_e_positioning(0); }
370
+    void _planner_refresh_e1_positioning() { _planner_refresh_e_positioning(1); }
371
+    #if E_STEPPERS > 2
372
+      void _planner_refresh_e2_positioning() { _planner_refresh_e_positioning(2); }
373
+      #if E_STEPPERS > 3
374
+        void _planner_refresh_e3_positioning() { _planner_refresh_e_positioning(3); }
375
+        #if E_STEPPERS > 4
376
+          void _planner_refresh_e4_positioning() { _planner_refresh_e_positioning(4); }
377
+          #if E_STEPPERS > 5
378
+            void _planner_refresh_e5_positioning() { _planner_refresh_e_positioning(5); }
379
+          #endif // E_STEPPERS > 5
380
+        #endif // E_STEPPERS > 4
381
+      #endif // E_STEPPERS > 3
382
+    #endif // E_STEPPERS > 2
383
+  #endif
384
+
385
+  // M203 / M205 Velocity options
386
+  void menu_advanced_velocity() {
387
+    START_MENU();
388
+    MENU_BACK(MSG_ADVANCED_SETTINGS);
389
+
390
+    // M203 Max Feedrate
391
+    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_A, &planner.settings.max_feedrate_mm_s[A_AXIS], 1, 999);
392
+    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_B, &planner.settings.max_feedrate_mm_s[B_AXIS], 1, 999);
393
+    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_C, &planner.settings.max_feedrate_mm_s[C_AXIS], 1, 999);
394
+
395
+    #if ENABLED(DISTINCT_E_FACTORS)
396
+      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS + active_extruder], 1, 999);
397
+      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E1, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, 999);
398
+      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E2, &planner.settings.max_feedrate_mm_s[E_AXIS + 1], 1, 999);
399
+      #if E_STEPPERS > 2
400
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E3, &planner.settings.max_feedrate_mm_s[E_AXIS + 2], 1, 999);
401
+        #if E_STEPPERS > 3
402
+          MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E4, &planner.settings.max_feedrate_mm_s[E_AXIS + 3], 1, 999);
403
+          #if E_STEPPERS > 4
404
+            MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E5, &planner.settings.max_feedrate_mm_s[E_AXIS + 4], 1, 999);
405
+            #if E_STEPPERS > 5
406
+              MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E6, &planner.settings.max_feedrate_mm_s[E_AXIS + 5], 1, 999);
407
+            #endif // E_STEPPERS > 5
408
+          #endif // E_STEPPERS > 4
409
+        #endif // E_STEPPERS > 3
410
+      #endif // E_STEPPERS > 2
411
+    #else
412
+      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, 999);
413
+    #endif
414
+
415
+    // M205 S Min Feedrate
416
+    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMIN, &planner.settings.min_feedrate_mm_s, 0, 999);
417
+
418
+    // M205 T Min Travel Feedrate
419
+    MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.settings.min_travel_feedrate_mm_s, 0, 999);
420
+
421
+    END_MENU();
422
+  }
423
+
424
+  // M201 / M204 Accelerations
425
+  void menu_advanced_acceleration() {
426
+    START_MENU();
427
+    MENU_BACK(MSG_ADVANCED_SETTINGS);
428
+
429
+    // M204 P Acceleration
430
+    MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_ACC, &planner.settings.acceleration, 10, 99000);
431
+
432
+    // M204 R Retract Acceleration
433
+    MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, 99000);
434
+
435
+    // M204 T Travel Acceleration
436
+    MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 100, 99000);
437
+
438
+    // M201 settings
439
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_A, &planner.settings.max_acceleration_mm_per_s2[A_AXIS], 100, 99000, _reset_acceleration_rates);
440
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_B, &planner.settings.max_acceleration_mm_per_s2[B_AXIS], 100, 99000, _reset_acceleration_rates);
441
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_C, &planner.settings.max_acceleration_mm_per_s2[C_AXIS], 10, 99000, _reset_acceleration_rates);
442
+
443
+    #if ENABLED(DISTINCT_E_FACTORS)
444
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + active_extruder], 100, 99000, _reset_acceleration_rates);
445
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E1, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_e0_acceleration_rate);
446
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E2, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 1], 100, 99000, _reset_e1_acceleration_rate);
447
+      #if E_STEPPERS > 2
448
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E3, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 2], 100, 99000, _reset_e2_acceleration_rate);
449
+        #if E_STEPPERS > 3
450
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E4, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 3], 100, 99000, _reset_e3_acceleration_rate);
451
+          #if E_STEPPERS > 4
452
+            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E5, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 4], 100, 99000, _reset_e4_acceleration_rate);
453
+            #if E_STEPPERS > 5
454
+              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E6, &planner.settings.max_acceleration_mm_per_s2[E_AXIS + 5], 100, 99000, _reset_e5_acceleration_rate);
455
+            #endif // E_STEPPERS > 5
456
+          #endif // E_STEPPERS > 4
457
+        #endif // E_STEPPERS > 3
458
+      #endif // E_STEPPERS > 2
459
+    #else
460
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
461
+    #endif
462
+
463
+    END_MENU();
464
+  }
465
+
466
+  // M205 Jerk
467
+  void menu_advanced_jerk() {
468
+    START_MENU();
469
+    MENU_BACK(MSG_ADVANCED_SETTINGS);
470
+
471
+    #if ENABLED(JUNCTION_DEVIATION)
472
+      #if ENABLED(LIN_ADVANCE)
473
+        MENU_ITEM_EDIT_CALLBACK(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f, planner.recalculate_max_e_jerk);
474
+      #else
475
+        MENU_ITEM_EDIT(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f);
476
+      #endif
477
+    #endif
478
+    #if HAS_CLASSIC_JERK
479
+      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VA_JERK, &planner.max_jerk[A_AXIS], 1, 990);
480
+      MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VB_JERK, &planner.max_jerk[B_AXIS], 1, 990);
481
+      #if ENABLED(DELTA)
482
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 1, 990);
483
+      #else
484
+        MENU_MULTIPLIER_ITEM_EDIT(float52sign, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 0.1f, 990);
485
+      #endif
486
+      #if DISABLED(JUNCTION_DEVIATION) || DISABLED(LIN_ADVANCE)
487
+        MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
488
+      #endif
489
+    #endif
490
+
491
+    END_MENU();
492
+  }
493
+
494
+  // M92 Steps-per-mm
495
+  void menu_advanced_steps_per_mm() {
496
+    START_MENU();
497
+    MENU_BACK(MSG_ADVANCED_SETTINGS);
498
+
499
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ASTEPS, &planner.settings.axis_steps_per_mm[A_AXIS], 5, 9999, _planner_refresh_positioning);
500
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_BSTEPS, &planner.settings.axis_steps_per_mm[B_AXIS], 5, 9999, _planner_refresh_positioning);
501
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_CSTEPS, &planner.settings.axis_steps_per_mm[C_AXIS], 5, 9999, _planner_refresh_positioning);
502
+
503
+    #if ENABLED(DISTINCT_E_FACTORS)
504
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS + active_extruder], 5, 9999, _planner_refresh_positioning);
505
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E1STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_e0_positioning);
506
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E2STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 1], 5, 9999, _planner_refresh_e1_positioning);
507
+      #if E_STEPPERS > 2
508
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E3STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 2], 5, 9999, _planner_refresh_e2_positioning);
509
+        #if E_STEPPERS > 3
510
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E4STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 3], 5, 9999, _planner_refresh_e3_positioning);
511
+          #if E_STEPPERS > 4
512
+            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E5STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 4], 5, 9999, _planner_refresh_e4_positioning);
513
+            #if E_STEPPERS > 5
514
+              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E6STEPS, &planner.settings.axis_steps_per_mm[E_AXIS + 5], 5, 9999, _planner_refresh_e5_positioning);
515
+            #endif // E_STEPPERS > 5
516
+          #endif // E_STEPPERS > 4
517
+        #endif // E_STEPPERS > 3
518
+      #endif // E_STEPPERS > 2
519
+    #else
520
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
521
+    #endif
522
+
523
+    END_MENU();
524
+  }
525
+
526
+  #if ENABLED(EEPROM_SETTINGS)
527
+
528
+    #include "../../module/configuration_store.h"
529
+
530
+    static void lcd_init_eeprom() {
531
+      lcd_completion_feedback(settings.init_eeprom());
532
+      lcd_goto_previous_menu();
533
+    }
534
+
535
+    static void lcd_init_eeprom_confirm() {
536
+      START_MENU();
537
+      MENU_BACK(MSG_ADVANCED_SETTINGS);
538
+      MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom);
539
+      END_MENU();
540
+    }
541
+
542
+  #endif
543
+
544
+#endif // !SLIM_LCD_MENUS
545
+
546
+void menu_advanced_settings() {
547
+  START_MENU();
548
+  MENU_BACK(MSG_CONFIGURATION);
549
+
550
+  #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
551
+    MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
552
+  #elif HAS_BED_PROBE
553
+    MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
554
+  #endif
555
+
556
+  #if DISABLED(SLIM_LCD_MENUS)
557
+
558
+    #if HAS_M206_COMMAND
559
+      //
560
+      // Set Home Offsets
561
+      //
562
+      MENU_ITEM(function, MSG_SET_HOME_OFFSETS, _lcd_set_home_offsets);
563
+    #endif
564
+
565
+    // M203 / M205 - Feedrate items
566
+    MENU_ITEM(submenu, MSG_VELOCITY, menu_advanced_velocity);
567
+
568
+    // M201 - Acceleration items
569
+    MENU_ITEM(submenu, MSG_ACCELERATION, menu_advanced_acceleration);
570
+
571
+    // M205 - Max Jerk
572
+    MENU_ITEM(submenu, MSG_JERK, menu_advanced_jerk);
573
+
574
+    if (!printer_busy()) {
575
+      // M92 - Steps Per mm
576
+      MENU_ITEM(submenu, MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);
577
+    }
578
+
579
+  #endif // !SLIM_LCD_MENUS
580
+
581
+  MENU_ITEM(submenu, MSG_TEMPERATURE, menu_advanced_temperature);
582
+
583
+  #if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
584
+    MENU_ITEM(submenu, MSG_FILAMENT, menu_advanced_filament);
585
+  #elif ENABLED(LIN_ADVANCE)
586
+    #if EXTRUDERS == 1
587
+      MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
588
+    #elif EXTRUDERS > 1
589
+      MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E1, &planner.extruder_advance_K[0], 0, 999);
590
+      MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E2, &planner.extruder_advance_K[1], 0, 999);
591
+      #if EXTRUDERS > 2
592
+        MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E3, &planner.extruder_advance_K[2], 0, 999);
593
+        #if EXTRUDERS > 3
594
+          MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E4, &planner.extruder_advance_K[3], 0, 999);
595
+          #if EXTRUDERS > 4
596
+            MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E5, &planner.extruder_advance_K[4], 0, 999);
597
+            #if EXTRUDERS > 5
598
+              MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E6, &planner.extruder_advance_K[5], 0, 999);
599
+            #endif // EXTRUDERS > 5
600
+          #endif // EXTRUDERS > 4
601
+        #endif // EXTRUDERS > 3
602
+      #endif // EXTRUDERS > 2
603
+    #endif // EXTRUDERS > 1
604
+  #endif
605
+
606
+  // M540 S - Abort on endstop hit when SD printing
607
+  #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
608
+    MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &planner.abort_on_endstop_hit);
609
+  #endif
610
+
611
+  //
612
+  // BLTouch Self-Test and Reset
613
+  //
614
+  #if ENABLED(BLTOUCH)
615
+    MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
616
+    if (!endstops.z_probe_enabled && TEST_BLTOUCH())
617
+      MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
618
+  #endif
619
+
620
+  #if ENABLED(SD_FIRMWARE_UPDATE)
621
+    bool sd_update_state = settings.sd_update_status();
622
+    MENU_ITEM_EDIT_CALLBACK(bool, MSG_SD_UPDATE, &sd_update_state, _lcd_toggle_sd_update);
623
+  #endif
624
+
625
+  #if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS)
626
+    MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
627
+  #endif
628
+
629
+  END_MENU();
630
+}
631
+
632
+#endif // HAS_LCD_MENU

Загрузка…
Отмена
Сохранить