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
Cleaning up tmc2130_pen for a user.
- Removed the Servo and Solenoid setup from config.h. It was typically used from machine definition files.
- Added some defines for default resistor values.
Note: some of this may be redone with saved settings in the future.