🎨 Misc. cleanup, probe FR

This commit is contained in:
Scott Lahteine
2025-10-22 15:04:42 -05:00
parent e4bc675fbf
commit e3a5319e3c
11 changed files with 36 additions and 56 deletions
+5 -5
View File
@@ -973,14 +973,14 @@
TMC_REPORT("[mm/s]\t", TMC_TPWMTHRS_MMS);
TMC_REPORT("OT prewarn", TMC_DEBUG_OTPW);
#if ENABLED(MONITOR_DRIVER_STATUS)
TMC_REPORT("triggered\n OTP\t", TMC_OTPW_TRIGGERED);
TMC_REPORT("OTPW trig.\t", TMC_OTPW_TRIGGERED);
#endif
#if HAS_TMC220x
TMC_REPORT("pwm scale sum", TMC_PWM_SCALE_SUM);
TMC_REPORT("pwm scale auto", TMC_PWM_SCALE_AUTO);
TMC_REPORT("pwm offset auto", TMC_PWM_OFS_AUTO);
TMC_REPORT("pwm grad auto", TMC_PWM_GRAD_AUTO);
TMC_REPORT("pwm scale sum", TMC_PWM_SCALE_SUM);
TMC_REPORT("pwm scale auto", TMC_PWM_SCALE_AUTO);
TMC_REPORT("pwm offset auto", TMC_PWM_OFS_AUTO);
TMC_REPORT("pwm grad auto", TMC_PWM_GRAD_AUTO);
#endif
TMC_REPORT("off time", TMC_TOFF);
+2 -4
View File
@@ -236,10 +236,8 @@ void GcodeSuite::G34() {
Z_TWEEN_SAFE_CLEARANCE // z_clearance
);
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOLNPGM_P(PSTR("Probing X"), ppos.x, SP_Y_STR, ppos.y);
DEBUG_ECHOLNPGM("Height = ", z_probed_height);
}
if (DEBUGGING(LEVELING))
DEBUG_ECHOLN(F("Probing X"), ppos.x, FPSTR(SP_Y_STR), ppos.y, F(" Height = "), z_probed_height);
if (isnan(z_probed_height)) {
SERIAL_ECHOLNPGM(STR_ERR_PROBING_FAILED);
-5
View File
@@ -309,11 +309,6 @@ void Endstops::enable(const bool onoff) {
resync();
}
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
void Endstops::not_homing() {
enabled = enabled_globally;
}
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
// If the last move failed to trigger an endstop, call kill
void Endstops::validate_homing_move() {
+1 -1
View File
@@ -246,7 +246,7 @@ class Endstops {
static void enable(const bool onoff=true);
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
static void not_homing();
static void not_homing() { enabled = enabled_globally; }
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
// If the last move failed to trigger an endstop, call kill
+7
View File
@@ -20,6 +20,13 @@
*
*/
/**
* ft_motion.cpp - Singleton to execute Fixed Time Motion planning
*
* Fixed-Time Motion concept contributed by Ulendo with integration and
* overhaul optimizations by @thinkyhead, @narno2202, @dbuezas.
*/
#include "../inc/MarlinConfig.h"
#if ENABLED(FT_MOTION)
+1 -1
View File
@@ -145,7 +145,7 @@ class FTMotion {
#if HAS_FTM_SHAPING
// Refresh gains and indices used by shaping functions.
static void update_shaping_params(void);
static void update_shaping_params();
#endif
#if ENABLED(FTM_SMOOTHING)
+1 -1
View File
@@ -190,7 +190,7 @@ xyz_pos_t cartes;
xyz_pos_t workspace_offset{0};
#endif
#if HAS_ABL_NOT_UBL
#if ABL_USES_GRID
feedRate_t xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_FEEDRATE);
#endif
+3 -1
View File
@@ -62,7 +62,9 @@ extern xyz_pos_t cartes;
extern abce_pos_t delta;
#endif
#if HAS_ABL_NOT_UBL
// Determine XY_PROBE_FEEDRATE_MM_S - The feedrate used between Probe Points
#if ABL_USES_GRID
// ABL LINEAR and BILINEAR use 'G29 S' value, or MMM_TO_MMS(XY_PROBE_FEEDRATE)
extern feedRate_t xy_probe_feedrate_mm_s;
#define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s
#elif defined(XY_PROBE_FEEDRATE)
+1 -1
View File
@@ -3065,7 +3065,7 @@ bool Planner::buffer_line(const xyze_pos_t &cart, const feedRate_t fr_mm_s
feedRate_t calculated_feedrate = fr_mm_s;
const xyz_pos_t diff = delta - position_float;
if (!NEAR_ZERO(diff.b)) {
if (delta.a <= POLAR_FAST_RADIUS )
if (delta.a <= POLAR_FAST_RADIUS)
calculated_feedrate = settings.max_feedrate_mm_s[Y_AXIS];
else {
// Normalized vector of movement
+1 -1
View File
@@ -2518,7 +2518,7 @@ void MarlinSettings::postprocess() {
#if HAS_TRINAMIC_CONFIG
#define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT)
#define SET_CURR(Q) stepper##Q.rms_current(currents.Q ?: Q##_CURRENT)
if (!validating) {
TERN_(X_IS_TRINAMIC, SET_CURR(X));
TERN_(Y_IS_TRINAMIC, SET_CURR(Y));
+14 -36
View File
@@ -21,33 +21,25 @@
*/
/**
* stepper.cpp - A singleton object to execute motion plans using stepper motors
* Marlin Firmware
* stepper.cpp - Singleton to execute motion plans using stepper motors
*
* Derived from Grbl
* Copyright (c) 2009-2011 Simen Svale Skogsrud
* Marlin uses the Bresenham algorithm. For a detailed explanation of theory and
* method see https://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html
*
* Grbl is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Grbl is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Grbl. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Timer calculations informed by the 'RepRap cartesian firmware' by Zack Smith
* and Philipp Tiefenbacher.
*
* Jerk controlled movements planner added Apr 2018 by Eduardo José Tagle.
* Equations based on Synthethos TinyG2 sources, but the fixed-point
* implementation is new, as we are running the ISR with a variable period.
* Also implemented the Bézier velocity curve evaluation in ARM assembler,
* to avoid impacting ISR speed.
*
* Fixed-Time Motion concept contributed by Ulendo with integration and
* overhaul optimizations by @thinkyhead, @narno2202, @dbuezas.
*/
/**
* __________________________
/** __________________________
* /| |\ _________________ ^
* / | | \ /| |\ |
* / | | \ / | | \ s
@@ -70,19 +62,6 @@
* - Reset the trapezoid generator.
*/
/**
* Marlin uses the Bresenham algorithm. For a detailed explanation of theory and
* method see https://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html
*/
/**
* Jerk controlled movements planner added Apr 2018 by Eduardo José Tagle.
* Equations based on Synthethos TinyG2 sources, but the fixed-point
* implementation is new, as we are running the ISR with a variable period.
* Also implemented the Bézier velocity curve evaluation in ARM assembler,
* to avoid impacting ISR speed.
*/
#include "stepper.h"
Stepper stepper; // Singleton
@@ -3590,8 +3569,7 @@ void Stepper::report_positions() {
if (last_set_direction != last_direction_bits) {
// Apply directions (generally applying to the entire linear move)
#define _FTM_APPLY_DIR(A) if (last_direction_bits.A != last_set_direction.A) \
SET_STEP_DIR(A);
#define _FTM_APPLY_DIR(A) if (last_direction_bits.A != last_set_direction.A) SET_STEP_DIR(A);
LOGICAL_AXIS_MAP(_FTM_APPLY_DIR);
last_set_direction = last_direction_bits;