Bladeren bron

Fix Ender-3 V2 DWIN with manual mesh, host prompt (#18981)

InsanityAutomation 4 jaren geleden
bovenliggende
commit
d2d6c167df
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 10 en 6 verwijderingen
  1. 10
    6
      Marlin/src/lcd/dwin/dwin.cpp

+ 10
- 6
Marlin/src/lcd/dwin/dwin.cpp Bestand weergeven

@@ -53,6 +53,10 @@
53 53
 #include "../../module/motion.h"
54 54
 #include "../../module/planner.h"
55 55
 
56
+#if ENABLED(HOST_ACTION_COMMANDS)
57
+  #include "../../feature/host_actions.h"
58
+#endif
59
+
56 60
 #if HAS_LEVELING
57 61
   #include "../../feature/bedlevel/bedlevel.h"
58 62
 #endif
@@ -124,7 +128,7 @@ constexpr uint16_t TROWS = 6, MROWS = TROWS - 1,        // Total rows, and other
124 128
 
125 129
 #define MBASE(L) (49 + (L)*MLINE)
126 130
 
127
-#define BABY_Z_VAR TERN(HAS_LEVELING, probe.offset.z, zprobe_zoffset)
131
+#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, zprobe_zoffset)
128 132
 
129 133
 /* Value Init */
130 134
 HMI_value_t HMI_ValueStruct;
@@ -1116,11 +1120,11 @@ void HMI_Zoffset(void) {
1116 1120
 
1117 1121
       if (HMI_ValueStruct.show_mode == -4) {
1118 1122
         checkkey = Prepare;
1119
-        show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(4 + MROWS - index_prepare), TERN(HAS_LEVELING, probe.offset.z * 100, HMI_ValueStruct.offset_value));
1123
+        show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(4 + MROWS - index_prepare), TERN(HAS_BED_PROBE, probe.offset.z * 100, HMI_ValueStruct.offset_value));
1120 1124
       }
1121 1125
       else {
1122 1126
         checkkey = Tune;
1123
-        show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(5 + MROWS - index_tune), TERN(HAS_LEVELING, probe.offset.z * 100, HMI_ValueStruct.offset_value));
1127
+        show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(5 + MROWS - index_tune), TERN(HAS_BED_PROBE, probe.offset.z * 100, HMI_ValueStruct.offset_value));
1124 1128
       }
1125 1129
       DWIN_UpdateLCD();
1126 1130
       return;
@@ -1484,7 +1488,7 @@ void update_variable(void) {
1484 1488
     DWIN_Draw_IntValue(true, true, 0, STAT_FONT, White, Background_black, 3, 33 + 2 * STAT_CHR_W, 429, feedrate_percentage);
1485 1489
     last_speed = feedrate_percentage;
1486 1490
   }
1487
-  #if HAS_LEVELING
1491
+  #if HAS_BED_PROBE
1488 1492
     if (last_probe_zoffset != probe.offset.z) {
1489 1493
       show_plus_or_minus(STAT_FONT, Background_black, 2, 2, 178 + STAT_CHR_W, 429, probe.offset.z * 100);
1490 1494
       last_probe_zoffset = probe.offset.z;
@@ -2188,7 +2192,7 @@ void HMI_Prepare(void) {
2188 2192
         Popup_Window_Home();
2189 2193
         break;
2190 2194
       case 4: // Z-offset
2191
-        #if HAS_LEVELING
2195
+        #if HAS_BED_PROBE
2192 2196
           checkkey = Homeoffset;
2193 2197
           HMI_ValueStruct.show_mode    = -4;
2194 2198
           HMI_ValueStruct.offset_value = probe.offset.z * 100;
@@ -3390,7 +3394,7 @@ void EachMomentUpdate(void) {
3390 3394
   else if (abort_flag && !HMI_flag.home_flag) { // Print Stop
3391 3395
     abort_flag = 0;
3392 3396
     HMI_ValueStruct.print_speed = feedrate_percentage = 100;
3393
-    zprobe_zoffset = TERN(HAS_LEVELING, probe.offset.z, 0);
3397
+    zprobe_zoffset = TERN(HAS_BED_PROBE, probe.offset.z, 0);
3394 3398
 
3395 3399
     planner.finish_and_disable();
3396 3400
 

Laden…
Annuleren
Opslaan