浏览代码

Ender 3 V2 DWIN cleanup (#21026)

Scott Lahteine 4 年前
父节点
当前提交
662d81c801
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 110 次插入124 次删除
  1. 4
    4
      Marlin/src/core/macros.h
  2. 100
    114
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  3. 6
    6
      Marlin/src/lcd/dwin/e3v2/dwin.h

+ 4
- 4
Marlin/src/core/macros.h 查看文件

130
 
130
 
131
   #define NOLESS(v, n) \
131
   #define NOLESS(v, n) \
132
     do{ \
132
     do{ \
133
-      __typeof__(n) _n = (n); \
133
+      __typeof__(v) _n = (n); \
134
       if (_n > v) v = _n; \
134
       if (_n > v) v = _n; \
135
     }while(0)
135
     }while(0)
136
 
136
 
137
   #define NOMORE(v, n) \
137
   #define NOMORE(v, n) \
138
     do{ \
138
     do{ \
139
-      __typeof__(n) _n = (n); \
139
+      __typeof__(v) _n = (n); \
140
       if (_n < v) v = _n; \
140
       if (_n < v) v = _n; \
141
     }while(0)
141
     }while(0)
142
 
142
 
143
   #define LIMIT(v, n1, n2) \
143
   #define LIMIT(v, n1, n2) \
144
     do{ \
144
     do{ \
145
-      __typeof__(n1) _n1 = (n1); \
146
-      __typeof__(n2) _n2 = (n2); \
145
+      __typeof__(v) _n1 = (n1); \
146
+      __typeof__(v) _n2 = (n2); \
147
       if (_n1 > v) v = _n1; \
147
       if (_n1 > v) v = _n1; \
148
       else if (_n2 < v) v = _n2; \
148
       else if (_n2 < v) v = _n2; \
149
     }while(0)
149
     }while(0)

+ 100
- 114
Marlin/src/lcd/dwin/e3v2/dwin.cpp 查看文件

191
   constexpr float default_max_jerk[]          = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK };
191
   constexpr float default_max_jerk[]          = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK };
192
 #endif
192
 #endif
193
 
193
 
194
-uint8_t Percentrecord = 0;
195
-uint16_t remain_time = 0;
194
+static uint8_t _card_percent = 0;
195
+static uint16_t _remain_time = 0;
196
 
196
 
197
 #if ENABLED(PAUSE_HEAT)
197
 #if ENABLED(PAUSE_HEAT)
198
-  #if HAS_HOTEND
199
-    uint16_t temphot = 0;
200
-  #endif
201
-  #if HAS_HEATED_BED
202
-    uint16_t tempbed = 0;
203
-  #endif
198
+  TERN_(HAS_HOTEND, uint16_t resume_hotend_temp = 0);
199
+  TERN_(HAS_HEATED_BED, uint16_t resume_bed_temp = 0);
204
 #endif
200
 #endif
205
 
201
 
206
 #if HAS_ZOFFSET_ITEM
202
 #if HAS_ZOFFSET_ITEM
1081
 
1077
 
1082
 void Draw_Print_ProgressBar() {
1078
 void Draw_Print_ProgressBar() {
1083
   DWIN_ICON_Show(ICON, ICON_Bar, 15, 93);
1079
   DWIN_ICON_Show(ICON, ICON_Bar, 15, 93);
1084
-  DWIN_Draw_Rectangle(1, BarFill_Color, 16 + Percentrecord * 240 / 100, 93, 256, 113);
1085
-  DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, 133, Percentrecord);
1080
+  DWIN_Draw_Rectangle(1, BarFill_Color, 16 + _card_percent * 240 / 100, 93, 256, 113);
1081
+  DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, 133, _card_percent);
1086
   DWIN_Draw_String(false, false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%"));
1082
   DWIN_Draw_String(false, false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%"));
1087
 }
1083
 }
1088
 
1084
 
1094
 }
1090
 }
1095
 
1091
 
1096
 void Draw_Print_ProgressRemain() {
1092
 void Draw_Print_ProgressRemain() {
1097
-  DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 176, 212, remain_time / 3600);
1093
+  DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 176, 212, _remain_time / 3600);
1098
   DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":"));
1094
   DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":"));
1099
-  DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (remain_time % 3600) / 60);
1095
+  DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (_remain_time % 3600) / 60);
1100
 }
1096
 }
1101
 
1097
 
