Closed Nick507 closed 3 months ago
#define SPINDLE0_ENABLE SPINDLE_VFD
is not correct since the SPINDLE_VFD
symbol is not defined anywhere, use one of the predefined symbols or values.
Because as I understand, you want to get intersection mask between all types of used spindles.
Correct, and I chose to bit shift the spindle number in _driveropts.h.
is not correct since the SPINDLE_VFD symbol is not defined anywhere, use one of the predefined symbols or values.
The mistake is not just about undefined SPINDLE_VFD, but value must be a bit mask (1<<X) whereas current code is:
//#define SPINDLE0_ENABLE SPINDLE_HUANYANG1
actually this comment relates to ESP32 driver repo, I've just add it here, because it is related to bug in driver_opts, which is core repo.
btw, should I close this issue?
UPD: sorry, seems that it was my mistake. define spindle with SPINDLE_HUANYANG1 and then make a bit mask in SPINDLE_ENABLE is correct.
There is no issue
In my_machine.h:
#define SPINDLE0_ENABLE SPINDLE_VFD
I guess it should be:#define SPINDLE0_ENABLE (1<<SPINDLE_MODVFD)
and in driver_opts.h:274
#define SPINDLE_ENABLE ((1<<SPINDLE0_ENABLE)|(1<<SPINDLE1_ENABLE)|(1<<SPINDLE2_ENABLE)|(1<<SPINDLE3_ENABLE))
should be:#define SPINDLE_ENABLE ((SPINDLE0_ENABLE)|(SPINDLE1_ENABLE)|(SPINDLE2_ENABLE)|(SPINDLE3_ENABLE))
Because as I understand, you want to get intersection mask between all types of used spindles.