|
@@ -1094,7 +1094,7 @@ static void lcd_control_menu() {
|
1094
|
1094
|
*
|
1095
|
1095
|
*/
|
1096
|
1096
|
|
1097
|
|
-#if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
|
|
1097
|
+#if ENABLED(PID_AUTOTUNE_MENU)
|
1098
|
1098
|
|
1099
|
1099
|
#if ENABLED(PIDTEMP)
|
1100
|
1100
|
int autotune_temp[EXTRUDERS] = { 150 };
|
|
@@ -1119,7 +1119,7 @@ static void lcd_control_menu() {
|
1119
|
1119
|
enqueue_and_echo_command_now(cmd);
|
1120
|
1120
|
}
|
1121
|
1121
|
|
1122
|
|
-#endif //PIDTEMP || PIDTEMPBED
|
|
1122
|
+#endif //PID_AUTOTUNE_MENU
|
1123
|
1123
|
|
1124
|
1124
|
#if ENABLED(PIDTEMP)
|
1125
|
1125
|
|
|
@@ -1133,10 +1133,17 @@ static void lcd_control_menu() {
|
1133
|
1133
|
PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
|
1134
|
1134
|
updatePID();
|
1135
|
1135
|
}
|
1136
|
|
- #define _PIDTEMP_FUNCTIONS(eindex) \
|
|
1136
|
+ #define _PIDTEMP_BASE_FUNCTIONS(eindex) \
|
1137
|
1137
|
void copy_and_scalePID_i_E ## eindex() { copy_and_scalePID_i(eindex); } \
|
1138
|
|
- void copy_and_scalePID_d_E ## eindex() { copy_and_scalePID_d(eindex); } \
|
1139
|
|
- void lcd_autotune_callback_E ## eindex() { _lcd_autotune(eindex); }
|
|
1138
|
+ void copy_and_scalePID_d_E ## eindex() { copy_and_scalePID_d(eindex); }
|
|
1139
|
+
|
|
1140
|
+ #if ENABLED(PID_AUTOTUNE_MENU)
|
|
1141
|
+ #define _PIDTEMP_FUNCTIONS(eindex) \
|
|
1142
|
+ _PIDTEMP_BASE_FUNCTIONS(eindex); \
|
|
1143
|
+ void lcd_autotune_callback_E ## eindex() { _lcd_autotune(eindex); }
|
|
1144
|
+ #else
|
|
1145
|
+ #define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex);
|
|
1146
|
+ #endif
|
1140
|
1147
|
|
1141
|
1148
|
_PIDTEMP_FUNCTIONS(0);
|
1142
|
1149
|
#if ENABLED(PID_PARAMS_PER_EXTRUDER)
|
|
@@ -1254,9 +1261,13 @@ static void lcd_control_temperature_menu() {
|
1254
|
1261
|
#define _PID_MENU_ITEMS(ELABEL, eindex) _PID_BASE_MENU_ITEMS(ELABEL, eindex)
|
1255
|
1262
|
#endif
|
1256
|
1263
|
|
1257
|
|
- #define PID_MENU_ITEMS(ELABEL, eindex) \
|
1258
|
|
- _PID_MENU_ITEMS(ELABEL, eindex); \
|
1259
|
|
- MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex)
|
|
1264
|
+ #if ENABLED(PID_AUTOTUNE_MENU)
|
|
1265
|
+ #define PID_MENU_ITEMS(ELABEL, eindex) \
|
|
1266
|
+ _PID_MENU_ITEMS(ELABEL, eindex); \
|
|
1267
|
+ MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex)
|
|
1268
|
+ #else
|
|
1269
|
+ #define PID_MENU_ITEMS(ELABEL, eindex) _PID_MENU_ITEMS(ELABEL, eindex)
|
|
1270
|
+ #endif
|
1260
|
1271
|
|
1261
|
1272
|
#if ENABLED(PID_PARAMS_PER_EXTRUDER) && EXTRUDERS > 1
|
1262
|
1273
|
PID_MENU_ITEMS(MSG_E1, 0);
|