grblHAL / core

grblHAL core code and master Wiki
Other
305 stars 74 forks source link

Allow driver to be considered ok even if only update_rpm is added #368

Open infnorm opened 9 months ago

infnorm commented 9 months ago

Not sure if this is correct, but the simulator for example only initializes update_rpm with certain flag settings. There seem to be places where update_pwm and update_rpm are checked independently @terjeio?

terjeio commented 9 months ago

A better test would be spindle->get_pwm ? (spindle->update_pwm != NULL) : (spindle->update_rpm != NULL)? For now I have solved the issue by instantiating the null spindle in the simulator driver, I'll revisit this a bit later as I will be looking into adding support for stepper driven spindles and completing multiple simultaneously active spindles handling.