1102
 void Goto_PrintProcess() {
1098
 void Goto_PrintProcess() {
1158
 void HMI_Move_X() {
1154
 void HMI_Move_X() {
1159
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1155
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1160
   if (encoder_diffState != ENCODER_DIFF_NO) {
1156
   if (encoder_diffState != ENCODER_DIFF_NO) {
1161
-    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scale)) {
1157
+    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scaled)) {
1162
       checkkey = AxisMove;
1158
       checkkey = AxisMove;
1163
       EncoderRate.enabled = false;
1159
       EncoderRate.enabled = false;
1164
-      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale);
1160
+      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled);
1165
       if (!planner.is_full()) {
1161
       if (!planner.is_full()) {
1166
         // Wait for planner moves to finish!
1162
         // Wait for planner moves to finish!
1167
         planner.synchronize();
1163
         planner.synchronize();
1170
       DWIN_UpdateLCD();
1166
       DWIN_UpdateLCD();
1171
       return;
1167
       return;
1172
     }
1168
     }
1173
-    NOLESS(HMI_ValueStruct.Move_X_scale, (X_MIN_POS) * MINUNITMULT);
1174
-    NOMORE(HMI_ValueStruct.Move_X_scale, (X_MAX_POS) * MINUNITMULT);
1175
-    current_position.x = HMI_ValueStruct.Move_X_scale / MINUNITMULT;
1176
-    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(1), HMI_ValueStruct.Move_X_scale);
1169
+    LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT);
1170
+    current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT;
1171
+    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled);
1177
     DWIN_UpdateLCD();
1172
     DWIN_UpdateLCD();
1178
   }
1173
   }
1179
 }
1174
 }
1181
 void HMI_Move_Y() {
1176
 void HMI_Move_Y() {
1182
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1177
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1183
   if (encoder_diffState != ENCODER_DIFF_NO) {
1178
   if (encoder_diffState != ENCODER_DIFF_NO) {
1184
-    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scale)) {
1179
+    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled)) {
1185
       checkkey = AxisMove;
1180
       checkkey = AxisMove;
1186
       EncoderRate.enabled = false;
1181
       EncoderRate.enabled = false;
1187
-      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale);
1182
+      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled);
1188
       if (!planner.is_full()) {
1183
       if (!planner.is_full()) {
1189
         // Wait for planner moves to finish!
1184
         // Wait for planner moves to finish!
1190
         planner.synchronize();
1185
         planner.synchronize();
1193
       DWIN_UpdateLCD();
1188
       DWIN_UpdateLCD();
1194
       return;
1189
       return;
1195
     }
1190
     }
1196
-    NOLESS(HMI_ValueStruct.Move_Y_scale, (Y_MIN_POS) * MINUNITMULT);
1197
-    NOMORE(HMI_ValueStruct.Move_Y_scale, (Y_MAX_POS) * MINUNITMULT);
1198
-    current_position.y = HMI_ValueStruct.Move_Y_scale / MINUNITMULT;
1199
-    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale);
1191
+    LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT);
1192
+    current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT;
1193
+    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled);
1200
     DWIN_UpdateLCD();
1194
     DWIN_UpdateLCD();
1201
   }
1195
   }
1202
 }
1196
 }
1204
 void HMI_Move_Z() {
1198
 void HMI_Move_Z() {
1205
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1199
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1206
   if (encoder_diffState != ENCODER_DIFF_NO) {
1200
   if (encoder_diffState != ENCODER_DIFF_NO) {
1207
-    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scale)) {
1201
+    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled)) {
1208
       checkkey = AxisMove;
1202
       checkkey = AxisMove;
1209
       EncoderRate.enabled = false;
1203
       EncoderRate.enabled = false;
1210
-      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
1204
+      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled);
1211
       if (!planner.is_full()) {
1205
       if (!planner.is_full()) {
1212
         // Wait for planner moves to finish!
1206
         // Wait for planner moves to finish!
1213
         planner.synchronize();
1207
         planner.synchronize();
1216
       DWIN_UpdateLCD();
1210
       DWIN_UpdateLCD();
1217
       return;
1211
       return;
1218
     }
1212
     }
1219
-    NOLESS(HMI_ValueStruct.Move_Z_scale, Z_MIN_POS * MINUNITMULT);
1220
-    NOMORE(HMI_ValueStruct.Move_Z_scale, Z_MAX_POS * MINUNITMULT);
1221
-    current_position.z = HMI_ValueStruct.Move_Z_scale / MINUNITMULT;
1222
-    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
1213
+    LIMIT(HMI_ValueStruct.Move_Z_scaled, Z_MIN_POS * MINUNITMULT, Z_MAX_POS * MINUNITMULT);
1214
+    current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT;
1215
+    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled);
1223
     DWIN_UpdateLCD();
