Added optional spindle select event to core events, for dual spindle enabled configurations (VFD + PWM spindle).

Attempted fix for weird issue with VFD spindle when spindle at speed tolerance is set > 0 with $340.
This commit is contained in:
Terje Io
2022-01-09 22:11:57 +01:00
parent 0aeb53883b
commit 22e0fcba1c
13 changed files with 85 additions and 35 deletions

View File

@@ -3,7 +3,7 @@
Part of grblHAL
Copyright (c) 2017-2021 Terje Io
Copyright (c) 2017-2022 Terje Io
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
@@ -212,6 +212,9 @@ int grbl_enter (void)
driver.spindle = (!hal.driver_cap.variable_spindle || (hal.spindle.get_pwm != NULL && hal.spindle.update_pwm != NULL));
#endif
if(grbl.on_spindle_select)
grbl.on_spindle_select(hal.driver_cap.dual_spindle && settings.mode == Mode_Laser ? 0 : 1);
if(driver.ok != 0xFF) {
sys.alarm = Alarm_SelftestFailed;
protocol_enqueue_rt_command(report_driver_error);