🎨 Fix style snafus

This commit is contained in:
Scott Lahteine 2025-11-05 19:16:43 -06:00
parent e0f0a9491d
commit 924c2ca0fe
3 changed files with 12 additions and 12 deletions

View file

@ -111,7 +111,7 @@ void StatusScreen::send_buffer(CommandProcessor &cmd, const void *data, uint16_t
const char *ptr = (const char*) data;
constexpr uint16_t block_size = 512;
char block[block_size];
for (;len > 0;) {
while (len > 0) {
const uint16_t nBytes = min(len, block_size);
memcpy_P(block, ptr, nBytes);
cmd.write((const void*)block, nBytes);

View file

@ -75,8 +75,8 @@ TrajectoryType FTMotion::trajectoryType = TrajectoryType::FTM_TRAJECTORY_TYPE;
stepper_plan_t FTMotion::stepper_plan_buff[FTM_BUFFER_SIZE];
XYZEval<int64_t> FTMotion::curr_steps_q32_32 = {0};
uint32_t FTMotion::stepper_plan_tail = 0, // The index to consume from
FTMotion::stepper_plan_head = 0; // The index to produce into
uint32_t FTMotion::stepper_plan_tail = 0, // The index to consume from
FTMotion::stepper_plan_head = 0; // The index to produce into
#if FTM_HAS_LIN_ADVANCE
bool FTMotion::use_advance_lead;
@ -240,16 +240,16 @@ void FTMotion::discard_planner_block_protected() {
uint32_t FTMotion::calc_runout_samples() {
xyze_long_t delay = {0};
#if ENABLED(FTM_SMOOTHING)
#define _ADD(A) delay.A += smoothing.A.delay_samples;
LOGICAL_AXIS_MAP(_ADD)
#undef _ADD
#define _DELAY_ADD(A) delay.A += smoothing.A.delay_samples;
LOGICAL_AXIS_MAP(_DELAY_ADD)
#undef _DELAY_ADD
#endif
#if HAS_FTM_SHAPING
// Ni[max_i] is the delay of the last pulse, but it is relative to Ni[0] (the negative delay centroid)
#define _ADD(A) if(shaping.A.ena) delay.A += shaping.A.Ni[shaping.A.max_i] - shaping.A.Ni[0];
SHAPED_MAP(_ADD)
#undef _ADD
#define _DELAY_ADD(A) if (shaping.A.ena) delay.A += shaping.A.Ni[shaping.A.max_i] - shaping.A.Ni[0];
SHAPED_MAP(_DELAY_ADD)
#undef _DELAY_ADD
#endif
return delay.large();
}

View file

@ -2474,7 +2474,7 @@ hal_timer_t Stepper::block_phase_isr() {
else cutter.apply_power(0);
}
#endif
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = acc_step_rate;)
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = acc_step_rate);
}
// Are we in Deceleration phase ?
else if (step_events_completed >= decelerate_start) {
@ -2548,7 +2548,7 @@ hal_timer_t Stepper::block_phase_isr() {
}
}
#endif
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = step_rate;)
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = step_rate);
}
else { // Must be in cruise phase otherwise
@ -2558,7 +2558,7 @@ hal_timer_t Stepper::block_phase_isr() {
ticks_nominal = calc_multistep_timer_interval(current_block->nominal_rate << oversampling_factor);
// Prepare for deceleration
IF_DISABLED(S_CURVE_ACCELERATION, acc_step_rate = current_block->nominal_rate);
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = current_block->nominal_rate;)
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = current_block->nominal_rate);
deceleration_time = ticks_nominal / 2;
// Apply Nonlinear Extrusion, if enabled