1216
     DWIN_UpdateLCD();
1224
   }
1217
   }
1225
 }
1218
 }
1227
 #if HAS_HOTEND
1220
 #if HAS_HOTEND
1228
 
1221
 
1229
   void HMI_Move_E() {
1222
   void HMI_Move_E() {
1230
-    static float last_E_scale = 0;
1223
+    static float last_E_scaled = 0;
1231
     ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1224
     ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1232
     if (encoder_diffState != ENCODER_DIFF_NO) {
1225
     if (encoder_diffState != ENCODER_DIFF_NO) {
1233
-      if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scale)) {
1226
+      if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scaled)) {
1234
         checkkey = AxisMove;
1227
         checkkey = AxisMove;
1235
         EncoderRate.enabled = false;
1228
         EncoderRate.enabled = false;
1236
-        last_E_scale = HMI_ValueStruct.Move_E_scale;
1237
-        DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
1229
+        last_E_scaled = HMI_ValueStruct.Move_E_scaled;
1230
+        DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled);
1238
         if (!planner.is_full()) {
1231
         if (!planner.is_full()) {
1239
           planner.synchronize(); // Wait for planner moves to finish!
1232
           planner.synchronize(); // Wait for planner moves to finish!
1240
           planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E), active_extruder);
1233
           planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E), active_extruder);
1242
         DWIN_UpdateLCD();
1235
         DWIN_UpdateLCD();
1243
         return;
1236
         return;
1244
       }
1237
       }
1245
-      if ((HMI_ValueStruct.Move_E_scale - last_E_scale) > (EXTRUDE_MAXLENGTH) * MINUNITMULT)
1246
-        HMI_ValueStruct.Move_E_scale = last_E_scale + (EXTRUDE_MAXLENGTH) * MINUNITMULT;
1247
-      else if ((last_E_scale - HMI_ValueStruct.Move_E_scale) > (EXTRUDE_MAXLENGTH) * MINUNITMULT)
1248
-        HMI_ValueStruct.Move_E_scale = last_E_scale - (EXTRUDE_MAXLENGTH) * MINUNITMULT;
1249
-      current_position.e = HMI_ValueStruct.Move_E_scale / MINUNITMULT;
1250
-      DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
1238
+      if ((HMI_ValueStruct.Move_E_scaled - last_E_scaled) > (EXTRUDE_MAXLENGTH) * MINUNITMULT)
1239
+        HMI_ValueStruct.Move_E_scaled = last_E_scaled + (EXTRUDE_MAXLENGTH) * MINUNITMULT;
1240
+      else if ((last_E_scaled - HMI_ValueStruct.Move_E_scaled) > (EXTRUDE_MAXLENGTH) * MINUNITMULT)
1241
+        HMI_ValueStruct.Move_E_scaled = last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT;
1242
+      current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT;
1243
+      DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled);
1251
       DWIN_UpdateLCD();
1244
       DWIN_UpdateLCD();
1252
     }
1245
     }
1253
   }
1246
   }
1277
         DWIN_UpdateLCD();
1270
         DWIN_UpdateLCD();
1278
         return;
1271
         return;
1279
       }
1272
       }
1280
-      NOLESS(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100);
1281
-      NOMORE(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MAX) * 100);
1273
+      LIMIT(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100, (Z_PROBE_OFFSET_RANGE_MAX) * 100);
1282
       last_zoffset = dwin_zoffset;
1274
       last_zoffset = dwin_zoffset;
1283
       dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f;
1275
       dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f;
1284
       #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
1276
       #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
1326
         return;
1318
         return;
1327
       }
1319
       }
1328
       // E_Temp limit
1320
       // E_Temp limit
1329
-      NOMORE(HMI_ValueStruct.E_Temp, MAX_E_TEMP);
1330
-      NOLESS(HMI_ValueStruct.E_Temp, MIN_E_TEMP);
1321
+      LIMIT(HMI_ValueStruct.E_Temp, MIN_E_TEMP, MAX_E_TEMP);
1331
       // E_Temp value
