Browse Source

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

InsanityAutomation 4 years ago
parent
commit
d2d6c167df
No account linked to committer's email address
1 changed files with 10 additions and 6 deletions
  1. 10
    6
      Marlin/src/lcd/dwin/dwin.cpp

+ 10
- 6
Marlin/src/lcd/dwin/dwin.cpp View File

53
 #include "../../module/motion.h"
53
 #include "../../module/motion.h"
54
 #include "../../module/planner.h"
54
 #include "../../module/planner.h"
55
 
55
 
56
+#if ENABLED(HOST_ACTION_COMMANDS)
57
+  #include "../../feature/host_actions.h"
58
+#endif
59
+
56
 #if HAS_LEVELING
60
 #if HAS_LEVELING
57
   #include "../../feature/bedlevel/bedlevel.h"
61
   #include "../../feature/bedlevel/bedlevel.h"
58
 #endif
62
 #endif
124
 
128
 
125
 #define MBASE(L) (49 + (L)*MLINE)
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
 /* Value Init */
133
 /* Value Init */
130
 HMI_value_t HMI_ValueStruct;
134
 HMI_value_t HMI_ValueStruct;
1116
 
1120
 
1117
       if (HMI_ValueStruct.show_mode == -4) {
1121
       if (HMI_ValueStruct.show_mode == -4) {
1118
         checkkey = Prepare;
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
       else {
1125
       else {
1122
         checkkey = Tune;
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
       DWIN_UpdateLCD();
1129
       DWIN_UpdateLCD();
1126
       return;
1130
       return;
1484
     DWIN_Draw_IntValue(true, true, 0, STAT_FONT, White, Background_black, 3, 33 + 2 * STAT_CHR_W, 429, feedrate_percentage);
1488
     DWIN_Draw_IntValue(true, true, 0, STAT_FONT, White, Background_black, 3, 33 + 2 * STAT_CHR_W, 429, feedrate_percentage);
1485
     last_speed = feedrate_percentage;
1489
     last_speed = feedrate_percentage;
1486
   }
1490
   }
1487
-  #if HAS_LEVELING
1491
+  #if HAS_BED_PROBE
1488
     if (last_probe_zoffset != probe.offset.z) {
1492
     if (last_probe_zoffset != probe.offset.z) {
1489
       show_plus_or_minus(STAT_FONT, Background_black, 2, 2, 178 + STAT_CHR_W, 429, probe.offset.z * 100);
1493
       show_plus_or_minus(STAT_FONT, Background_black, 2, 2, 178 + STAT_CHR_W, 429, probe.offset.z * 100);
1490
       last_probe_zoffset = probe.offset.z;
1494
       last_probe_zoffset = probe.offset.z;
2188
         Popup_Window_Home();
2192
         Popup_Window_Home();
2189
         break;
2193
         break;
2190
       case 4: // Z-offset
2194
       case 4: // Z-offset
2191
-        #if HAS_LEVELING
2195
+        #if HAS_BED_PROBE
2192
           checkkey = Homeoffset;
2196
           checkkey = Homeoffset;
2193
           HMI_ValueStruct.show_mode    = -4;
2197
           HMI_ValueStruct.show_mode    = -4;
2194
           HMI_ValueStruct.offset_value = probe.offset.z * 100;
2198
           HMI_ValueStruct.offset_value = probe.offset.z * 100;
3390
   else if (abort_flag && !HMI_flag.home_flag) { // Print Stop
3394
   else if (abort_flag && !HMI_flag.home_flag) { // Print Stop
3391
     abort_flag = 0;
3395
     abort_flag = 0;
3392
     HMI_ValueStruct.print_speed = feedrate_percentage = 100;
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
     planner.finish_and_disable();
3399
     planner.finish_and_disable();
3396
 
3400
 

Loading…
Cancel
Save