Skip to content

Commit

Permalink
🎨 Whitespace in the rightplace
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 23, 2023
1 parent 3029a6b commit 205b0a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Marlin/src/module/ft_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -361,7 +361,7 @@ void FTMotion::loop() {
x.Ai[i] *= X_adj;
y.Ai[i] *= Y_adj;
}
}
}
break;

case ftMotionMode_MZV: {
Expand All @@ -375,15 +375,15 @@ 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:
ZERO(x.Ai);
ZERO(y.Ai);
max_i = 0;
}

}

void FTMotion::updateShapingA(float zeta[]/*=cfg.zeta*/, float vtol[]/*=cfg.vtol*/) {
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/module/ft_motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 205b0a6

Please sign in to comment.