1322
       // E_Temp value
1332
       DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(temp_line), HMI_ValueStruct.E_Temp);
1323
       DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(temp_line), HMI_ValueStruct.E_Temp);
1333
     }
1324
     }
1370
         return;
1361
         return;
1371
       }
1362
       }
1372
       // Bed_Temp limit
1363
       // Bed_Temp limit
1373
-      NOMORE(HMI_ValueStruct.Bed_Temp, BED_MAX_TARGET);
1374
-      NOLESS(HMI_ValueStruct.Bed_Temp, MIN_BED_TEMP);
1364
+      LIMIT(HMI_ValueStruct.Bed_Temp, MIN_BED_TEMP, BED_MAX_TARGET);
1375
       // Bed_Temp value
1365
       // Bed_Temp value
1376
       DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(bed_line), HMI_ValueStruct.Bed_Temp);
1366
       DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(bed_line), HMI_ValueStruct.Bed_Temp);
1377
     }
1367
     }
1415
         return;
1405
         return;
1416
       }
1406
       }
1417
       // Fan_speed limit
1407
       // Fan_speed limit
1418
-      NOMORE(HMI_ValueStruct.Fan_speed, FANON);
1419
-      NOLESS(HMI_ValueStruct.Fan_speed, FANOFF);
1408
+      LIMIT(HMI_ValueStruct.Fan_speed, FANOFF, FANON);
1420
       // Fan_speed value
1409
       // Fan_speed value
1421
       DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(fan_line), HMI_ValueStruct.Fan_speed);
1410
       DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(fan_line), HMI_ValueStruct.Fan_speed);
1422
     }
1411
     }
1435
       return;
1424
       return;
1436
     }
1425
     }
1437
     // print_speed limit
1426
     // print_speed limit
1438
-    NOMORE(HMI_ValueStruct.print_speed, MAX_PRINT_SPEED);
1439
-    NOLESS(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED);
1427
+    LIMIT(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED, MAX_PRINT_SPEED);
1440
     // print_speed value
1428
     // print_speed value
1441
     DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(select_tune.now + MROWS - index_tune), HMI_ValueStruct.print_speed);
1429
     DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(select_tune.now + MROWS - index_tune), HMI_ValueStruct.print_speed);
1442
   }
1430
   }
1491
   void HMI_MaxJerkXYZE() {
1479
   void HMI_MaxJerkXYZE() {
1492
     ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1480
     ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1493
     if (encoder_diffState != ENCODER_DIFF_NO) {
1481
     if (encoder_diffState != ENCODER_DIFF_NO) {
1494
-      if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk)) {
1482
+      if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk_scaled)) {
1495
         checkkey = MaxJerk;
1483
         checkkey = MaxJerk;
1496
         EncoderRate.enabled = false;
1484
         EncoderRate.enabled = false;
1497
         if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS))
1485
         if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS))
1498
-          planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk / 10);
1499
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk);
1486
+          planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk_scaled / 10);
1487
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled);
1500
         return;
1488
         return;
1501
       }
1489
       }
1502
       // MaxJerk limit
1490
       // MaxJerk limit
1503
       if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS))
1491
       if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS))
1504
-        NOMORE(HMI_ValueStruct.Max_Jerk, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT);
1505
-      NOLESS(HMI_ValueStruct.Max_Jerk, (MIN_MAXJERK) * MINUNITMULT);
1492
+        NOMORE(HMI_ValueStruct.Max_Jerk_scaled, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT);
1493
+      NOLESS(HMI_ValueStruct.Max_Jerk_scaled, (MIN_MAXJERK) * MINUNITMULT);
1506
       // MaxJerk value
1494
       // MaxJerk value
1507
-      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk);
1495
+      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled);
1508
     }
1496
     }
1509
   }
1497
   }
1510
 
1498
 
1513
 void HMI_StepXYZE() {
1501
 void HMI_StepXYZE() {
1514
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1502
   ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
1515
   if (encoder_diffState != ENCODER_DIFF_NO) {
1503
   if (encoder_diffState != ENCODER_DIFF_NO) {
1516
-    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Step)) {
1504
+    if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Step_scaled)) {
1517
       checkkey = Step;
1505
       checkkey = Step;
1518
       EncoderRate.enabled = false;
1506
       EncoderRate.enabled = false;
1519
       if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS))
1507
       if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS))
