@ -919,31 +919,37 @@ void kill_screen(const char* lcd_msg) {
* Watch temperature callbacks
*/
# if WATCH_HOTENDS
# if TEMP_SENSOR_0 != 0
# if HAS_TEMP_HOTEND
void watch_temp_callback_E0 ( ) { thermalManager . start_watching_heater ( 0 ) ; }
# endif
# if HOTENDS > 1 && TEMP_SENSOR_1 != 0
# if HOTENDS > 1
void watch_temp_callback_E1 ( ) { thermalManager . start_watching_heater ( 1 ) ; }
# endif // HOTENDS > 1
# if HOTENDS > 2 && TEMP_SENSOR_2 != 0
# if HOTENDS > 2
void watch_temp_callback_E2 ( ) { thermalManager . start_watching_heater ( 2 ) ; }
# endif // HOTENDS > 2
# if HOTENDS > 3 && TEMP_SENSOR_3 != 0
# if HOTENDS > 3
void watch_temp_callback_E3 ( ) { thermalManager . start_watching_heater ( 3 ) ; }
# if HOTENDS > 4
void watch_temp_callback_E4 ( ) { thermalManager . start_watching_heater ( 4 ) ; }
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
# endif
# else
# if TEMP_SENSOR_0 != 0
# if HAS_TEMP_HOTEND
void watch_temp_callback_E0 ( ) { }
# endif
# if HOTENDS > 1 && TEMP_SENSOR_1 != 0
# if HOTENDS > 1
void watch_temp_callback_E1 ( ) { }
# endif // HOTENDS > 1
# if HOTENDS > 2 && TEMP_SENSOR_2 != 0
# if HOTENDS > 2
void watch_temp_callback_E2 ( ) { }
# endif // HOTENDS > 2
# if HOTENDS > 3 && TEMP_SENSOR_3 != 0
# if HOTENDS > 3
void watch_temp_callback_E3 ( ) { }
# if HOTENDS > 4
void watch_temp_callback_E4 ( ) { }
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
# endif
# endif
# if WATCH_THE_BED
@ -990,24 +996,17 @@ void kill_screen(const char* lcd_msg) {
// Nozzle [1-4]:
//
# if HOTENDS == 1
# if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE , & thermalManager . target_temperature [ 0 ] , 0 , HEATER_0_MAXTEMP - 15 , watch_temp_callback_E0 ) ;
# endif
# else //HOTENDS > 1
# if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N1 , & thermalManager . target_temperature [ 0 ] , 0 , HEATER_0_MAXTEMP - 15 , watch_temp_callback_E0 ) ;
# endif
# if TEMP_SENSOR_1 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N2 , & thermalManager . target_temperature [ 1 ] , 0 , HEATER_1_MAXTEMP - 15 , watch_temp_callback_E1 ) ;
# endif
# if HOTENDS > 2
# if TEMP_SENSOR_2 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N3 , & thermalManager . target_temperature [ 2 ] , 0 , HEATER_2_MAXTEMP - 15 , watch_temp_callback_E2 ) ;
# endif
# if HOTENDS > 3
# if TEMP_SENSOR_3 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N4 , & thermalManager . target_temperature [ 3 ] , 0 , HEATER_3_MAXTEMP - 15 , watch_temp_callback_E3 ) ;
# endif
# if HOTENDS > 4
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N5 , & thermalManager . target_temperature [ 4 ] , 0 , HEATER_4_MAXTEMP - 15 , watch_temp_callback_E4 ) ;
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
@ -1041,10 +1040,7 @@ void kill_screen(const char* lcd_msg) {
//
// Flow:
// Flow 1:
// Flow 2:
// Flow 3:
// Flow 4:
// Flow [1-5]:
//
# if EXTRUDERS == 1
MENU_ITEM_EDIT ( int3 , MSG_FLOW , & flow_percentage [ 0 ] , 10 , 999 ) ;
@ -1056,6 +1052,9 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT ( int3 , MSG_FLOW MSG_N3 , & flow_percentage [ 2 ] , 10 , 999 ) ;
# if EXTRUDERS > 3
MENU_ITEM_EDIT ( int3 , MSG_FLOW MSG_N4 , & flow_percentage [ 3 ] , 10 , 999 ) ;
# if EXTRUDERS > 4
MENU_ITEM_EDIT ( int3 , MSG_FLOW MSG_N5 , & flow_percentage [ 4 ] , 10 , 999 ) ;
# endif //EXTRUDERS > 4
# endif //EXTRUDERS > 3
# endif //EXTRUDERS > 2
# endif //EXTRUDERS > 1
@ -1109,7 +1108,7 @@ void kill_screen(const char* lcd_msg) {
}
# endif
constexpr int heater_maxtemp [ HOTENDS ] = ARRAY_BY_HOTENDS ( HEATER_0_MAXTEMP , HEATER_1_MAXTEMP , HEATER_2_MAXTEMP , HEATER_3_MAXTEMP );
constexpr int heater_maxtemp [ HOTENDS ] = ARRAY_BY_HOTENDS ( HEATER_0_MAXTEMP , HEATER_1_MAXTEMP , HEATER_2_MAXTEMP , HEATER_3_MAXTEMP , HEATER_4_MAXTEMP );
/**
*
@ -1165,8 +1164,16 @@ void kill_screen(const char* lcd_msg) {
void lcd_preheat_m1_e3 ( ) { _lcd_preheat ( 3 , lcd_preheat_hotend_temp [ 0 ] , lcd_preheat_bed_temp [ 0 ] , lcd_preheat_fan_speed [ 0 ] ) ; }
void lcd_preheat_m2_e3 ( ) { _lcd_preheat ( 3 , lcd_preheat_hotend_temp [ 1 ] , lcd_preheat_bed_temp [ 1 ] , lcd_preheat_fan_speed [ 1 ] ) ; }
# endif
# if HOTENDS > 4
void lcd_preheat_m1_e4_only ( ) { _lcd_preheat ( 4 , lcd_preheat_hotend_temp [ 0 ] , - 1 , lcd_preheat_fan_speed [ 0 ] ) ; }
void lcd_preheat_m2_e4_only ( ) { _lcd_preheat ( 4 , lcd_preheat_hotend_temp [ 1 ] , - 1 , lcd_preheat_fan_speed [ 1 ] ) ; }
# if TEMP_SENSOR_BED != 0
void lcd_preheat_m1_e4 ( ) { _lcd_preheat ( 4 , lcd_preheat_hotend_temp [ 0 ] , lcd_preheat_bed_temp [ 0 ] , lcd_preheat_fan_speed [ 0 ] ) ; }
void lcd_preheat_m2_e4 ( ) { _lcd_preheat ( 4 , lcd_preheat_hotend_temp [ 1 ] , lcd_preheat_bed_temp [ 1 ] , lcd_preheat_fan_speed [ 1 ] ) ; }
# endif
# endif
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
void lcd_preheat_m1_all ( ) {
# if HOTENDS > 1
@ -1175,9 +1182,12 @@ void kill_screen(const char* lcd_msg) {
thermalManager . setTargetHotend ( lcd_preheat_hotend_temp [ 0 ] , 2 ) ;
# if HOTENDS > 3
thermalManager . setTargetHotend ( lcd_preheat_hotend_temp [ 0 ] , 3 ) ;
# endif
# endif
# endif
# if HOTENDS > 4
thermalManager . setTargetHotend ( lcd_preheat_hotend_temp [ 0 ] , 4 ) ;
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
# if TEMP_SENSOR_BED != 0
lcd_preheat_m1_e0 ( ) ;
# else
@ -1191,9 +1201,12 @@ void kill_screen(const char* lcd_msg) {
thermalManager . setTargetHotend ( lcd_preheat_hotend_temp [ 1 ] , 2 ) ;
# if HOTENDS > 3
thermalManager . setTargetHotend ( lcd_preheat_hotend_temp [ 1 ] , 3 ) ;
# endif
# endif
# endif
# if HOTENDS > 4
thermalManager . setTargetHotend ( lcd_preheat_hotend_temp [ 1 ] , 4 ) ;
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
# if TEMP_SENSOR_BED != 0
lcd_preheat_m2_e0 ( ) ;
# else
@ -1244,10 +1257,18 @@ void kill_screen(const char* lcd_msg) {
# else
MENU_ITEM ( function , MSG_PREHEAT_1_N MSG_H4 , lcd_preheat_m1_e3_only ) ;
# endif
# if HOTENDS > 4
# if TEMP_SENSOR_BED != 0
MENU_ITEM ( function , MSG_PREHEAT_1_N MSG_H5 , lcd_preheat_m1_e4 ) ;
MENU_ITEM ( function , MSG_PREHEAT_1_END " " MSG_E5 , lcd_preheat_m1_e4_only ) ;
# else
MENU_ITEM ( function , MSG_PREHEAT_1_N MSG_H5 , lcd_preheat_m1_e4_only ) ;
# endif
# endif
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
MENU_ITEM ( function , MSG_PREHEAT_1_ALL , lcd_preheat_m1_all ) ;
# endif
# endif // HOTENDS > 1
# if TEMP_SENSOR_BED != 0
MENU_ITEM ( function , MSG_PREHEAT_1_BEDONLY , lcd_preheat_m1_bedonly ) ;
# endif
@ -1288,10 +1309,18 @@ void kill_screen(const char* lcd_msg) {
# else
MENU_ITEM ( function , MSG_PREHEAT_2_N MSG_H4 , lcd_preheat_m2_e3_only ) ;
# endif
# if HOTENDS > 4
# if TEMP_SENSOR_BED != 0
MENU_ITEM ( function , MSG_PREHEAT_2_N MSG_H5 , lcd_preheat_m2_e4 ) ;
MENU_ITEM ( function , MSG_PREHEAT_2_END " " MSG_E5 , lcd_preheat_m2_e4_only ) ;
# else
MENU_ITEM ( function , MSG_PREHEAT_2_N MSG_H5 , lcd_preheat_m2_e4_only ) ;
# endif
# endif
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
MENU_ITEM ( function , MSG_PREHEAT_2_ALL , lcd_preheat_m2_all ) ;
# endif
# endif // HOTENDS > 1
# if TEMP_SENSOR_BED != 0
MENU_ITEM ( function , MSG_PREHEAT_2_BEDONLY , lcd_preheat_m2_bedonly ) ;
# endif
@ -2104,16 +2133,16 @@ void kill_screen(const char* lcd_msg) {
PID_PARAM ( Kd , e ) = scalePID_d ( raw_Kd ) ;
thermalManager . updatePID ( ) ;
}
# define _PIDTEMP_BASE_FUNCTIONS( eindex ) \
void copy_and_scalePID_i_E # # eindex( ) { copy_and_scalePID_i ( eindex ) ; } \
void copy_and_scalePID_d_E # # eindex( ) { copy_and_scalePID_d ( eindex ) ; }
# define _PIDTEMP_BASE_FUNCTIONS( N ) \
void copy_and_scalePID_i_E # # N( ) { copy_and_scalePID_i ( N ) ; } \
void copy_and_scalePID_d_E # # N( ) { copy_and_scalePID_d ( N ) ; }
# if ENABLED(PID_AUTOTUNE_MENU)
# define _PIDTEMP_FUNCTIONS( eindex ) \
_PIDTEMP_BASE_FUNCTIONS ( eindex ) ; \
void lcd_autotune_callback_E # # eindex( ) { _lcd_autotune ( eindex ) ; }
# define _PIDTEMP_FUNCTIONS( N ) \
_PIDTEMP_BASE_FUNCTIONS ( N ) ; \
void lcd_autotune_callback_E # # N( ) { _lcd_autotune ( N ) ; }
# else
# define _PIDTEMP_FUNCTIONS( eindex) _PIDTEMP_BASE_FUNCTIONS(eindex )
# define _PIDTEMP_FUNCTIONS( N) _PIDTEMP_BASE_FUNCTIONS(N )
# endif
_PIDTEMP_FUNCTIONS ( 0 )
@ -2124,6 +2153,9 @@ void kill_screen(const char* lcd_msg) {
_PIDTEMP_FUNCTIONS ( 2 )
# if HOTENDS > 3
_PIDTEMP_FUNCTIONS ( 3 )
# if HOTENDS > 4
_PIDTEMP_FUNCTIONS ( 4 )
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
@ -2146,27 +2178,20 @@ void kill_screen(const char* lcd_msg) {
//
// Nozzle:
// Nozzle [1- 4 ]:
// Nozzle [1- 5 ]:
//
# if HOTENDS == 1
# if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE , & thermalManager . target_temperature [ 0 ] , 0 , HEATER_0_MAXTEMP - 15 , watch_temp_callback_E0 ) ;
# endif
# else // HOTENDS > 1
# if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N1 , & thermalManager . target_temperature [ 0 ] , 0 , HEATER_0_MAXTEMP - 15 , watch_temp_callback_E0 ) ;
# endif
# if TEMP_SENSOR_1 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N2 , & thermalManager . target_temperature [ 1 ] , 0 , HEATER_1_MAXTEMP - 15 , watch_temp_callback_E1 ) ;
# endif
# if HOTENDS > 2
# if TEMP_SENSOR_2 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N3 , & thermalManager . target_temperature [ 2 ] , 0 , HEATER_2_MAXTEMP - 15 , watch_temp_callback_E2 ) ;
# endif
# if HOTENDS > 3
# if TEMP_SENSOR_3 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N4 , & thermalManager . target_temperature [ 3 ] , 0 , HEATER_3_MAXTEMP - 15 , watch_temp_callback_E3 ) ;
# endif
# if HOTENDS > 4
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( int3 , MSG_NOZZLE MSG_N5 , & thermalManager . target_temperature [ 4 ] , 0 , HEATER_4_MAXTEMP - 15 , watch_temp_callback_E4 ) ;
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# endif // HOTENDS > 1
@ -2247,6 +2272,9 @@ void kill_screen(const char* lcd_msg) {
PID_MENU_ITEMS ( " " MSG_E3 , 2 ) ;
# if HOTENDS > 3
PID_MENU_ITEMS ( " " MSG_E4 , 3 ) ;
# if HOTENDS > 4
PID_MENU_ITEMS ( " " MSG_E5 , 4 ) ;
# endif // HOTENDS > 4
# endif // HOTENDS > 3
# endif // HOTENDS > 2
# else // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
@ -2268,7 +2296,10 @@ void kill_screen(const char* lcd_msg) {
}
void _lcd_control_temperature_preheat_settings_menu ( uint8_t material ) {
# if HOTENDS > 3
# if HOTENDS > 4
# define MINTEMP_ALL MIN5(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP)
# define MAXTEMP_ALL MAX5(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP)
# elif HOTENDS > 3
# define MINTEMP_ALL MIN4(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP)
# define MAXTEMP_ALL MAX4(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP)
# elif HOTENDS > 2
@ -2462,6 +2493,9 @@ void kill_screen(const char* lcd_msg) {
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E3 , & filament_size [ 2 ] , 1.5 , 3.25 , calculate_volumetric_multipliers ) ;
# if EXTRUDERS > 3
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E4 , & filament_size [ 3 ] , 1.5 , 3.25 , calculate_volumetric_multipliers ) ;
# if EXTRUDERS > 4
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK ( float43 , MSG_FILAMENT_DIAM MSG_DIAM_E5 , & filament_size [ 4 ] , 1.5 , 3.25 , calculate_volumetric_multipliers ) ;
# endif // EXTRUDERS > 4
# endif // EXTRUDERS > 3
# endif // EXTRUDERS > 2
# endif // EXTRUDERS > 1