Skip to content

Commit

Permalink
phstep: Do not initialize unsupported axes (Z)
Browse files Browse the repository at this point in the history
  • Loading branch information
wavexx authored and dragomirecky committed Feb 27, 2024
1 parent 6be1eac commit cf246da
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -537,15 +537,17 @@ void PreciseStepping::init() {
Stepper::count_direction.z = (Stepper::last_direction_bits & STEP_EVENT_FLAG_Z_DIR) ? -1 : 1;
Stepper::count_direction.e = (Stepper::last_direction_bits & STEP_EVENT_FLAG_E_DIR) ? -1 : 1;
#if HAS_PHASE_STEPPING()
LOOP_XYZ(i) {
for (std::size_t i = 0; i != phase_stepping::opts::SUPPORTED_AXIS_COUNT; ++i) {
PreciseStepping::step_generators_pool.classic_step_generator[i].phase_step_state = phase_stepping::axis_states[i].get();
}
#endif
#ifdef ADVANCED_STEP_GENERATORS
LOOP_XYZ(i) {
PreciseStepping::step_generators_pool.input_shaper_step_generator[i].is_state = &InputShaper::is_state[i];
#if HAS_PHASE_STEPPING()
PreciseStepping::step_generators_pool.input_shaper_step_generator[i].phase_step_state = phase_stepping::axis_states[i].get();
if (i < phase_stepping::opts::SUPPORTED_AXIS_COUNT) {
PreciseStepping::step_generators_pool.input_shaper_step_generator[i].phase_step_state = phase_stepping::axis_states[i].get();
}
#endif
}
PreciseStepping::step_generators_pool.pressure_advance_step_generator_e.pa_state = &PressureAdvance::pressure_advance_state;
Expand Down

0 comments on commit cf246da

Please sign in to comment.