1520
-        planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step / 10;
1521
-      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step);
1508
+        planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step_scaled / 10;
1509
+      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled);
1522
       return;
1510
       return;
1523
     }
1511
     }
1524
     // Step limit
1512
     // Step limit
1525
     if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS))
1513
     if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS))
1526
-      NOMORE(HMI_ValueStruct.Max_Step, 999.9 * MINUNITMULT);
1527
-    NOLESS(HMI_ValueStruct.Max_Step, MIN_STEP);
1514
+      NOMORE(HMI_ValueStruct.Max_Step_scaled, 999.9 * MINUNITMULT);
1515
+    NOLESS(HMI_ValueStruct.Max_Step_scaled, MIN_STEP);
1528
     // Step value
1516
     // Step value
1529
-    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step);
1517
+    DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled);
1530
   }
1518
   }
1531
 }
1519
 }
1532
 
1520
 
1533
 void update_variable() {
1521
 void update_variable() {
1534
-  #if HAS_HOTEND
1535
-    static float last_temp_hotend_target = 0, last_temp_hotend_current = 0;
1536
-  #endif
1537
-  #if HAS_HEATED_BED
1538
-    static float last_temp_bed_target = 0, last_temp_bed_current = 0;
1539
-  #endif
1540
-  #if HAS_FAN
1541
-    static uint8_t last_fan_speed = 0;
1542
-  #endif
1522
+  TERN_(HAS_HOTEND, static float last_temp_hotend_target = 0);
1523
+  TERN_(HAS_HEATED_BED, static float last_temp_bed_target = 0);
1524
+  TERN_(HAS_FAN, static uint8_t last_fan_speed = 0);
1543
 
1525
 
1544
   /* Tune page temperature update */
1526
   /* Tune page temperature update */
1545
   if (checkkey == Tune) {
1527
   if (checkkey == Tune) {
1546
     #if HAS_HOTEND
1528
     #if HAS_HOTEND
1547
-      if (last_temp_hotend_target != thermalManager.temp_hotend[0].target)
1529
+      if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) {
1548
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_TEMP + MROWS - index_tune), thermalManager.temp_hotend[0].target);
1530
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_TEMP + MROWS - index_tune), thermalManager.temp_hotend[0].target);
1531
+        last_temp_hotend_target = thermalManager.temp_hotend[0].target;
1532
+      }
1549
     #endif
1533
     #endif
1550
     #if HAS_HEATED_BED
1534
     #if HAS_HEATED_BED
1551
-      if (last_temp_bed_target != thermalManager.temp_bed.target)
1535
+      if (last_temp_bed_target != thermalManager.temp_bed.target) {
1552
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_BED + MROWS - index_tune), thermalManager.temp_bed.target);
1536
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_BED + MROWS - index_tune), thermalManager.temp_bed.target);
1537
+        last_temp_bed_target = thermalManager.temp_bed.target;
1538
+      }
1553
     #endif
1539
     #endif
1554
     #if HAS_FAN
1540
     #if HAS_FAN
1555
       if (last_fan_speed != thermalManager.fan_speed[0]) {
1541
       if (last_fan_speed != thermalManager.fan_speed[0]) {
1562
   /* Temperature page temperature update */
1548
   /* Temperature page temperature update */
1563
   if (checkkey == TemperatureID) {
1549
   if (checkkey == TemperatureID) {
1564
     #if HAS_HOTEND
1550
     #if HAS_HOTEND
1565
-      if (last_temp_hotend_target != thermalManager.temp_hotend[0].target)
1551
+      if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) {
1566
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_TEMP), thermalManager.temp_hotend[0].target);
1552
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_TEMP), thermalManager.temp_hotend[0].target);
1553
+        last_temp_hotend_target = thermalManager.temp_hotend[0].target;
1554
+      }
1567
     #endif
1555
     #endif
1568
     #if HAS_HEATED_BED
1556
     #if HAS_HEATED_BED
1569
-      if (last_temp_bed_target != thermalManager.temp_bed.target)
1557
+      if (last_temp_bed_target != thermalManager.temp_bed.target) {
1570
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_BED), thermalManager.temp_bed.target);
1558
         DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_BED), thermalManager.temp_bed.target);
1559
+        last_temp_bed_target = thermalManager.temp_bed.target;
1560
+      }
1571
     #endif
1561
     #endif
1572
     #if HAS_FAN
1562
     #if HAS_FAN
