The .cpp files for spindles are included into
one large compilation unit that shares a .h
file, so it should not be necessary to
#include SpindleClass.h in each one, but
Intellisense doesn't know that so it issues
numerous problem reports. The solution
is to #include SpindleClass.h in each
Spindle*.cpp file, letting the header guard
prevent multiple inclusion during compilation.
The .cpp files for spindles are included into
one large compilation unit that shares a .h
file, so it should not be necessary to
#include SpindleClass.h in each one, but
Intellisense doesn't know that so it issues
numerous problem reports. The solution
is to #include SpindleClass.h in each
Spindle*.cpp file, letting the header guard
prevent multiple inclusion during compilation.
The core fix was to remove the redundant includes of grbl.h
from the individual spindle.cpp files. Since those files
are inlined into Grbl_Esp32.ino via nested includes, the
top level include of grbl.h in the .ino covers them.
I also did some cleanups:
- renaming tools/ to Spindles/ . While "tools" is a good
name in the CNC domain, meaning "toolheads", in the
software domain it typically means "ancillary programs
used for building the software"
- Added a "#pragma once" to grbl.h just in case; it had
no header guard.
- Removed a duplicate #include grbl.h from stepper.cpp
- Deleted some trailing whitespace
- Fixed missing newline at the end of some files
It was added before the test mode machine definition was created. People were loading other machine definitions to test drive without attached hardware. The floating, input only pins were typically used for control pins and creating a bad first experience.
Somehow the rename of SPINDLE_PWM_PIN to SPINDLE_OUTPUT_PIN got lost in the merge. I think the confict resolution step was not done right.
Removed template.h and spindle_test.h
- Got rid of MACHINE in names, that is already in the const prefix for that message
- Add spindle tpyes....just a temporary method until prefs are ready
- minor formatting
- Change SPINDLE_PWM_PIN to SPINDLE_OUTPUT_PIN because it in not always PWM
- Changed object name my_spindle to spindle
- PWM precision is now auto calculated for highest resolution