Browse Source

Fix MKS H43 sensorless homing (#21388)

vanilla_fb_2.0.x
Sola 4 years ago
committed by GitHub
parent
commit
2b621eb45d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp
  2. 5
      Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp

4
Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp

@ -36,7 +36,7 @@
#include "../../../../marlinui.h" #include "../../../../marlinui.h"
#if ENABLED(HAS_STEALTHCHOP) #if ENABLED(HAS_STEALTHCHOP)
#include "../../../../module/stepper/trinamic.h" #include "../../../../../module/stepper/trinamic.h"
#endif #endif
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION) #if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
@ -746,9 +746,9 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
// SDCard File listing // SDCard File listing
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr),
VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),

5
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp

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

Loading…
Cancel
Save