1573
       if (last_fan_speed != thermalManager.fan_speed[0]) {
1563
       if (last_fan_speed != thermalManager.fan_speed[0]) {
1579
 
1569
 
1580
   /* Bottom temperature update */
1570
   /* Bottom temperature update */
1581
   #if HAS_HOTEND
1571
   #if HAS_HOTEND
1582
-    if (last_temp_hotend_current != thermalManager.temp_hotend[0].celsius) {
1572
+    static float _hotendtemp = 0;
1573
+    if (_hotendtemp != thermalManager.temp_hotend[0].celsius) {
1583
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33, 382, thermalManager.temp_hotend[0].celsius);
1574
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33, 382, thermalManager.temp_hotend[0].celsius);
1584
-      last_temp_hotend_current = thermalManager.temp_hotend[0].celsius;
1575
+      _hotendtemp = thermalManager.temp_hotend[0].celsius;
1585
     }
1576
     }
1586
     if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) {
1577
     if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) {
1587
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_hotend[0].target);
1578
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_hotend[0].target);
1589
     }
1580
     }
1590
   #endif
1581
   #endif
1591
   #if HAS_HEATED_BED
1582
   #if HAS_HEATED_BED
1592
-    if (last_temp_bed_current != thermalManager.temp_bed.celsius) {
1583
+    static float _bedtemp = 0;
1584
+    if (_bedtemp != thermalManager.temp_bed.celsius) {
1593
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178, 382, thermalManager.temp_bed.celsius);
1585
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178, 382, thermalManager.temp_bed.celsius);
1594
-      last_temp_bed_current = thermalManager.temp_bed.celsius;
1586
+      _bedtemp = thermalManager.temp_bed.celsius;
1595
     }
1587
     }
1596
     if (last_temp_bed_target != thermalManager.temp_bed.target) {
1588
     if (last_temp_bed_target != thermalManager.temp_bed.target) {
1597
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_bed.target);
1589
       DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_bed.target);
2135
           char cmd[40];
2127
           char cmd[40];
2136
           cmd[0] = '\0';
2128
           cmd[0] = '\0';
2137
 
2129
 
2138
-          #if ENABLED(PAUSE_HEAT)
2139
-            #if HAS_HEATED_BED
2140
-              if (tempbed) sprintf_P(cmd, PSTR("M190 S%i\n"), tempbed);
2141
-            #endif
2142
-            #if HAS_HOTEND
2143
-              if (temphot) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), temphot);
2144
-            #endif
2130
+          #if BOTH(HAS_HOTEND, PAUSE_HEAT)
2131
+            if (resume_hotend_temp) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), resume_hotend_temp);
2132
+          #endif
2133
+          #if BOTH(HAS_HEATED_BED, PAUSE_HEAT)
2134
+            if (resume_bed_temp) sprintf_P(cmd, PSTR("M190 S%i\n"), resume_bed_temp);
2145
           #endif
2135
           #endif
2146
 
2136
 
2147
           strcat_P(cmd, M24_STR);
2137
           strcat_P(cmd, M24_STR);
2322
         DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(2), current_position.y * MINUNITMULT);
2312
         DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(2), current_position.y * MINUNITMULT);
2323
         DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), current_position.z * MINUNITMULT);
2313
         DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), current_position.z * MINUNITMULT);
2324
         #if HAS_HOTEND
2314
         #if HAS_HOTEND
2325
-          HMI_ValueStruct.Move_E_scale = current_position.e * MINUNITMULT;
2326
-          DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
2315
+          HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT;
2316
+          DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled);
2327
         #endif
2317
         #endif
2328
         break;
2318
         break;
2329
       case PREPARE_CASE_DISA: // Disable steppers
2319
       case PREPARE_CASE_DISA: // Disable steppers
2573
     if (HMI_flag.ETempTooLow_flag) {
2563
     if (HMI_flag.ETempTooLow_flag) {
2574
       if (encoder_diffState == ENCODER_DIFF_ENTER) {
2564
       if (encoder_diffState == ENCODER_DIFF_ENTER) {
2575
         HMI_flag.ETempTooLow_flag = false;
2565
         HMI_flag.ETempTooLow_flag = false;
2576
-        HMI_ValueStruct.Move_E_scale = current_position.e * MINUNITMULT;
2566
+        HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT;
2577
         Draw_Move_Menu();
2567
         Draw_Move_Menu();
2578
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale);
2579
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale);
2580
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
2568
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled);
2569
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled);
2570
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled);
2581
         DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), 0);
