Browse Source

Fix MKS H43 sensorless homing (#21388)

Sola 3 years ago
parent
commit
2b621eb45d
No account linked to committer's email address

+ 2
- 2
Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp View File

@@ -36,7 +36,7 @@
36 36
 #include "../../../../marlinui.h"
37 37
 
38 38
 #if ENABLED(HAS_STEALTHCHOP)
39
-  #include "../../../../module/stepper/trinamic.h"
39
+  #include "../../../../../module/stepper/trinamic.h"
40 40
 #endif
41 41
 
42 42
 #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
@@ -746,9 +746,9 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
746 746
 
747 747
 
748 748
   // SDCard File listing
749
+  VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
749 750
   #if ENABLED(SDSUPPORT)
750 751
     VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
751
-    VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
752 752
     VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr),
753 753
     VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
754 754
     VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),

+ 4
- 1
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp View File

@@ -1246,6 +1246,9 @@ void DGUSScreenHandler::MKS_FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) {
1246 1246
 
1247 1247
   uint16_t val_t = swap16(*(uint16_t*)val_ptr);
1248 1248
 
1249
+  if (!print_job_timer.isPaused() && !queue.ring_buffer.empty())
1250
+    return;
1251
+
1249 1252
   switch (val_t) {
1250 1253
     case 0:
1251 1254
       #if HOTENDS >= 1
@@ -1497,7 +1500,7 @@ bool DGUSScreenHandler::loop() {
1497 1500
     static bool booted = false;
1498 1501
     if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT))) {
1499 1502
       booted = true;
1500
-      #if ANY_AXIS_HAS(STEALTHCHOP)
1503
+      #if USE_SENSORLESS
1501 1504
         #if AXIS_HAS_STEALTHCHOP(X)
1502 1505
           tmc_x_step = stepperX.homing_threshold();
1503 1506
         #endif

Loading…
Cancel
Save