️ Improve Sensorless homing/probing accuracy for G28, G33, M48 (#24220)

Co-Authored-By: Robby Candra <robbycandra.mail@gmail.com>
Co-Authored-By: ellensp <530024+ellensp@users.noreply.github.com>
This commit is contained in:
lujios
2022-06-03 07:19:25 +02:00
committed by Scott Lahteine
parent 0253500ccd
commit fcef8d946c
12 changed files with 212 additions and 77 deletions

View File

@ -193,7 +193,6 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes.
switch (swap16(*(uint16_t*)val_ptr)) {
case 0: { // Resume
auto cs = getCurrentScreen();
if (runout_mks.runout_status != RUNOUT_WAITING_STATUS && runout_mks.runout_status != UNRUNOUT_STATUS) {
if (cs == MKSLCD_SCREEN_PRINT || cs == MKSLCD_SCREEN_PAUSE)
@ -213,7 +212,6 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
} break;
case 1: // Pause
GotoScreen(MKSLCD_SCREEN_PAUSE);
if (!ExtUI::isPrintingFromMediaPaused()) {
nozzle_park_mks.print_pause_start_flag = 1;
@ -222,6 +220,7 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
//ExtUI::mks_pausePrint();
}
break;
case 2: // Abort
HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true);
break;

View File

@ -41,6 +41,10 @@
#include "../extui/ui_api.h"
#endif
#if HAS_PROBE_XY_OFFSET
#include "../../module/probe.h"
#endif
void _man_probe_pt(const xy_pos_t &xy) {
if (!ui.wait_for_move) {
ui.wait_for_move = true;
@ -88,7 +92,9 @@ void _man_probe_pt(const xy_pos_t &xy) {
}
void _goto_tower_a(const_float_t a) {
constexpr float dcr = DELTA_PRINTABLE_RADIUS;
float dcr = DELTA_PRINTABLE_RADIUS - PROBING_MARGIN;
TERN_(HAS_PROBE_XY_OFFSET, dcr -= HYPOT(probe.offset_xy.x, probe.offset_xy.y));
TERN_(HAS_DELTA_SENSORLESS_PROBING, dcr *= sensorless_radius_factor);
xy_pos_t tower_vec = { cos(RADIANS(a)), sin(RADIANS(a)) };
_man_probe_pt(tower_vec * dcr);
}