2571
         DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), 0);
2582
         DWIN_UpdateLCD();
2572
         DWIN_UpdateLCD();
2583
       }
2573
       }
2602
         break;
2592
         break;
2603
       case 1: // X axis move
2593
       case 1: // X axis move
2604
         checkkey = Move_X;
2594
         checkkey = Move_X;
2605
-        HMI_ValueStruct.Move_X_scale = current_position.x * MINUNITMULT;
2606
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale);
2595
+        HMI_ValueStruct.Move_X_scaled = current_position.x * MINUNITMULT;
2596
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled);
2607
         EncoderRate.enabled = true;
2597
         EncoderRate.enabled = true;
2608
         break;
2598
         break;
2609
       case 2: // Y axis move
2599
       case 2: // Y axis move
2610
         checkkey = Move_Y;
2600
         checkkey = Move_Y;
2611
-        HMI_ValueStruct.Move_Y_scale = current_position.y * MINUNITMULT;
2612
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale);
2601
+        HMI_ValueStruct.Move_Y_scaled = current_position.y * MINUNITMULT;
2602
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled);
2613
         EncoderRate.enabled = true;
2603
         EncoderRate.enabled = true;
2614
         break;
2604
         break;
2615
       case 3: // Z axis move
2605
       case 3: // Z axis move
2616
         checkkey = Move_Z;
2606
         checkkey = Move_Z;
2617
-        HMI_ValueStruct.Move_Z_scale = current_position.z * MINUNITMULT;
2618
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale);
2607
+        HMI_ValueStruct.Move_Z_scaled = current_position.z * MINUNITMULT;
2608
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled);
2619
         EncoderRate.enabled = true;
2609
         EncoderRate.enabled = true;
2620
         break;
2610
         break;
2621
         #if HAS_HOTEND
2611
         #if HAS_HOTEND
2630
               }
2620
               }
2631
             #endif
2621
             #endif
2632
             checkkey = Extruder;
2622
             checkkey = Extruder;
2633
-            HMI_ValueStruct.Move_E_scale = current_position.e * MINUNITMULT;
2634
-            DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale);
2623
+            HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT;
2624
+            DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled);
2635
             EncoderRate.enabled = true;
2625
             EncoderRate.enabled = true;
2636
             break;
2626
             break;
2637
         #endif
2627
         #endif
3417
       if (WITHIN(select_jerk.now, 1, 4)) {
3407
       if (WITHIN(select_jerk.now, 1, 4)) {
3418
         checkkey = MaxJerk_value;
3408
         checkkey = MaxJerk_value;
3419
         HMI_flag.jerk_axis = AxisEnum(select_jerk.now - 1);
3409
         HMI_flag.jerk_axis = AxisEnum(select_jerk.now - 1);
3420
-        HMI_ValueStruct.Max_Jerk = planner.max_jerk[HMI_flag.jerk_axis] * MINUNITMULT;
3421
-        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk);
3410
+        HMI_ValueStruct.Max_Jerk_scaled = planner.max_jerk[HMI_flag.jerk_axis] * MINUNITMULT;
3411
+        DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled);
3422
         EncoderRate.enabled = true;
3412
         EncoderRate.enabled = true;
3423
       }
3413
       }
3424
       else { // Back
3414
       else { // Back
3447
     if (WITHIN(select_step.now, 1, 4)) {
3437
     if (WITHIN(select_step.now, 1, 4)) {
3448
       checkkey = Step_value;
3438
       checkkey = Step_value;
3449
       HMI_flag.step_axis = AxisEnum(select_step.now - 1);
3439
       HMI_flag.step_axis = AxisEnum(select_step.now - 1);
3450
-      HMI_ValueStruct.Max_Step = planner.settings.axis_steps_per_mm[HMI_flag.step_axis] * MINUNITMULT;
3451
-      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step);
3440
+      HMI_ValueStruct.Max_Step_scaled = planner.settings.axis_steps_per_mm[HMI_flag.step_axis] * MINUNITMULT;
3441
+      DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled);
3452
       EncoderRate.enabled = true;
3442
       EncoderRate.enabled = true;
3453
     }
3443
     }
