Skip to content

Commit 79c0966

Browse files
committed
motion control: allow the spindle to be on with speed of 0
speed and state are separate ideas. A spindle can be on with 0 speed.
1 parent f6a8a68 commit 79c0966

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/emc/motion/control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,7 @@ static void output_to_hal(void)
19061906
*(emcmot_hal_data->spindle[spindle_num].spindle_speed_out_abs) = fabs(speed);
19071907
*(emcmot_hal_data->spindle[spindle_num].spindle_speed_out_rps_abs) = fabs(speed / 60);
19081908
*(emcmot_hal_data->spindle[spindle_num].spindle_on) =
1909-
((emcmotStatus->spindle_status[spindle_num].state * speed) !=0) ? 1 : 0;
1909+
((emcmotStatus->spindle_status[spindle_num].state) !=0) ? 1 : 0;
19101910
*(emcmot_hal_data->spindle[spindle_num].spindle_forward) = (speed > 0) ? 1 : 0;
19111911
*(emcmot_hal_data->spindle[spindle_num].spindle_reverse) = (speed < 0) ? 1 : 0;
19121912
*(emcmot_hal_data->spindle[spindle_num].spindle_brake) =

0 commit comments

Comments
 (0)