|
@@ -87,7 +87,7 @@ HMI_Flag HMI_flag{0};
|
87
|
87
|
|
88
|
88
|
millis_t Encoder_ms = 0;
|
89
|
89
|
millis_t Wait_ms = 0;
|
90
|
|
-millis_t heat_time = 0;
|
|
90
|
+millis_t dwin_heat_time = 0;
|
91
|
91
|
|
92
|
92
|
int checkkey = 0, last_checkkey = 0;
|
93
|
93
|
|
|
@@ -743,20 +743,24 @@ inline void Draw_Popup_Bkgd_60() {
|
743
|
743
|
DWIN_Draw_Rectangle(1, Background_window, 14, 60, 271-13, 330);
|
744
|
744
|
}
|
745
|
745
|
|
746
|
|
-void Popup_Window_ETempTooLow(void) {
|
747
|
|
- Clear_Main_Window();
|
748
|
|
- Draw_Popup_Bkgd_60();
|
749
|
|
- DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105);
|
750
|
|
- if (HMI_flag.language_flag) {
|
751
|
|
- DWIN_Frame_AreaCopy(1, 103, 371, 136, 479-93, 69, 240);
|
752
|
|
- DWIN_Frame_AreaCopy(1, 170, 371, 271-1, 479-93, 69+33, 240);
|
753
|
|
- DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280);
|
754
|
|
- }
|
755
|
|
- else {
|
756
|
|
- DWIN_Draw_String(false,true,font8x16, Font_window, Background_window, 20, 235, (char*)"Nozzle is too cold");
|
757
|
|
- DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280);
|
|
746
|
+#if HAS_HOTEND
|
|
747
|
+
|
|
748
|
+ void Popup_Window_ETempTooLow(void) {
|
|
749
|
+ Clear_Main_Window();
|
|
750
|
+ Draw_Popup_Bkgd_60();
|
|
751
|
+ DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105);
|
|
752
|
+ if (HMI_flag.language_flag) {
|
|
753
|
+ DWIN_Frame_AreaCopy(1, 103, 371, 136, 479-93, 69, 240);
|
|
754
|
+ DWIN_Frame_AreaCopy(1, 170, 371, 271-1, 479-93, 69+33, 240);
|
|
755
|
+ DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280);
|
|
756
|
+ }
|
|
757
|
+ else {
|
|
758
|
+ DWIN_Draw_String(false,true,font8x16, Font_window, Background_window, 20, 235, (char*)"Nozzle is too cold");
|
|
759
|
+ DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280);
|
|
760
|
+ }
|
758
|
761
|
}
|
759
|
|
-}
|
|
762
|
+
|
|
763
|
+#endif
|
760
|
764
|
|
761
|
765
|
void Popup_Window_Resume(void) {
|
762
|
766
|
Clear_Popup_Area();
|
|
@@ -1074,134 +1078,146 @@ void HMI_Zoffset(void) {
|
1074
|
1078
|
}
|
1075
|
1079
|
}
|
1076
|
1080
|
|
1077
|
|
-void HMI_ETemp(void) {
|
1078
|
|
- ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
1079
|
|
- if (encoder_diffState != ENCODER_DIFF_NO) {
|
1080
|
|
- if (encoder_diffState == ENCODER_DIFF_CW)
|
1081
|
|
- HMI_ValueStruct.E_Temp += EncoderRate.encoderMoveValue;
|
1082
|
|
- else if (encoder_diffState == ENCODER_DIFF_CCW)
|
1083
|
|
- HMI_ValueStruct.E_Temp -= EncoderRate.encoderMoveValue;
|
1084
|
|
- else if (encoder_diffState == ENCODER_DIFF_ENTER) { // return
|
1085
|
|
- EncoderRate.encoderRateEnabled = 0;
|
1086
|
|
- if (HMI_ValueStruct.show_mode == -1) { // temperature
|
1087
|
|
- checkkey = TemperatureID;
|
1088
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.E_Temp);
|
1089
|
|
- }
|
1090
|
|
- else if (HMI_ValueStruct.show_mode == -2) {
|
1091
|
|
- checkkey = PLAPreheat;
|
1092
|
|
- HMI_ValueStruct.preheat_hotend_temp[0] = HMI_ValueStruct.E_Temp;
|
1093
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[0]);
|
1094
|
|
- return;
|
1095
|
|
- }
|
1096
|
|
- else if (HMI_ValueStruct.show_mode == -3) {
|
1097
|
|
- checkkey = ABSPreheat;
|
1098
|
|
- HMI_ValueStruct.preheat_hotend_temp[1] = HMI_ValueStruct.E_Temp;
|
1099
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[1]);
|
|
1081
|
+#if HAS_HOTEND
|
|
1082
|
+
|
|
1083
|
+ void HMI_ETemp(void) {
|
|
1084
|
+ ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
|
1085
|
+ if (encoder_diffState != ENCODER_DIFF_NO) {
|
|
1086
|
+ if (encoder_diffState == ENCODER_DIFF_CW)
|
|
1087
|
+ HMI_ValueStruct.E_Temp += EncoderRate.encoderMoveValue;
|
|
1088
|
+ else if (encoder_diffState == ENCODER_DIFF_CCW)
|
|
1089
|
+ HMI_ValueStruct.E_Temp -= EncoderRate.encoderMoveValue;
|
|
1090
|
+ else if (encoder_diffState == ENCODER_DIFF_ENTER) { // return
|
|
1091
|
+ EncoderRate.encoderRateEnabled = 0;
|
|
1092
|
+ if (HMI_ValueStruct.show_mode == -1) { // temperature
|
|
1093
|
+ checkkey = TemperatureID;
|
|
1094
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.E_Temp);
|
|
1095
|
+ }
|
|
1096
|
+ else if (HMI_ValueStruct.show_mode == -2) {
|
|
1097
|
+ checkkey = PLAPreheat;
|
|
1098
|
+ ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp;
|
|
1099
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[0].hotend_temp);
|
|
1100
|
+ return;
|
|
1101
|
+ }
|
|
1102
|
+ else if (HMI_ValueStruct.show_mode == -3) {
|
|
1103
|
+ checkkey = ABSPreheat;
|
|
1104
|
+ ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp;
|
|
1105
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[1].hotend_temp);
|
|
1106
|
+ return;
|
|
1107
|
+ }
|
|
1108
|
+ else { // tune
|
|
1109
|
+ checkkey = Tune;
|
|
1110
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2+MROWS-index_tune), HMI_ValueStruct.E_Temp);
|
|
1111
|
+ }
|
|
1112
|
+ thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0);
|
1100
|
1113
|
return;
|
1101
|
1114
|
}
|
1102
|
|
- else { // tune
|
1103
|
|
- checkkey = Tune;
|
1104
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2+MROWS-index_tune), HMI_ValueStruct.E_Temp);
|
1105
|
|
- }
|
1106
|
|
- thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0);
|
1107
|
|
- return;
|
|
1115
|
+ // E_Temp limit
|
|
1116
|
+ NOMORE(HMI_ValueStruct.E_Temp, max_E_Temp);
|
|
1117
|
+ NOLESS(HMI_ValueStruct.E_Temp, min_E_Temp);
|
|
1118
|
+ // E_Temp value
|
|
1119
|
+ if (HMI_ValueStruct.show_mode >= 0) // tune
|
|
1120
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2+MROWS-index_tune), HMI_ValueStruct.E_Temp);
|
|
1121
|
+ else // other page
|
|
1122
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.E_Temp);
|
1108
|
1123
|
}
|
1109
|
|
- // E_Temp limit
|
1110
|
|
- NOMORE(HMI_ValueStruct.E_Temp, max_E_Temp);
|
1111
|
|
- NOLESS(HMI_ValueStruct.E_Temp, min_E_Temp);
|
1112
|
|
- // E_Temp value
|
1113
|
|
- if (HMI_ValueStruct.show_mode >= 0) // tune
|
1114
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2+MROWS-index_tune), HMI_ValueStruct.E_Temp);
|
1115
|
|
- else // other page
|
1116
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.E_Temp);
|
1117
|
1124
|
}
|
1118
|
|
-}
|
1119
|
1125
|
|
1120
|
|
-void HMI_BedTemp(void) {
|
1121
|
|
- ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
1122
|
|
- if (encoder_diffState != ENCODER_DIFF_NO) {
|
1123
|
|
- if (encoder_diffState == ENCODER_DIFF_CW)
|
1124
|
|
- HMI_ValueStruct.Bed_Temp += EncoderRate.encoderMoveValue;
|
1125
|
|
- else if (encoder_diffState == ENCODER_DIFF_CCW)
|
1126
|
|
- HMI_ValueStruct.Bed_Temp -= EncoderRate.encoderMoveValue;
|
1127
|
|
- else if (encoder_diffState == ENCODER_DIFF_ENTER) { // return
|
1128
|
|
- EncoderRate.encoderRateEnabled = 0;
|
1129
|
|
- if (HMI_ValueStruct.show_mode == -1) {
|
1130
|
|
- checkkey = TemperatureID;
|
1131
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.Bed_Temp);
|
1132
|
|
- }
|
1133
|
|
- else if (HMI_ValueStruct.show_mode == -2) {
|
1134
|
|
- checkkey = PLAPreheat;
|
1135
|
|
- HMI_ValueStruct.preheat_bed_temp[0] = HMI_ValueStruct.Bed_Temp;
|
1136
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[0]);
|
1137
|
|
- return;
|
1138
|
|
- }
|
1139
|
|
- else if (HMI_ValueStruct.show_mode == -3) {
|
1140
|
|
- checkkey = ABSPreheat;
|
1141
|
|
- HMI_ValueStruct.preheat_bed_temp[1] = HMI_ValueStruct.Bed_Temp;
|
1142
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[1]);
|
|
1126
|
+#endif
|
|
1127
|
+
|
|
1128
|
+#if HAS_HEATED_BED
|
|
1129
|
+
|
|
1130
|
+ void HMI_BedTemp(void) {
|
|
1131
|
+ ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
|
1132
|
+ if (encoder_diffState != ENCODER_DIFF_NO) {
|
|
1133
|
+ if (encoder_diffState == ENCODER_DIFF_CW)
|
|
1134
|
+ HMI_ValueStruct.Bed_Temp += EncoderRate.encoderMoveValue;
|
|
1135
|
+ else if (encoder_diffState == ENCODER_DIFF_CCW)
|
|
1136
|
+ HMI_ValueStruct.Bed_Temp -= EncoderRate.encoderMoveValue;
|
|
1137
|
+ else if (encoder_diffState == ENCODER_DIFF_ENTER) { // return
|
|
1138
|
+ EncoderRate.encoderRateEnabled = 0;
|
|
1139
|
+ if (HMI_ValueStruct.show_mode == -1) {
|
|
1140
|
+ checkkey = TemperatureID;
|
|
1141
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.Bed_Temp);
|
|
1142
|
+ }
|
|
1143
|
+ else if (HMI_ValueStruct.show_mode == -2) {
|
|
1144
|
+ checkkey = PLAPreheat;
|
|
1145
|
+ ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp;
|
|
1146
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[0].bed_temp);
|
|
1147
|
+ return;
|
|
1148
|
+ }
|
|
1149
|
+ else if (HMI_ValueStruct.show_mode == -3) {
|
|
1150
|
+ checkkey = ABSPreheat;
|
|
1151
|
+ ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp;
|
|
1152
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[1].bed_temp);
|
|
1153
|
+ return;
|
|
1154
|
+ }
|
|
1155
|
+ else {
|
|
1156
|
+ checkkey = Tune;
|
|
1157
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3+MROWS-index_tune), HMI_ValueStruct.Bed_Temp);
|
|
1158
|
+ }
|
|
1159
|
+ thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp);
|
1143
|
1160
|
return;
|
1144
|
1161
|
}
|
1145
|
|
- else {
|
1146
|
|
- checkkey = Tune;
|
1147
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3+MROWS-index_tune), HMI_ValueStruct.Bed_Temp);
|
1148
|
|
- }
|
1149
|
|
- thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp);
|
1150
|
|
- return;
|
|
1162
|
+ //Bed_Temp limit
|
|
1163
|
+ NOMORE(HMI_ValueStruct.Bed_Temp, max_Bed_Temp);
|
|
1164
|
+ NOLESS(HMI_ValueStruct.Bed_Temp, min_Bed_Temp);
|
|
1165
|
+ //Bed_Temp value
|
|
1166
|
+ if (HMI_ValueStruct.show_mode >= 0) // tune page
|
|
1167
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3+MROWS-index_tune), HMI_ValueStruct.Bed_Temp);
|
|
1168
|
+ else // other page
|
|
1169
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.Bed_Temp);
|
1151
|
1170
|
}
|
1152
|
|
- //Bed_Temp limit
|
1153
|
|
- NOMORE(HMI_ValueStruct.Bed_Temp, max_Bed_Temp);
|
1154
|
|
- NOLESS(HMI_ValueStruct.Bed_Temp, min_Bed_Temp);
|
1155
|
|
- //Bed_Temp value
|
1156
|
|
- if (HMI_ValueStruct.show_mode >= 0) // tune page
|
1157
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3+MROWS-index_tune), HMI_ValueStruct.Bed_Temp);
|
1158
|
|
- else // other page
|
1159
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.Bed_Temp);
|
1160
|
1171
|
}
|
1161
|
|
-}
|
1162
|
1172
|
|
1163
|
|
-void HMI_FanSpeed(void) {
|
1164
|
|
- ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
1165
|
|
- if (encoder_diffState != ENCODER_DIFF_NO) {
|
1166
|
|
- if (encoder_diffState == ENCODER_DIFF_CW)
|
1167
|
|
- HMI_ValueStruct.Fan_speed += EncoderRate.encoderMoveValue;
|
1168
|
|
- else if (encoder_diffState == ENCODER_DIFF_CCW)
|
1169
|
|
- HMI_ValueStruct.Fan_speed -= EncoderRate.encoderMoveValue;
|
1170
|
|
- else if (encoder_diffState == ENCODER_DIFF_ENTER) { // return
|
1171
|
|
- EncoderRate.encoderRateEnabled = 0;
|
1172
|
|
- if (HMI_ValueStruct.show_mode == -1) {
|
1173
|
|
- checkkey = TemperatureID;
|
1174
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.Fan_speed);
|
1175
|
|
- }
|
1176
|
|
- else if (HMI_ValueStruct.show_mode == -2) {
|
1177
|
|
- checkkey = PLAPreheat;
|
1178
|
|
- HMI_ValueStruct.preheat_fan_speed[0] = HMI_ValueStruct.Fan_speed;
|
1179
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[0]);
|
1180
|
|
- return;
|
1181
|
|
- }
|
1182
|
|
- else if (HMI_ValueStruct.show_mode == -3) {
|
1183
|
|
- checkkey = ABSPreheat;
|
1184
|
|
- HMI_ValueStruct.preheat_fan_speed[1] = HMI_ValueStruct.Fan_speed;
|
1185
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[1]);
|
|
1173
|
+#endif
|
|
1174
|
+
|
|
1175
|
+#if HAS_FAN
|
|
1176
|
+
|
|
1177
|
+ void HMI_FanSpeed(void) {
|
|
1178
|
+ ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
|
1179
|
+ if (encoder_diffState != ENCODER_DIFF_NO) {
|
|
1180
|
+ if (encoder_diffState == ENCODER_DIFF_CW)
|
|
1181
|
+ HMI_ValueStruct.Fan_speed += EncoderRate.encoderMoveValue;
|
|
1182
|
+ else if (encoder_diffState == ENCODER_DIFF_CCW)
|
|
1183
|
+ HMI_ValueStruct.Fan_speed -= EncoderRate.encoderMoveValue;
|
|
1184
|
+ else if (encoder_diffState == ENCODER_DIFF_ENTER) { // return
|
|
1185
|
+ EncoderRate.encoderRateEnabled = 0;
|
|
1186
|
+ if (HMI_ValueStruct.show_mode == -1) {
|
|
1187
|
+ checkkey = TemperatureID;
|
|
1188
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.Fan_speed);
|
|
1189
|
+ }
|
|
1190
|
+ else if (HMI_ValueStruct.show_mode == -2) {
|
|
1191
|
+ checkkey = PLAPreheat;
|
|
1192
|
+ ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed;
|
|
1193
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[0].fan_speed);
|
|
1194
|
+ return;
|
|
1195
|
+ }
|
|
1196
|
+ else if (HMI_ValueStruct.show_mode == -3) {
|
|
1197
|
+ checkkey = ABSPreheat;
|
|
1198
|
+ ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed;
|
|
1199
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[1].fan_speed);
|
|
1200
|
+ return;
|
|
1201
|
+ }
|
|
1202
|
+ else {
|
|
1203
|
+ checkkey = Tune;
|
|
1204
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(4+MROWS-index_tune), HMI_ValueStruct.Fan_speed);
|
|
1205
|
+ }
|
|
1206
|
+ thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed);
|
1186
|
1207
|
return;
|
1187
|
1208
|
}
|
1188
|
|
- else {
|
1189
|
|
- checkkey = Tune;
|
1190
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(4+MROWS-index_tune), HMI_ValueStruct.Fan_speed);
|
1191
|
|
- }
|
1192
|
|
- thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed);
|
1193
|
|
- return;
|
|
1209
|
+ //Fan_speed limit
|
|
1210
|
+ NOMORE(HMI_ValueStruct.Fan_speed, FanOn);
|
|
1211
|
+ NOLESS(HMI_ValueStruct.Fan_speed, FanOff);
|
|
1212
|
+ // Fan_speed value
|
|
1213
|
+ if (HMI_ValueStruct.show_mode >= 0) // tune page
|
|
1214
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(4+MROWS-index_tune), HMI_ValueStruct.Fan_speed);
|
|
1215
|
+ else // other page
|
|
1216
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.Fan_speed);
|
1194
|
1217
|
}
|
1195
|
|
- //Fan_speed limit
|
1196
|
|
- NOMORE(HMI_ValueStruct.Fan_speed, FanOn);
|
1197
|
|
- NOLESS(HMI_ValueStruct.Fan_speed, FanOff);
|
1198
|
|
- // Fan_speed value
|
1199
|
|
- if (HMI_ValueStruct.show_mode >= 0) // tune page
|
1200
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(4+MROWS-index_tune), HMI_ValueStruct.Fan_speed);
|
1201
|
|
- else // other page
|
1202
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.Fan_speed);
|
1203
|
1218
|
}
|
1204
|
|
-}
|
|
1219
|
+
|
|
1220
|
+#endif
|
1205
|
1221
|
|
1206
|
1222
|
void HMI_PrintSpeed(void) {
|
1207
|
1223
|
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
|
@@ -1238,7 +1254,9 @@ void HMI_MaxFeedspeedXYZE(void) {
|
1238
|
1254
|
if (HMI_flag.feedspeed_flag == X_AXIS) planner.set_max_feedrate(X_AXIS, HMI_ValueStruct.Max_Feedspeed);
|
1239
|
1255
|
else if (HMI_flag.feedspeed_flag == Y_AXIS) planner.set_max_feedrate(Y_AXIS, HMI_ValueStruct.Max_Feedspeed);
|
1240
|
1256
|
else if (HMI_flag.feedspeed_flag == Z_AXIS) planner.set_max_feedrate(Z_AXIS, HMI_ValueStruct.Max_Feedspeed);
|
1241
|
|
- else if (HMI_flag.feedspeed_flag == E_AXIS) planner.set_max_feedrate(E_AXIS, HMI_ValueStruct.Max_Feedspeed);
|
|
1257
|
+ #if HAS_HOTEND
|
|
1258
|
+ else if (HMI_flag.feedspeed_flag == E_AXIS) planner.set_max_feedrate(E_AXIS, HMI_ValueStruct.Max_Feedspeed);
|
|
1259
|
+ #endif
|
1242
|
1260
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed);
|
1243
|
1261
|
return;
|
1244
|
1262
|
}
|
|
@@ -1246,7 +1264,9 @@ void HMI_MaxFeedspeedXYZE(void) {
|
1246
|
1264
|
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;}
|
1247
|
1265
|
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;}
|
1248
|
1266
|
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;}
|
1249
|
|
- 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;}
|
|
1267
|
+ #if HAS_HOTEND
|
|
1268
|
+ 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;}
|
|
1269
|
+ #endif
|
1250
|
1270
|
if (HMI_ValueStruct.Max_Feedspeed < min_MaxFeedspeed) HMI_ValueStruct.Max_Feedspeed = min_MaxFeedspeed;
|
1251
|
1271
|
//MaxFeedspeed value
|
1252
|
1272
|
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) {
|
1264
|
1284
|
if (HMI_flag.acc_flag == X_AXIS) planner.set_max_acceleration(X_AXIS, HMI_ValueStruct.Max_Acceleration);
|
1265
|
1285
|
else if (HMI_flag.acc_flag == Y_AXIS) planner.set_max_acceleration(Y_AXIS, HMI_ValueStruct.Max_Acceleration);
|
1266
|
1286
|
else if (HMI_flag.acc_flag == Z_AXIS) planner.set_max_acceleration(Z_AXIS, HMI_ValueStruct.Max_Acceleration);
|
1267
|
|
- else if (HMI_flag.acc_flag == E_AXIS) planner.set_max_acceleration(E_AXIS, HMI_ValueStruct.Max_Acceleration);
|
|
1287
|
+ #if HAS_HOTEND
|
|
1288
|
+ else if (HMI_flag.acc_flag == E_AXIS) planner.set_max_acceleration(E_AXIS, HMI_ValueStruct.Max_Acceleration);
|
|
1289
|
+ #endif
|
1268
|
1290
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration);
|
1269
|
1291
|
return;
|
1270
|
1292
|
}
|
|
@@ -1272,7 +1294,9 @@ void HMI_MaxAccelerationXYZE(void) {
|
1272
|
1294
|
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;}
|
1273
|
1295
|
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;}
|
1274
|
1296
|
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;}
|
1275
|
|
- 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;}
|
|
1297
|
+ #if HAS_HOTEND
|
|
1298
|
+ 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;}
|
|
1299
|
+ #endif
|
1276
|
1300
|
if (HMI_ValueStruct.Max_Acceleration < min_MaxAcceleration) HMI_ValueStruct.Max_Acceleration = min_MaxAcceleration;
|
1277
|
1301
|
// MaxAcceleration value
|
1278
|
1302
|
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) {
|
2105
|
2129
|
#endif
|
2106
|
2130
|
break;
|
2107
|
2131
|
case 5: // PLA preheat
|
2108
|
|
- thermalManager.setTargetHotend(HMI_ValueStruct.preheat_hotend_temp[0], 0);
|
2109
|
|
- thermalManager.setTargetBed(HMI_ValueStruct.preheat_bed_temp[0]);
|
2110
|
|
- thermalManager.set_fan_speed(0, HMI_ValueStruct.preheat_fan_speed[0]);
|
|
2132
|
+ thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0);
|
|
2133
|
+ thermalManager.setTargetBed(ui.material_preset[0].bed_temp);
|
|
2134
|
+ thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed);
|
2111
|
2135
|
break;
|
2112
|
2136
|
case 6: // ABS preheat
|
2113
|
|
- thermalManager.setTargetHotend(HMI_ValueStruct.preheat_hotend_temp[1], 0);
|
2114
|
|
- thermalManager.setTargetBed(HMI_ValueStruct.preheat_bed_temp[1]);
|
2115
|
|
- thermalManager.set_fan_speed(0, HMI_ValueStruct.preheat_fan_speed[1]);
|
|
2137
|
+ thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0);
|
|
2138
|
+ thermalManager.setTargetBed(ui.material_preset[1].bed_temp);
|
|
2139
|
+ thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed);
|
2116
|
2140
|
break;
|
2117
|
2141
|
case 7: // cool
|
2118
|
2142
|
thermalManager.zero_fan_speeds();
|
|
@@ -2287,20 +2311,23 @@ void HMI_AxisMove(void) {
|
2287
|
2311
|
ENCODER_DiffState encoder_diffState = get_encoder_state();
|
2288
|
2312
|
if (encoder_diffState == ENCODER_DIFF_NO) return;
|
2289
|
2313
|
|
2290
|
|
- // popup window resume
|
2291
|
|
- if (HMI_flag.ETempTooLow_flag) {
|
2292
|
|
- if (encoder_diffState == ENCODER_DIFF_ENTER) {
|
2293
|
|
- HMI_flag.ETempTooLow_flag = 0;
|
2294
|
|
- Draw_Move_Menu();
|
2295
|
|
- current_position.e = HMI_ValueStruct.Move_E_scale = 0;
|
2296
|
|
- DWIN_Draw_FloatValue(true,true,0,font8x16,White,Background_black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale);
|
2297
|
|
- DWIN_Draw_FloatValue(true,true,0,font8x16,White,Background_black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale);
|
2298
|
|
- DWIN_Draw_FloatValue(true,true,0,font8x16,White,Background_black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
|
2299
|
|
- show_plus_or_minus(font8x16, Background_black, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
|
2300
|
|
- DWIN_UpdateLCD();
|
|
2314
|
+ #if HAS_HOTEND
|
|
2315
|
+ // popup window resume
|
|
2316
|
+ if (HMI_flag.ETempTooLow_flag) {
|
|
2317
|
+ if (encoder_diffState == ENCODER_DIFF_ENTER) {
|
|
2318
|
+ HMI_flag.ETempTooLow_flag = 0;
|
|
2319
|
+ Draw_Move_Menu();
|
|
2320
|
+ current_position.e = HMI_ValueStruct.Move_E_scale = 0;
|
|
2321
|
+ DWIN_Draw_FloatValue(true,true,0,font8x16,White,Background_black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale);
|
|
2322
|
+ DWIN_Draw_FloatValue(true,true,0,font8x16,White,Background_black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale);
|
|
2323
|
+ DWIN_Draw_FloatValue(true,true,0,font8x16,White,Background_black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
|
|
2324
|
+ show_plus_or_minus(font8x16, Background_black, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
|
|
2325
|
+ DWIN_UpdateLCD();
|
|
2326
|
+ }
|
|
2327
|
+ return;
|
2301
|
2328
|
}
|
2302
|
|
- return;
|
2303
|
|
- }
|
|
2329
|
+ #endif
|
|
2330
|
+
|
2304
|
2331
|
// Avoid flicker by updating only the previous menu
|
2305
|
2332
|
if (encoder_diffState == ENCODER_DIFF_CW) {
|
2306
|
2333
|
if (select_axis.inc(4)) Move_Highlight(1, select_axis.now);
|
|
@@ -2334,28 +2361,30 @@ void HMI_AxisMove(void) {
|
2334
|
2361
|
DWIN_Draw_FloatValue(true,true,0,font8x16,White,Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
|
2335
|
2362
|
EncoderRate.encoderRateEnabled = 1;
|
2336
|
2363
|
break;
|
2337
|
|
- case 4: // Extruder
|
2338
|
|
- // window tips
|
2339
|
|
- #ifdef PREVENT_COLD_EXTRUSION
|
2340
|
|
- if (thermalManager.temp_hotend[0].celsius < EXTRUDE_MINTEMP) {
|
2341
|
|
- HMI_flag.ETempTooLow_flag = 1;
|
2342
|
|
- Popup_Window_ETempTooLow();
|
2343
|
|
- DWIN_UpdateLCD();
|
2344
|
|
- return;
|
2345
|
|
- }
|
2346
|
|
- #endif
|
2347
|
|
- checkkey = Extruder;
|
2348
|
|
- HMI_ValueStruct.Move_E_scale = current_position.e*MinUnitMult;
|
2349
|
|
- show_plus_or_minus(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
|
2350
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2351
|
|
- break;
|
2352
|
|
- default:
|
2353
|
|
- break;
|
|
2364
|
+ #if HAS_HOTEND
|
|
2365
|
+ case 4: // Extruder
|
|
2366
|
+ // window tips
|
|
2367
|
+ #ifdef PREVENT_COLD_EXTRUSION
|
|
2368
|
+ if (thermalManager.temp_hotend[0].celsius < EXTRUDE_MINTEMP) {
|
|
2369
|
+ HMI_flag.ETempTooLow_flag = 1;
|
|
2370
|
+ Popup_Window_ETempTooLow();
|
|
2371
|
+ DWIN_UpdateLCD();
|
|
2372
|
+ return;
|
|
2373
|
+ }
|
|
2374
|
+ #endif
|
|
2375
|
+ checkkey = Extruder;
|
|
2376
|
+ HMI_ValueStruct.Move_E_scale = current_position.e*MinUnitMult;
|
|
2377
|
+ show_plus_or_minus(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
|
|
2378
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2379
|
+ break;
|
|
2380
|
+ #endif
|
2354
|
2381
|
}
|
2355
|
2382
|
}
|
2356
|
2383
|
DWIN_UpdateLCD();
|
2357
|
2384
|
}
|
2358
|
2385
|
|
|
2386
|
+enum
|
|
2387
|
+
|
2359
|
2388
|
/* TemperatureID */
|
2360
|
2389
|
void HMI_Temperature(void) {
|
2361
|
2390
|
ENCODER_DiffState encoder_diffState = get_encoder_state();
|
|
@@ -2376,126 +2405,132 @@ void HMI_Temperature(void) {
|
2376
|
2405
|
index_control = MROWS;
|
2377
|
2406
|
Draw_Control_Menu();
|
2378
|
2407
|
break;
|
2379
|
|
- case 1: // nozzle temperature
|
2380
|
|
- checkkey = ETemp;
|
2381
|
|
- HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target;
|
2382
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), thermalManager.temp_hotend[0].target);
|
2383
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2384
|
|
- break;
|
2385
|
|
- case 2: // bed temperature
|
2386
|
|
- checkkey = BedTemp;
|
2387
|
|
- HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target;
|
2388
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), thermalManager.temp_bed.target);
|
2389
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2390
|
|
- break;
|
2391
|
|
- case 3: // fan speed
|
2392
|
|
- checkkey = FanSpeed;
|
2393
|
|
- HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0];
|
2394
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), thermalManager.fan_speed[0]);
|
2395
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2396
|
|
- break;
|
2397
|
|
- case 4: // PLA preheat setting
|
|
2408
|
+ #if HAS_HOTEND
|
|
2409
|
+ case 1: // nozzle temperature
|
|
2410
|
+ checkkey = ETemp;
|
|
2411
|
+ HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target;
|
|
2412
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), thermalManager.temp_hotend[0].target);
|
|
2413
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2414
|
+ break;
|
|
2415
|
+ #endif
|
|
2416
|
+ #if HAS_HEATED_BED
|
|
2417
|
+ case 2: // bed temperature
|
|
2418
|
+ checkkey = BedTemp;
|
|
2419
|
+ HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target;
|
|
2420
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), thermalManager.temp_bed.target);
|
|
2421
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2422
|
+ break;
|
|
2423
|
+ #endif
|
|
2424
|
+ #if HAS_FAN
|
|
2425
|
+ case 3: // fan speed
|
|
2426
|
+ checkkey = FanSpeed;
|
|
2427
|
+ HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0];
|
|
2428
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), thermalManager.fan_speed[0]);
|
|
2429
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2430
|
+ break;
|
|
2431
|
+ #endif
|
|
2432
|
+ #if HAS_HOTEND
|
|
2433
|
+ case 4: // PLA preheat setting
|
2398
|
2434
|
|
2399
|
|
- checkkey = PLAPreheat;
|
2400
|
|
- select_PLA.reset();
|
2401
|
|
- HMI_ValueStruct.show_mode = -2;
|
|
2435
|
+ checkkey = PLAPreheat;
|
|
2436
|
+ select_PLA.reset();
|
|
2437
|
+ HMI_ValueStruct.show_mode = -2;
|
2402
|
2438
|
|
2403
|
|
- Clear_Main_Window();
|
|
2439
|
+ Clear_Main_Window();
|
2404
|
2440
|
|
2405
|
|
- if (HMI_flag.language_flag) {
|
2406
|
|
- DWIN_Frame_AreaCopy(1, 59, 16, 271-132, 479-450, 14, 8);
|
2407
|
|
-
|
2408
|
|
- DWIN_Frame_AreaCopy(1, 100, 89, 124, 479-378, LBLX, MBASE(1));
|
2409
|
|
- DWIN_Frame_AreaCopy(1, 1, 134, 271-215, 479-333, LBLX+24, MBASE(1)); // PLA nozzle temp
|
2410
|
|
- DWIN_Frame_AreaCopy(1, 100, 89, 124, 479-378, LBLX, MBASE(2));
|
2411
|
|
- DWIN_Frame_AreaCopy(1, 58, 134, 271-158, 479-333, LBLX+24, MBASE(2)); // PLA bed temp
|
2412
|
|
- DWIN_Frame_AreaCopy(1, 100, 89, 124, 479-378, LBLX, MBASE(3));
|
2413
|
|
- DWIN_Frame_AreaCopy(1, 115, 134, 271-101, 479-333, LBLX+24, MBASE(3)); // PLA fan speed
|
2414
|
|
- DWIN_Frame_AreaCopy(1, 72, 148, 271-120, 479-317, LBLX, MBASE(4)); // save PLA configuration
|
2415
|
|
- }
|
2416
|
|
- else {
|
2417
|
|
- #ifdef USE_STRING_HEADINGS
|
2418
|
|
- Draw_Title("PLA Settings"); // TODO: GET_TEXT_F
|
2419
|
|
- #else
|
2420
|
|
- DWIN_Frame_AreaCopy(1, 56, 16, 271-130, 479-450-1, 14, 8);
|
2421
|
|
- #endif
|
|
2441
|
+ if (HMI_flag.language_flag) {
|
|
2442
|
+ DWIN_Frame_AreaCopy(1, 59, 16, 271-132, 479-450, 14, 8);
|
2422
|
2443
|
|
2423
|
|
- DWIN_Frame_AreaCopy(1, 157, 76, 181, 479-393, LBLX, MBASE(1));
|
2424
|
|
- DWIN_Frame_AreaCopy(1, 197, 104, 271-33, 479-365, LBLX+24+3, MBASE(1));
|
2425
|
|
- DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+41+6, MBASE(1)); // PLA nozzle temp
|
2426
|
|
- DWIN_Frame_AreaCopy(1, 157, 76, 181, 479-393, LBLX, MBASE(2)+3);
|
2427
|
|
- DWIN_Frame_AreaCopy(1, 240, 104, 271-7, 479-365, LBLX+24+3, MBASE(2)+3);
|
2428
|
|
- DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+24+6, MBASE(2)+3); // PLA bed temp
|
2429
|
|
- DWIN_Frame_AreaCopy(1, 157, 76, 181, 479-393, LBLX, MBASE(3));
|
2430
|
|
- DWIN_Frame_AreaCopy(1, 0, 119, 271-207, 479-347, LBLX+24+3, MBASE(3)); // PLA fan speed
|
2431
|
|
- DWIN_Frame_AreaCopy(1, 97, 165, 271-42, 479-301-1, LBLX, MBASE(4)); // save PLA configuration
|
2432
|
|
- }
|
|
2444
|
+ DWIN_Frame_AreaCopy(1, 100, 89, 124, 479-378, LBLX, MBASE(1));
|
|
2445
|
+ DWIN_Frame_AreaCopy(1, 1, 134, 271-215, 479-333, LBLX+24, MBASE(1)); // PLA nozzle temp
|
|
2446
|
+ DWIN_Frame_AreaCopy(1, 100, 89, 124, 479-378, LBLX, MBASE(2));
|
|
2447
|
+ DWIN_Frame_AreaCopy(1, 58, 134, 271-158, 479-333, LBLX+24, MBASE(2)); // PLA bed temp
|
|
2448
|
+ DWIN_Frame_AreaCopy(1, 100, 89, 124, 479-378, LBLX, MBASE(3));
|
|
2449
|
+ DWIN_Frame_AreaCopy(1, 115, 134, 271-101, 479-333, LBLX+24, MBASE(3)); // PLA fan speed
|
|
2450
|
+ DWIN_Frame_AreaCopy(1, 72, 148, 271-120, 479-317, LBLX, MBASE(4)); // save PLA configuration
|
|
2451
|
+ }
|
|
2452
|
+ else {
|
|
2453
|
+ #ifdef USE_STRING_HEADINGS
|
|
2454
|
+ Draw_Title("PLA Settings"); // TODO: GET_TEXT_F
|
|
2455
|
+ #else
|
|
2456
|
+ DWIN_Frame_AreaCopy(1, 56, 16, 271-130, 479-450-1, 14, 8);
|
|
2457
|
+ #endif
|
|
2458
|
+
|
|
2459
|
+ DWIN_Frame_AreaCopy(1, 157, 76, 181, 479-393, LBLX, MBASE(1));
|
|
2460
|
+ DWIN_Frame_AreaCopy(1, 197, 104, 271-33, 479-365, LBLX+24+3, MBASE(1));
|
|
2461
|
+ DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+41+6, MBASE(1)); // PLA nozzle temp
|
|
2462
|
+ DWIN_Frame_AreaCopy(1, 157, 76, 181, 479-393, LBLX, MBASE(2)+3);
|
|
2463
|
+ DWIN_Frame_AreaCopy(1, 240, 104, 271-7, 479-365, LBLX+24+3, MBASE(2)+3);
|
|
2464
|
+ DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+24+6, MBASE(2)+3); // PLA bed temp
|
|
2465
|
+ DWIN_Frame_AreaCopy(1, 157, 76, 181, 479-393, LBLX, MBASE(3));
|
|
2466
|
+ DWIN_Frame_AreaCopy(1, 0, 119, 271-207, 479-347, LBLX+24+3, MBASE(3)); // PLA fan speed
|
|
2467
|
+ DWIN_Frame_AreaCopy(1, 97, 165, 271-42, 479-301-1, LBLX, MBASE(4)); // save PLA configuration
|
|
2468
|
+ }
|
2433
|
2469
|
|
2434
|
|
- Draw_Back_First();
|
|
2470
|
+ Draw_Back_First();
|
2435
|
2471
|
|
2436
|
|
- Draw_Menu_Line(1, ICON_SetEndTemp);
|
2437
|
|
- Draw_Menu_Line(2, ICON_SetBedTemp);
|
2438
|
|
- Draw_Menu_Line(3, ICON_FanSpeed);
|
2439
|
|
- Draw_Menu_Line(4, ICON_WriteEEPROM);
|
|
2472
|
+ Draw_Menu_Line(1, ICON_SetEndTemp);
|
|
2473
|
+ Draw_Menu_Line(2, ICON_SetBedTemp);
|
|
2474
|
+ Draw_Menu_Line(3, ICON_FanSpeed);
|
|
2475
|
+ Draw_Menu_Line(4, ICON_WriteEEPROM);
|
2440
|
2476
|
|
2441
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[0]);
|
2442
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[0]);
|
2443
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[0]);
|
|
2477
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[0].hotend_temp);
|
|
2478
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[0].bed_temp);
|
|
2479
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[0].fan_speed);
|
2444
|
2480
|
|
2445
|
|
- break;
|
2446
|
|
- case 5: // ABS preheat setting
|
|
2481
|
+ break;
|
|
2482
|
+ case 5: // ABS preheat setting
|
2447
|
2483
|
|
2448
|
|
- checkkey = ABSPreheat;
|
2449
|
|
- select_ABS.reset();
|
2450
|
|
- HMI_ValueStruct.show_mode = -3;
|
|
2484
|
+ checkkey = ABSPreheat;
|
|
2485
|
+ select_ABS.reset();
|
|
2486
|
+ HMI_ValueStruct.show_mode = -3;
|
2451
|
2487
|
|
2452
|
|
- Clear_Main_Window();
|
|
2488
|
+ Clear_Main_Window();
|
2453
|
2489
|
|
2454
|
|
- if (HMI_flag.language_flag) {
|
2455
|
|
- DWIN_Frame_AreaCopy(1, 142, 16, 271-48, 479-450, 14, 8);
|
2456
|
|
-
|
2457
|
|
- DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX, MBASE(1));
|
2458
|
|
- DWIN_Frame_AreaCopy(1, 1, 134, 271-215, 479-333, LBLX+24, MBASE(1)); // ABS nozzle temp
|
2459
|
|
- DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX, MBASE(2));
|
2460
|
|
- DWIN_Frame_AreaCopy(1, 58, 134, 271-158, 479-333, LBLX+24, MBASE(2)); // ABS bed temp
|
2461
|
|
- DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX, MBASE(3));
|
2462
|
|
- DWIN_Frame_AreaCopy(1, 115, 134, 271-101, 479-333, LBLX+24, MBASE(3)); // ABS fan speed
|
2463
|
|
- DWIN_Frame_AreaCopy(1, 72, 148, 271-120, 479-317, LBLX, MBASE(4));
|
2464
|
|
- DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX+28, MBASE(4)+2); // save ABS configuration
|
2465
|
|
- }
|
2466
|
|
- else {
|
2467
|
|
- #ifdef USE_STRING_HEADINGS
|
2468
|
|
- Draw_Title("ABS Settings"); // TODO: GET_TEXT_F
|
2469
|
|
- #else
|
2470
|
|
- DWIN_Frame_AreaCopy(1, 56, 16, 271-130, 479-450-1, 14, 8);
|
2471
|
|
- #endif
|
|
2490
|
+ if (HMI_flag.language_flag) {
|
|
2491
|
+ DWIN_Frame_AreaCopy(1, 142, 16, 271-48, 479-450, 14, 8);
|
2472
|
2492
|
|
2473
|
|
- DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX, MBASE(1));
|
2474
|
|
- DWIN_Frame_AreaCopy(1, 197, 104, 271-33, 479-365, LBLX+24+3, MBASE(1));
|
2475
|
|
- DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+41+6, MBASE(1)); // ABS nozzle temp
|
2476
|
|
- DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX, MBASE(2)+3);
|
2477
|
|
- DWIN_Frame_AreaCopy(1, 240, 104, 271-7, 479-365, LBLX+24+3, MBASE(2)+3);
|
2478
|
|
- DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+24+6, MBASE(2)+3); // ABS bed temp
|
2479
|
|
- DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX, MBASE(3));
|
2480
|
|
- DWIN_Frame_AreaCopy(1, 0, 119, 271-207, 479-347, LBLX+24+3, MBASE(3)); // ABS fan speed
|
2481
|
|
- DWIN_Frame_AreaCopy(1, 97, 165, 271-42, 479-301-1, LBLX, MBASE(4));
|
2482
|
|
- DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX+33, MBASE(4)); // save ABS configuration
|
2483
|
|
- }
|
|
2493
|
+ DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX, MBASE(1));
|
|
2494
|
+ DWIN_Frame_AreaCopy(1, 1, 134, 271-215, 479-333, LBLX+24, MBASE(1)); // ABS nozzle temp
|
|
2495
|
+ DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX, MBASE(2));
|
|
2496
|
+ DWIN_Frame_AreaCopy(1, 58, 134, 271-158, 479-333, LBLX+24, MBASE(2)); // ABS bed temp
|
|
2497
|
+ DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX, MBASE(3));
|
|
2498
|
+ DWIN_Frame_AreaCopy(1, 115, 134, 271-101, 479-333, LBLX+24, MBASE(3)); // ABS fan speed
|
|
2499
|
+ DWIN_Frame_AreaCopy(1, 72, 148, 271-120, 479-317, LBLX, MBASE(4));
|
|
2500
|
+ DWIN_Frame_AreaCopy(1, 180, 89, 204, 479-379, LBLX+28, MBASE(4)+2); // save ABS configuration
|
|
2501
|
+ }
|
|
2502
|
+ else {
|
|
2503
|
+ #ifdef USE_STRING_HEADINGS
|
|
2504
|
+ Draw_Title("ABS Settings"); // TODO: GET_TEXT_F
|
|
2505
|
+ #else
|
|
2506
|
+ DWIN_Frame_AreaCopy(1, 56, 16, 271-130, 479-450-1, 14, 8);
|
|
2507
|
+ #endif
|
|
2508
|
+
|
|
2509
|
+ DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX, MBASE(1));
|
|
2510
|
+ DWIN_Frame_AreaCopy(1, 197, 104, 271-33, 479-365, LBLX+24+3, MBASE(1));
|
|
2511
|
+ DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+41+6, MBASE(1)); // ABS nozzle temp
|
|
2512
|
+ DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX, MBASE(2)+3);
|
|
2513
|
+ DWIN_Frame_AreaCopy(1, 240, 104, 271-7, 479-365, LBLX+24+3, MBASE(2)+3);
|
|
2514
|
+ DWIN_Frame_AreaCopy(1, 1, 89, 271-188, 479-377-1, LBLX+24+24+6, MBASE(2)+3); // ABS bed temp
|
|
2515
|
+ DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX, MBASE(3));
|
|
2516
|
+ DWIN_Frame_AreaCopy(1, 0, 119, 271-207, 479-347, LBLX+24+3, MBASE(3)); // ABS fan speed
|
|
2517
|
+ DWIN_Frame_AreaCopy(1, 97, 165, 271-42, 479-301-1, LBLX, MBASE(4));
|
|
2518
|
+ DWIN_Frame_AreaCopy(1, 172, 76, 198, 479-393, LBLX+33, MBASE(4)); // save ABS configuration
|
|
2519
|
+ }
|
2484
|
2520
|
|
2485
|
|
- Draw_Back_First();
|
|
2521
|
+ Draw_Back_First();
|
2486
|
2522
|
|
2487
|
|
- Draw_Menu_Line(1, ICON_SetEndTemp);
|
2488
|
|
- Draw_Menu_Line(2, ICON_SetBedTemp);
|
2489
|
|
- Draw_Menu_Line(3, ICON_FanSpeed);
|
2490
|
|
- Draw_Menu_Line(4, ICON_WriteEEPROM);
|
|
2523
|
+ Draw_Menu_Line(1, ICON_SetEndTemp);
|
|
2524
|
+ Draw_Menu_Line(2, ICON_SetBedTemp);
|
|
2525
|
+ Draw_Menu_Line(3, ICON_FanSpeed);
|
|
2526
|
+ Draw_Menu_Line(4, ICON_WriteEEPROM);
|
2491
|
2527
|
|
2492
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[1]);
|
2493
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[1]);
|
2494
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[1]);
|
|
2528
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(1), ui.material_preset[1].hotend_temp);
|
|
2529
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(2), ui.material_preset[1].bed_temp);
|
|
2530
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Background_black, 3, 216, MBASE(3), ui.material_preset[1].fan_speed);
|
2495
|
2531
|
|
2496
|
|
- break;
|
2497
|
|
- default:
|
2498
|
|
- break;
|
|
2532
|
+ break;
|
|
2533
|
+ #endif
|
2499
|
2534
|
}
|
2500
|
2535
|
}
|
2501
|
2536
|
DWIN_UpdateLCD();
|
|
@@ -2792,24 +2827,30 @@ void HMI_Tune(void) {
|
2792
|
2827
|
DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1+MROWS-index_tune), feedrate_percentage);
|
2793
|
2828
|
EncoderRate.encoderRateEnabled = 1;
|
2794
|
2829
|
break;
|
2795
|
|
- case 2: // nozzle temp
|
2796
|
|
- checkkey = ETemp;
|
2797
|
|
- HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target;
|
2798
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2+MROWS-index_tune), thermalManager.temp_hotend[0].target);
|
2799
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2800
|
|
- break;
|
2801
|
|
- case 3: // bed temp
|
2802
|
|
- checkkey = BedTemp;
|
2803
|
|
- HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target;
|
2804
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3+MROWS-index_tune), thermalManager.temp_bed.target);
|
2805
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2806
|
|
- break;
|
2807
|
|
- case 4: // fan speed
|
2808
|
|
- checkkey = FanSpeed;
|
2809
|
|
- HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0];
|
2810
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(4+MROWS-index_tune), thermalManager.fan_speed[0]);
|
2811
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2812
|
|
- break;
|
|
2830
|
+ #if HAS_HOTEND
|
|
2831
|
+ case 2: // nozzle temp
|
|
2832
|
+ checkkey = ETemp;
|
|
2833
|
+ HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target;
|
|
2834
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2+MROWS-index_tune), thermalManager.temp_hotend[0].target);
|
|
2835
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2836
|
+ break;
|
|
2837
|
+ #endif
|
|
2838
|
+ #if HAS_HEATED_BED
|
|
2839
|
+ case 3: // bed temp
|
|
2840
|
+ checkkey = BedTemp;
|
|
2841
|
+ HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target;
|
|
2842
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3+MROWS-index_tune), thermalManager.temp_bed.target);
|
|
2843
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2844
|
+ break;
|
|
2845
|
+ #endif
|
|
2846
|
+ #if HAS_FAN
|
|
2847
|
+ case 4: // fan speed
|
|
2848
|
+ checkkey = FanSpeed;
|
|
2849
|
+ HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0];
|
|
2850
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(4+MROWS-index_tune), thermalManager.fan_speed[0]);
|
|
2851
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2852
|
+ break;
|
|
2853
|
+ #endif
|
2813
|
2854
|
case 5: // z-offset
|
2814
|
2855
|
checkkey = Homeoffset;
|
2815
|
2856
|
HMI_ValueStruct.offset_value = BABY_Z_VAR * 100;
|
|
@@ -2860,24 +2901,30 @@ void HMI_PLAPreheatSetting(void) {
|
2860
|
2901
|
HMI_ValueStruct.show_mode = -1;
|
2861
|
2902
|
Draw_Temperature_Menu();
|
2862
|
2903
|
break;
|
2863
|
|
- case 1: // set nozzle temperature
|
2864
|
|
- checkkey = ETemp;
|
2865
|
|
- HMI_ValueStruct.E_Temp = HMI_ValueStruct.preheat_hotend_temp[0];
|
2866
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[0]);
|
2867
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2868
|
|
- break;
|
2869
|
|
- case 2: // set bed temperature
|
2870
|
|
- checkkey = BedTemp;
|
2871
|
|
- HMI_ValueStruct.Bed_Temp = HMI_ValueStruct.preheat_bed_temp[0];
|
2872
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[0]);
|
2873
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2874
|
|
- break;
|
2875
|
|
- case 3: // set fan speed
|
2876
|
|
- checkkey = FanSpeed;
|
2877
|
|
- HMI_ValueStruct.Fan_speed = HMI_ValueStruct.preheat_fan_speed[0];
|
2878
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[0]);
|
2879
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2880
|
|
- break;
|
|
2904
|
+ #if HAS_HOTEND
|
|
2905
|
+ case 1: // set nozzle temperature
|
|
2906
|
+ checkkey = ETemp;
|
|
2907
|
+ HMI_ValueStruct.E_Temp = ui.material_preset[0].hotend_temp;
|
|
2908
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), ui.material_preset[0].hotend_temp);
|
|
2909
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2910
|
+ break;
|
|
2911
|
+ #endif
|
|
2912
|
+ #if HAS_HEATED_BED
|
|
2913
|
+ case 2: // set bed temperature
|
|
2914
|
+ checkkey = BedTemp;
|
|
2915
|
+ HMI_ValueStruct.Bed_Temp = ui.material_preset[0].bed_temp;
|
|
2916
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), ui.material_preset[0].bed_temp);
|
|
2917
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2918
|
+ break;
|
|
2919
|
+ #endif
|
|
2920
|
+ #if HAS_FAN
|
|
2921
|
+ case 3: // set fan speed
|
|
2922
|
+ checkkey = FanSpeed;
|
|
2923
|
+ HMI_ValueStruct.Fan_speed = ui.material_preset[0].fan_speed;
|
|
2924
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), ui.material_preset[0].fan_speed);
|
|
2925
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2926
|
+ break;
|
|
2927
|
+ #endif
|
2881
|
2928
|
case 4: // save PLA configuration
|
2882
|
2929
|
if (settings.save()) {
|
2883
|
2930
|
buzzer.tone(100, 659);
|
|
@@ -2885,8 +2932,7 @@ void HMI_PLAPreheatSetting(void) {
|
2885
|
2932
|
}
|
2886
|
2933
|
else buzzer.tone(20, 440);
|
2887
|
2934
|
break;
|
2888
|
|
- default:
|
2889
|
|
- break;
|
|
2935
|
+ default: break;
|
2890
|
2936
|
}
|
2891
|
2937
|
}
|
2892
|
2938
|
DWIN_UpdateLCD();
|
|
@@ -2912,24 +2958,30 @@ void HMI_ABSPreheatSetting(void) {
|
2912
|
2958
|
HMI_ValueStruct.show_mode = -1;
|
2913
|
2959
|
Draw_Temperature_Menu();
|
2914
|
2960
|
break;
|
2915
|
|
- case 1: // set nozzle temperature
|
2916
|
|
- checkkey = ETemp;
|
2917
|
|
- HMI_ValueStruct.E_Temp = HMI_ValueStruct.preheat_hotend_temp[1];
|
2918
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.preheat_hotend_temp[1]);
|
2919
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2920
|
|
- break;
|
2921
|
|
- case 2: // set bed temperature
|
2922
|
|
- checkkey = BedTemp;
|
2923
|
|
- HMI_ValueStruct.Bed_Temp = HMI_ValueStruct.preheat_bed_temp[1];
|
2924
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.preheat_bed_temp[1]);
|
2925
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2926
|
|
- break;
|
2927
|
|
- case 3: // set fan speed
|
2928
|
|
- checkkey = FanSpeed;
|
2929
|
|
- HMI_ValueStruct.Fan_speed = HMI_ValueStruct.preheat_fan_speed[1];
|
2930
|
|
- DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.preheat_fan_speed[1]);
|
2931
|
|
- EncoderRate.encoderRateEnabled = 1;
|
2932
|
|
- break;
|
|
2961
|
+ #if HAS_HOTEND
|
|
2962
|
+ case 1: // set nozzle temperature
|
|
2963
|
+ checkkey = ETemp;
|
|
2964
|
+ HMI_ValueStruct.E_Temp = ui.material_preset[1].hotend_temp;
|
|
2965
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(1), ui.material_preset[1].hotend_temp);
|
|
2966
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2967
|
+ break;
|
|
2968
|
+ #endif
|
|
2969
|
+ #if HAS_HEATED_BED
|
|
2970
|
+ case 2: // set bed temperature
|
|
2971
|
+ checkkey = BedTemp;
|
|
2972
|
+ HMI_ValueStruct.Bed_Temp = ui.material_preset[1].bed_temp;
|
|
2973
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(2), ui.material_preset[1].bed_temp);
|
|
2974
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2975
|
+ break;
|
|
2976
|
+ #endif
|
|
2977
|
+ #if HAS_FAN
|
|
2978
|
+ case 3: // set fan speed
|
|
2979
|
+ checkkey = FanSpeed;
|
|
2980
|
+ HMI_ValueStruct.Fan_speed = ui.material_preset[1].fan_speed;
|
|
2981
|
+ DWIN_Draw_IntValue(true,true,0,font8x16,White,Select_Color, 3, 216, MBASE(3), ui.material_preset[1].fan_speed);
|
|
2982
|
+ EncoderRate.encoderRateEnabled = 1;
|
|
2983
|
+ break;
|
|
2984
|
+ #endif
|
2933
|
2985
|
case 4: // save PLA configuration
|
2934
|
2986
|
if (settings.save()) {
|
2935
|
2987
|
buzzer.tone(100, 659);
|
|
@@ -3257,7 +3309,7 @@ void EachMomentUpdate(void) {
|
3257
|
3309
|
/* remain print time */
|
3258
|
3310
|
static millis_t next_remain_time_update = 0;
|
3259
|
3311
|
if (elapsed.minute() > 5 && ELAPSED(ms, next_remain_time_update) && HMI_flag.heat_flag == 0) { // show after 5 min and 20s update
|
3260
|
|
- remain_time = ((elapsed.value - heat_time) * ((float)card.getFileSize() / (float)card.getIndex())) - (elapsed.value - heat_time);
|
|
3312
|
+ remain_time = ((elapsed.value - dwin_heat_time) * ((float)card.getFileSize() / (float)card.getIndex())) - (elapsed.value - dwin_heat_time);
|
3261
|
3313
|
next_remain_time_update += 20 * 1000UL;
|
3262
|
3314
|
Draw_Print_ProgressRemain();
|
3263
|
3315
|
}
|
|
@@ -3365,9 +3417,15 @@ void DWIN_HandleScreen(void) {
|
3365
|
3417
|
case Move_Z: HMI_Move_Z(); break;
|
3366
|
3418
|
case Extruder: HMI_Move_E(); break;
|
3367
|
3419
|
case Homeoffset: HMI_Zoffset(); break;
|
3368
|
|
- case ETemp: HMI_ETemp(); break;
|
3369
|
|
- case BedTemp: HMI_BedTemp(); break;
|
3370
|
|
- case FanSpeed: HMI_FanSpeed(); break;
|
|
3420
|
+ #if HAS_HOTEND
|
|
3421
|
+ case ETemp: HMI_ETemp(); break;
|
|
3422
|
+ #endif
|
|
3423
|
+ #if HAS_HEATED_BED
|
|
3424
|
+ case BedTemp: HMI_BedTemp(); break;
|
|
3425
|
+ #endif
|
|
3426
|
+ #if HAS_FAN
|
|
3427
|
+ case FanSpeed: HMI_FanSpeed(); break;
|
|
3428
|
+ #endif
|
3371
|
3429
|
case PrintSpeed: HMI_PrintSpeed(); break;
|
3372
|
3430
|
case MaxSpeed_value: HMI_MaxFeedspeedXYZE(); break;
|
3373
|
3431
|
case MaxAcceleration_value: HMI_MaxAccelerationXYZE(); break;
|