3454
     else { // Back
3444
     else { // Back
3499
       planner.finish_and_disable();
3489
       planner.finish_and_disable();
3500
 
3490
 
3501
       // show percent bar and value
3491
       // show percent bar and value
3502
-      Percentrecord = 0;
3492
+      _card_percent = 0;
3503
       Draw_Print_ProgressBar();
3493
       Draw_Print_ProgressBar();
3504
 
3494
 
3505
       // show print done confirm
3495
       // show print done confirm
3517
   if (HMI_flag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) {
3507
   if (HMI_flag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) {
3518
     HMI_flag.pause_action = false;
3508
     HMI_flag.pause_action = false;
3519
     #if ENABLED(PAUSE_HEAT)
3509
     #if ENABLED(PAUSE_HEAT)
3520
-      #if HAS_HEATED_BED
3521
-        tempbed = thermalManager.temp_bed.target;
3522
-      #endif
3523
-      #if HAS_HOTEND
3524
-        temphot = thermalManager.temp_hotend[0].target;
3525
-      #endif
3510
+      TERN_(HAS_HOTEND, resume_hotend_temp = thermalManager.temp_hotend[0].target);
3511
+      TERN_(HAS_HEATED_BED, resume_bed_temp = thermalManager.temp_bed.target);
3526
       thermalManager.disable_all_heaters();
3512
       thermalManager.disable_all_heaters();
3527
     #endif
3513
     #endif
3528
     queue.inject_P(PSTR("G1 F1200 X0 Y0"));
3514
     queue.inject_P(PSTR("G1 F1200 X0 Y0"));
3534
     if (last_cardpercentValue != card_pct) { // print percent
3520
     if (last_cardpercentValue != card_pct) { // print percent
3535
       last_cardpercentValue = card_pct;
3521
       last_cardpercentValue = card_pct;
3536
       if (card_pct) {
3522
       if (card_pct) {
3537
-        Percentrecord = card_pct;
3523
+        _card_percent = card_pct;
3538
         Draw_Print_ProgressBar();
3524
         Draw_Print_ProgressBar();
3539
       }
3525
       }
3540
     }
3526
     }
3551
 
3537
 
3552
     // Estimate remaining time every 20 seconds
3538
     // Estimate remaining time every 20 seconds
3553
     static millis_t next_remain_time_update = 0;
3539
     static millis_t next_remain_time_update = 0;
3554
-    if (Percentrecord > 1 && ELAPSED(ms, next_remain_time_update) && !HMI_flag.heat_flag) {
3555
-      remain_time = (elapsed.value - dwin_heat_time) / (Percentrecord * 0.01f) - (elapsed.value - dwin_heat_time);
3540
+    if (_card_percent > 1 && ELAPSED(ms, next_remain_time_update) && !HMI_flag.heat_flag) {
3541
+      _remain_time = (elapsed.value - dwin_heat_time) / (_card_percent * 0.01f) - (elapsed.value - dwin_heat_time);
3556
       next_remain_time_update += SEC_TO_MS(20);
3542
       next_remain_time_update += SEC_TO_MS(20);
3557
       Draw_Print_ProgressRemain();
3543
       Draw_Print_ProgressRemain();
3558
     }
3544
     }

+ 6
- 6
Marlin/src/lcd/dwin/e3v2/dwin.h 查看文件

240
   int16_t print_speed     = 100;
240
   int16_t print_speed     = 100;
241
   float Max_Feedspeed     = 0;
241
   float Max_Feedspeed     = 0;
242
   float Max_Acceleration  = 0;
242
   float Max_Acceleration  = 0;
243
-  float Max_Jerk          = 0;
244
-  float Max_Step          = 0;
245
-  float Move_X_scale      = 0;
246
-  float Move_Y_scale      = 0;
247
-  float Move_Z_scale      = 0;
243
+  float Max_Jerk_scaled   = 0;
244
+  float Max_Step_scaled   = 0;
245
+  float Move_X_scaled     = 0;
246
+  float Move_Y_scaled     = 0;
247
+  float Move_Z_scaled     = 0;
248
   #if HAS_HOTEND
248
   #if HAS_HOTEND
249
-    float Move_E_scale    = 0;
249
+    float Move_E_scaled   = 0;
250
   #endif
250
   #endif
251
   float offset_value      = 0;
251
   float offset_value      = 0;
252
   int8_t show_mode        = 0; // -1: Temperature control    0: Printing temperature
252
   int8_t show_mode        = 0; // -1: Temperature control    0: Printing temperature

正在加载...
取消
保存