|
|
@ -87,7 +87,7 @@ HMI_Flag HMI_flag{0}; |
|
|
|
|
|
|
|
millis_t Encoder_ms = 0; |
|
|
|
millis_t Wait_ms = 0; |
|
|
|
millis_t heat_time = 0; |
|
|
|
millis_t dwin_heat_time = 0; |
|
|
|
|
|
|
|
int checkkey = 0, last_checkkey = 0; |
|
|
|
|
|
|
@ -743,7 +743,9 @@ inline void Draw_Popup_Bkgd_60() { |
|
|
|
DWIN_Draw_Rectangle(1, Background_window, 14, 60, 271-13, 330); |
|
|
|
} |
|
|
|
|
|
|
|
void Popup_Window_ETempTooLow(void) { |
|
|
|
#if HAS_HOTEND |
|
|
|
|
|
|
|
void Popup_Window_ETempTooLow(void) { |
|
|
|
Clear_Main_Window(); |
|
|
|
Draw_Popup_Bkgd_60(); |
|
|
|
DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105); |
|
|
@ -756,7 +758,9 @@ void Popup_Window_ETempTooLow(void) { |
|
|
|
DWIN_Draw_String(false,true,font8x16, Font_window, Background_window, 20, 235, (char*)"Nozzle is too cold"); |
|
|
|
DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
void Popup_Window_Resume(void) { |
|
|
|
Clear_Popup_Area(); |
|
|
@ -1074,7 +1078,9 @@ void HMI_Zoffset(void) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void HMI_ETemp(void) { |
|
|
|
#if HAS_HOTEND |
|
|
|
|
|
|
|
void HMI_ETemp(void) { |
|
|
|
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); |
|
|
|
if (encoder_diffState != ENCODER_DIFF_NO) { |
|
|
|
if (encoder_diffState == ENCODER_DIFF_CW) |
|
|
@ -1089,14 +1095,14 @@ void HMI_ETemp(void) { |
|
|
|
} |
|
|
|
else if (HMI_ValueStruct.show_mode == -2) { |
|
|
|
checkkey = PLAPreheat; |
|
|
|
HMI_ValueStruct.preheat_hotend_temp[0] = HMI_ValueStruct.E_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[0]); |
|
|
|
ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[0].hotend_temp); |
|
|
|
return; |
|
|
|
} |
|
|
|
else if (HMI_ValueStruct.show_mode == -3) { |
|
|
|
checkkey = ABSPreheat; |
|
|
|
HMI_ValueStruct.preheat_hotend_temp[1] = HMI_ValueStruct.E_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[1]); |
|
|
|
ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[1].hotend_temp); |
|
|
|
return; |
|
|
|
} |
|
|
|
else { // tune
|
|
|
@ -1115,9 +1121,13 @@ void HMI_ETemp(void) { |
|
|
|
else // other page
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.E_Temp); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
void HMI_BedTemp(void) { |
|
|
|
#if HAS_HEATED_BED |
|
|
|
|
|
|
|
void HMI_BedTemp(void) { |
|
|
|
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); |
|
|
|
if (encoder_diffState != ENCODER_DIFF_NO) { |
|
|
|
if (encoder_diffState == ENCODER_DIFF_CW) |
|
|
@ -1132,14 +1142,14 @@ void HMI_BedTemp(void) { |
|
|
|
} |
|
|
|
else if (HMI_ValueStruct.show_mode == -2) { |
|
|
|
checkkey = PLAPreheat; |
|
|
|
HMI_ValueStruct.preheat_bed_temp[0] = HMI_ValueStruct.Bed_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[0]); |
|
|
|
ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[0].bed_temp); |
|
|
|
return; |
|
|
|
} |
|
|
|
else if (HMI_ValueStruct.show_mode == -3) { |
|
|
|
checkkey = ABSPreheat; |
|
|
|
HMI_ValueStruct.preheat_bed_temp[1] = HMI_ValueStruct.Bed_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[1]); |
|
|
|
ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[1].bed_temp); |
|
|
|
return; |
|
|
|
} |
|
|
|
else { |
|
|
@ -1158,9 +1168,13 @@ void HMI_BedTemp(void) { |
|
|
|
else // other page
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.Bed_Temp); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void HMI_FanSpeed(void) { |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_FAN |
|
|
|
|
|
|
|
void HMI_FanSpeed(void) { |
|
|
|
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); |
|
|
|
if (encoder_diffState != ENCODER_DIFF_NO) { |
|
|
|
if (encoder_diffState == ENCODER_DIFF_CW) |
|
|
@ -1175,14 +1189,14 @@ void HMI_FanSpeed(void) { |
|
|
|
} |
|
|
|
else if (HMI_ValueStruct.show_mode == -2) { |
|
|
|
checkkey = PLAPreheat; |
|
|
|
HMI_ValueStruct.preheat_fan_speed[0] = HMI_ValueStruct.Fan_speed; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[0]); |
|
|
|
ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[0].fan_speed); |
|
|
|
return; |
|
|
|
} |
|
|
|
else if (HMI_ValueStruct.show_mode == -3) { |
|
|
|
checkkey = ABSPreheat; |
|
|
|
HMI_ValueStruct.preheat_fan_speed[1] = HMI_ValueStruct.Fan_speed; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[1]); |
|
|
|
ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[1].fan_speed); |
|
|
|
return; |
|
|
|
} |
|
|
|
else { |
|
|
@ -1201,7 +1215,9 @@ void HMI_FanSpeed(void) { |
|
|
|
else // other page
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.Fan_speed); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
void HMI_PrintSpeed(void) { |
|
|
|
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); |
|
|
@ -1238,7 +1254,9 @@ void HMI_MaxFeedspeedXYZE(void) { |
|
|
|
if (HMI_flag.feedspeed_flag == X_AXIS) planner.set_max_feedrate(X_AXIS, HMI_ValueStruct.Max_Feedspeed); |
|
|
|
else if (HMI_flag.feedspeed_flag == Y_AXIS) planner.set_max_feedrate(Y_AXIS, HMI_ValueStruct.Max_Feedspeed); |
|
|
|
else if (HMI_flag.feedspeed_flag == Z_AXIS) planner.set_max_feedrate(Z_AXIS, HMI_ValueStruct.Max_Feedspeed); |
|
|
|
#if HAS_HOTEND |
|
|
|
else if (HMI_flag.feedspeed_flag == E_AXIS) planner.set_max_feedrate(E_AXIS, HMI_ValueStruct.Max_Feedspeed); |
|
|
|
#endif |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); |
|
|
|
return; |
|
|
|
} |
|
|
@ -1246,7 +1264,9 @@ void HMI_MaxFeedspeedXYZE(void) { |
|
|
|
if (HMI_flag.feedspeed_flag == X_AXIS) {if (HMI_ValueStruct.Max_Feedspeed > default_max_feedrate[X_AXIS]*2) HMI_ValueStruct.Max_Feedspeed = default_max_feedrate[X_AXIS]*2;} |
|
|
|
else if (HMI_flag.feedspeed_flag == Y_AXIS) {if (HMI_ValueStruct.Max_Feedspeed > default_max_feedrate[Y_AXIS]*2) HMI_ValueStruct.Max_Feedspeed = default_max_feedrate[Y_AXIS]*2;} |
|
|
|
else if (HMI_flag.feedspeed_flag == Z_AXIS) {if (HMI_ValueStruct.Max_Feedspeed > default_max_feedrate[Z_AXIS]*2) HMI_ValueStruct.Max_Feedspeed = default_max_feedrate[Z_AXIS]*2;} |
|
|
|
#if HAS_HOTEND |
|
|
|
else if (HMI_flag.feedspeed_flag == E_AXIS) {if (HMI_ValueStruct.Max_Feedspeed > default_max_feedrate[E_AXIS]*2) HMI_ValueStruct.Max_Feedspeed = default_max_feedrate[E_AXIS]*2;} |
|
|
|
#endif |
|
|
|
if (HMI_ValueStruct.Max_Feedspeed < min_MaxFeedspeed) HMI_ValueStruct.Max_Feedspeed = min_MaxFeedspeed; |
|
|
|
//MaxFeedspeed value
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); |
|
|
@ -1264,7 +1284,9 @@ void HMI_MaxAccelerationXYZE(void) { |
|
|
|
if (HMI_flag.acc_flag == X_AXIS) planner.set_max_acceleration(X_AXIS, HMI_ValueStruct.Max_Acceleration); |
|
|
|
else if (HMI_flag.acc_flag == Y_AXIS) planner.set_max_acceleration(Y_AXIS, HMI_ValueStruct.Max_Acceleration); |
|
|
|
else if (HMI_flag.acc_flag == Z_AXIS) planner.set_max_acceleration(Z_AXIS, HMI_ValueStruct.Max_Acceleration); |
|
|
|
#if HAS_HOTEND |
|
|
|
else if (HMI_flag.acc_flag == E_AXIS) planner.set_max_acceleration(E_AXIS, HMI_ValueStruct.Max_Acceleration); |
|
|
|
#endif |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); |
|
|
|
return; |
|
|
|
} |
|
|
@ -1272,7 +1294,9 @@ void HMI_MaxAccelerationXYZE(void) { |
|
|
|
if (HMI_flag.acc_flag == X_AXIS) {if (HMI_ValueStruct.Max_Acceleration > default_max_acceleration[X_AXIS]*2) HMI_ValueStruct.Max_Acceleration = default_max_acceleration[X_AXIS]*2;} |
|
|
|
else if (HMI_flag.acc_flag == Y_AXIS) {if (HMI_ValueStruct.Max_Acceleration > default_max_acceleration[Y_AXIS]*2) HMI_ValueStruct.Max_Acceleration = default_max_acceleration[Y_AXIS]*2;} |
|
|
|
else if (HMI_flag.acc_flag == Z_AXIS) {if (HMI_ValueStruct.Max_Acceleration > default_max_acceleration[Z_AXIS]*2) HMI_ValueStruct.Max_Acceleration = default_max_acceleration[Z_AXIS]*2;} |
|
|
|
#if HAS_HOTEND |
|
|
|
else if (HMI_flag.acc_flag == E_AXIS) {if (HMI_ValueStruct.Max_Acceleration > default_max_acceleration[E_AXIS]*2) HMI_ValueStruct.Max_Acceleration = default_max_acceleration[E_AXIS]*2;} |
|
|
|
#endif |
|
|
|
if (HMI_ValueStruct.Max_Acceleration < min_MaxAcceleration) HMI_ValueStruct.Max_Acceleration = min_MaxAcceleration; |
|
|
|
// MaxAcceleration value
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); |
|
|
@ -2105,14 +2129,14 @@ void HMI_Prepare(void) { |
|
|
|
#endif |
|
|
|
break; |
|
|
|
case 5: // PLA preheat
|
|
|
|
thermalManager.setTargetHotend(HMI_ValueStruct.preheat_hotend_temp[0], 0); |
|
|
|
thermalManager.setTargetBed(HMI_ValueStruct.preheat_bed_temp[0]); |
|
|
|
thermalManager.set_fan_speed(0, HMI_ValueStruct.preheat_fan_speed[0]); |
|
|
|
thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0); |
|
|
|
thermalManager.setTargetBed(ui.material_preset[0].bed_temp); |
|
|
|
thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed); |
|
|
|
break; |
|
|
|
case 6: // ABS preheat
|
|
|
|
thermalManager.setTargetHotend(HMI_ValueStruct.preheat_hotend_temp[1], 0); |
|
|
|
thermalManager.setTargetBed(HMI_ValueStruct.preheat_bed_temp[1]); |
|
|
|
thermalManager.set_fan_speed(0, HMI_ValueStruct.preheat_fan_speed[1]); |
|
|
|
thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0); |
|
|
|
thermalManager.setTargetBed(ui.material_preset[1].bed_temp); |
|
|
|
thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed); |
|
|
|
break; |
|
|
|
case 7: // cool
|
|
|
|
thermalManager.zero_fan_speeds(); |
|
|
@ -2287,6 +2311,7 @@ void HMI_AxisMove(void) { |
|
|
|
ENCODER_DiffState encoder_diffState = get_encoder_state(); |
|
|
|
if (encoder_diffState == ENCODER_DIFF_NO) return; |
|
|
|
|
|
|
|
#if HAS_HOTEND |
|
|
|
// popup window resume
|
|
|
|
if (HMI_flag.ETempTooLow_flag) { |
|
|
|
if (encoder_diffState == ENCODER_DIFF_ENTER) { |
|
|
@ -2301,6 +2326,8 @@ void HMI_AxisMove(void) { |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
// Avoid flicker by updating only the previous menu
|
|
|
|
if (encoder_diffState == ENCODER_DIFF_CW) { |
|
|
|
if (select_axis.inc(4)) Move_Highlight(1, select_axis.now); |
|
|
@ -2334,6 +2361,7 @@ void HMI_AxisMove(void) { |
|
|
|
DWIN_Draw_FloatValue(true,true,0,font8x16,White,Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#if HAS_HOTEND |
|
|
|
case 4: // Extruder
|
|
|
|
// window tips
|
|
|
|
#ifdef PREVENT_COLD_EXTRUSION |
|
|
@ -2349,13 +2377,14 @@ void HMI_AxisMove(void) { |
|
|
|
show_plus_or_minus(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
DWIN_UpdateLCD(); |
|
|
|
} |
|
|
|
|
|
|
|
enum |
|
|
|
|
|
|
|
/* TemperatureID */ |
|
|
|
void HMI_Temperature(void) { |
|
|
|
ENCODER_DiffState encoder_diffState = get_encoder_state(); |
|
|
@ -2376,24 +2405,31 @@ void HMI_Temperature(void) { |
|
|
|
index_control = MROWS; |
|
|
|
Draw_Control_Menu(); |
|
|
|
break; |
|
|
|
#if HAS_HOTEND |
|
|
|
case 1: // nozzle temperature
|
|
|
|
checkkey = ETemp; |
|
|
|
HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), thermalManager.temp_hotend[0].target); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_HEATED_BED |
|
|
|
case 2: // bed temperature
|
|
|
|
checkkey = BedTemp; |
|
|
|
HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), thermalManager.temp_bed.target); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_FAN |
|
|
|
case 3: // fan speed
|
|
|
|
checkkey = FanSpeed; |
|
|
|
HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), thermalManager.fan_speed[0]); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_HOTEND |
|
|
|
case 4: // PLA preheat setting
|
|
|
|
|
|
|
|
checkkey = PLAPreheat; |
|
|
@ -2438,9 +2474,9 @@ void HMI_Temperature(void) { |
|
|
|
Draw_Menu_Line(3, ICON_FanSpeed); |
|
|
|
Draw_Menu_Line(4, ICON_WriteEEPROM); |
|
|
|
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[0]); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[0]); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[0]); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[0].hotend_temp); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[0].bed_temp); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[0].fan_speed); |
|
|
|
|
|
|
|
break; |
|
|
|
case 5: // ABS preheat setting
|
|
|
@ -2489,13 +2525,12 @@ void HMI_Temperature(void) { |
|
|
|
Draw_Menu_Line(3, ICON_FanSpeed); |
|
|
|
Draw_Menu_Line(4, ICON_WriteEEPROM); |
|
|
|
|
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[1]); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[1]); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[1]); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[1].hotend_temp); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[1].bed_temp); |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[1].fan_speed); |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
DWIN_UpdateLCD(); |
|
|
@ -2792,24 +2827,30 @@ void HMI_Tune(void) { |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1+MROWS-index_tune), feedrate_percentage); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#if HAS_HOTEND |
|
|
|
case 2: // nozzle temp
|
|
|
|
checkkey = ETemp; |
|
|
|
HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2+MROWS-index_tune), thermalManager.temp_hotend[0].target); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_HEATED_BED |
|
|
|
case 3: // bed temp
|
|
|
|
checkkey = BedTemp; |
|
|
|
HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3+MROWS-index_tune), thermalManager.temp_bed.target); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_FAN |
|
|
|
case 4: // fan speed
|
|
|
|
checkkey = FanSpeed; |
|
|
|
HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(4+MROWS-index_tune), thermalManager.fan_speed[0]); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
case 5: // z-offset
|
|
|
|
checkkey = Homeoffset; |
|
|
|
HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; |
|
|
@ -2860,24 +2901,30 @@ void HMI_PLAPreheatSetting(void) { |
|
|
|
HMI_ValueStruct.show_mode = -1; |
|
|
|
Draw_Temperature_Menu(); |
|
|
|
break; |
|
|
|
#if HAS_HOTEND |
|
|
|
case 1: // set nozzle temperature
|
|
|
|
checkkey = ETemp; |
|
|
|
HMI_ValueStruct.E_Temp = HMI_ValueStruct.preheat_hotend_temp[0]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[0]); |
|
|
|
HMI_ValueStruct.E_Temp = ui.material_preset[0].hotend_temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), ui.material_preset[0].hotend_temp); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_HEATED_BED |
|
|
|
case 2: // set bed temperature
|
|
|
|
checkkey = BedTemp; |
|
|
|
HMI_ValueStruct.Bed_Temp = HMI_ValueStruct.preheat_bed_temp[0]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[0]); |
|
|
|
HMI_ValueStruct.Bed_Temp = ui.material_preset[0].bed_temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), ui.material_preset[0].bed_temp); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_FAN |
|
|
|
case 3: // set fan speed
|
|
|
|
checkkey = FanSpeed; |
|
|
|
HMI_ValueStruct.Fan_speed = HMI_ValueStruct.preheat_fan_speed[0]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[0]); |
|
|
|
HMI_ValueStruct.Fan_speed = ui.material_preset[0].fan_speed; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), ui.material_preset[0].fan_speed); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
case 4: // save PLA configuration
|
|
|
|
if (settings.save()) { |
|
|
|
buzzer.tone(100, 659); |
|
|
@ -2885,8 +2932,7 @@ void HMI_PLAPreheatSetting(void) { |
|
|
|
} |
|
|
|
else buzzer.tone(20, 440); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
default: break; |
|
|
|
} |
|
|
|
} |
|
|
|
DWIN_UpdateLCD(); |
|
|
@ -2912,24 +2958,30 @@ void HMI_ABSPreheatSetting(void) { |
|
|
|
HMI_ValueStruct.show_mode = -1; |
|
|
|
Draw_Temperature_Menu(); |
|
|
|
break; |
|
|
|
#if HAS_HOTEND |
|
|
|
case 1: // set nozzle temperature
|
|
|
|
checkkey = ETemp; |
|
|
|
HMI_ValueStruct.E_Temp = HMI_ValueStruct.preheat_hotend_temp[1]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[1]); |
|
|
|
HMI_ValueStruct.E_Temp = ui.material_preset[1].hotend_temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), ui.material_preset[1].hotend_temp); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_HEATED_BED |
|
|
|
case 2: // set bed temperature
|
|
|
|
checkkey = BedTemp; |
|
|
|
HMI_ValueStruct.Bed_Temp = HMI_ValueStruct.preheat_bed_temp[1]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[1]); |
|
|
|
HMI_ValueStruct.Bed_Temp = ui.material_preset[1].bed_temp; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), ui.material_preset[1].bed_temp); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#if HAS_FAN |
|
|
|
case 3: // set fan speed
|
|
|
|
checkkey = FanSpeed; |
|
|
|
HMI_ValueStruct.Fan_speed = HMI_ValueStruct.preheat_fan_speed[1]; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[1]); |
|
|
|
HMI_ValueStruct.Fan_speed = ui.material_preset[1].fan_speed; |
|
|
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), ui.material_preset[1].fan_speed); |
|
|
|
EncoderRate.encoderRateEnabled = 1; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
case 4: // save PLA configuration
|
|
|
|
if (settings.save()) { |
|
|
|
buzzer.tone(100, 659); |
|
|
@ -3257,7 +3309,7 @@ void EachMomentUpdate(void) { |
|
|
|
/* remain print time */ |
|
|
|
static millis_t next_remain_time_update = 0; |
|
|
|
if (elapsed.minute() > 5 && ELAPSED(ms, next_remain_time_update) && HMI_flag.heat_flag == 0) { // show after 5 min and 20s update
|
|
|
|
remain_time = ((elapsed.value - heat_time) * ((float)card.getFileSize() / (float)card.getIndex())) - (elapsed.value - heat_time); |
|
|
|
remain_time = ((elapsed.value - dwin_heat_time) * ((float)card.getFileSize() / (float)card.getIndex())) - (elapsed.value - dwin_heat_time); |
|
|
|
next_remain_time_update += 20 * 1000UL; |
|
|
|
Draw_Print_ProgressRemain(); |
|
|
|
} |
|
|
@ -3365,9 +3417,15 @@ void DWIN_HandleScreen(void) { |
|
|
|
case Move_Z: HMI_Move_Z(); break; |
|
|
|
case Extruder: HMI_Move_E(); break; |
|
|
|
case Homeoffset: HMI_Zoffset(); break; |
|
|
|
#if HAS_HOTEND |
|
|
|
case ETemp: HMI_ETemp(); break; |
|
|
|
#endif |
|
|
|
#if HAS_HEATED_BED |
|
|
|
case BedTemp: HMI_BedTemp(); break; |
|
|
|
#endif |
|
|
|
#if HAS_FAN |
|
|
|
case FanSpeed: HMI_FanSpeed(); break; |
|
|
|
#endif |
|
|
|
case PrintSpeed: HMI_PrintSpeed(); break; |
|
|
|
case MaxSpeed_value: HMI_MaxFeedspeedXYZE(); break; |
|
|
|
case MaxAcceleration_value: HMI_MaxAccelerationXYZE(); break; |
|
|
|