Enforce complete AXIS control inventory
This commit is contained in:
@@ -274,8 +274,8 @@ int sim_io_spindle_adjust(sim_io *io, uint32_t spindle, double delta) {
|
||||
state = &io->state.spindles[spindle];
|
||||
// Match LinuxCNC EMCMOT_SPINDLE_INCREASE/DECREASE: change the signed
|
||||
// speed only while the spindle is running and keep its direction.
|
||||
if (state->command_rpm > 0.0) target = state->command_rpm + delta;
|
||||
else if (state->command_rpm < 0.0) target = state->command_rpm - delta;
|
||||
if (state->command_rpm > 0.0) target = fmax(0.0, state->command_rpm + delta);
|
||||
else if (state->command_rpm < 0.0) target = fmin(0.0, state->command_rpm - delta);
|
||||
else target = 0.0;
|
||||
target = fmax(-state->max_rpm, fmin(state->max_rpm, target));
|
||||
state->command_rpm = state->enabled && !state->inhibit && !state->amp_fault ? target : 0.0;
|
||||
|
||||
Reference in New Issue
Block a user