From 205b0a679e3ca7cbf7ca590279d1cd4ed0c284c1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 23 Dec 2023 04:19:23 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Whitespace=20in=20the=20rightpla?= =?UTF-8?q?ce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/ft_motion.cpp | 10 +++++----- Marlin/src/module/ft_motion.h | 1 - Marlin/src/module/stepper.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index a2049db3b63f..674b66f581cb 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -324,7 +324,7 @@ void FTMotion::loop() { x.Ai[1] = (0.5f - x.Ai[0]) * Kx; x.Ai[2] = x.Ai[1] * Kx; x.Ai[3] = x.Ai[0] * cu(Kx); - + const float vtoly2 = sq(vtol[1]); const float Y = pow(vtoly2 * (sqrt(1.0f - vtoly2) + 1.0f), 1.0f / 3.0f); y.Ai[0] = (3.0f * sq(Y) + 2.0f * Y + 3.0f * vtoly2) / (16.0f * Y); @@ -361,7 +361,7 @@ void FTMotion::loop() { x.Ai[i] *= X_adj; y.Ai[i] *= Y_adj; } - } + } break; case ftMotionMode_MZV: { @@ -375,7 +375,7 @@ void FTMotion::loop() { y.Ai[0] = 1.0f / (1.0f + By + Ky2); y.Ai[1] = y.Ai[0] * By; y.Ai[2] = y.Ai[0] * Ky2; - } + } break; default: @@ -383,7 +383,7 @@ void FTMotion::loop() { ZERO(y.Ai); max_i = 0; } - + } void FTMotion::updateShapingA(float zeta[]/*=cfg.zeta*/, float vtol[]/*=cfg.vtol*/) { @@ -428,7 +428,7 @@ void FTMotion::loop() { void FTMotion::updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), float zeta[]/*=cfg.zeta*/) { const float xdf = sqrt(1.0f - sq(zeta[0])); shaping.x.updateShapingN(xf, xdf); - + #if HAS_Y_AXIS const float ydf = sqrt(1.0f - sq(zeta[1])); shaping.y.updateShapingN(yf, ydf); diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h index cea754088138..f4a65fdd5e92 100644 --- a/Marlin/src/module/ft_motion.h +++ b/Marlin/src/module/ft_motion.h @@ -44,7 +44,6 @@ typedef struct FTConfig { #if HAS_X_AXIS float baseFreq[1 + ENABLED(HAS_Y_AXIS)] = // Base frequency. [Hz] { FTM_SHAPING_DEFAULT_X_FREQ OPTARG(HAS_Y_AXIS, FTM_SHAPING_DEFAULT_Y_FREQ) }; - float zeta[1 + ENABLED(HAS_Y_AXIS)] = // Damping factor { FTM_SHAPING_ZETA_X OPTARG(HAS_Y_AXIS, FTM_SHAPING_ZETA_Y) }; float vtol[1 + ENABLED(HAS_Y_AXIS)] = // Vibration Level diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 862b2728042d..8dda2eec4001 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3552,7 +3552,7 @@ void Stepper::report_positions() { // Sync block? Sync the stepper counts and return while (current_block->is_sync()) { TERN_(LASER_FEATURE, if (!(current_block->is_fan_sync() || current_block->is_pwr_sync()))) _set_position(current_block->position); - + planner.release_current_block(); // Try to get a new block