Alright, on to the next phase of my MPCNC.
While the machine is working like a champ, I like to be able to control the spindle via gcode as this is how I’m used to controlling the spindle on my other CNC and without it I find myself fumbling to quickly turn it on before it tries to cut on the MPCNC. I am aware of and understand the safety concerns with this…
I saw several posts here on spindle enable, pin 45, fan pin, etc. and thought I’d give it a shot. However, when I enable/un-comment “#define SPINDLE_LASER_ENABLE” and try to compile, I get the error below.
I tried to follow the error, went in to menu_temperature.cpp to see if it was as simple as enabling/disabling something but it’s way over my head so figured I’d come to the pros…
What am I missing?
sketch/src/lcd/menu/menu_temperature.cpp: In function ‘void lcd_spindle_laser_on(bool)’:
sketch/src/lcd/menu/menu_temperature.cpp:318:34: error: ‘set_spindle_direction’ was not declared in this scope
set_spindle_direction(is_M4);
^
In file included from sketch/src/lcd/menu/menu_temperature.cpp:31:0:
sketch/src/lcd/menu/menu_temperature.cpp: In function ‘void menu_spindle_laser()’:
sketch/src/lcd/menu/menu.h:294:56: error: no matching function for call to ‘TMenuItem<MenuItemInfo_int3>::action_edit(const char*, uint8_t*, int, int, void (&)())’
MenuItem##TYPE ::action ## VARIANT(VA_ARGS); </em>
^
sketch/src/lcd/menu/menu.h:330:62: note: in expansion of macro ‘_MENU_ITEM_VARIANT_P’
#define MENU_ITEM_EDIT_CALLBACK(TYPE, LABEL, …) _MENU_ITEM_VARIANT_P(TYPE, edit, false, PSTR(LABEL), PSTR(LABEL), ## VA_ARGS)
^
sketch/src/lcd/menu/menu_temperature.cpp:332:9: note: in expansion of macro ‘MENU_ITEM_EDIT_CALLBACK’
MENU_ITEM_EDIT_CALLBACK(int3, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power);
^
sketch/src/lcd/menu/menu.h:294:56: note: candidate is:
MenuItem##TYPE ::action ## VARIANT(VA_ARGS); </em>
^
sketch/src/lcd/menu/menu.h:330:62: note: in expansion of macro ‘_MENU_ITEM_VARIANT_P’
#define MENU_ITEM_EDIT_CALLBACK(TYPE, LABEL, …) _MENU_ITEM_VARIANT_P(TYPE, _edit, false, PSTR(LABEL), PSTR(LABEL), ## VA_ARGS)
^
sketch/src/lcd/menu/menu_temperature.cpp:332:9: note: in expansion of macro ‘MENU_ITEM_EDIT_CALLBACK’
MENU_ITEM_EDIT_CALLBACK(int3, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power);
^
Multiple libraries were found for “U8glib.h”
Used: /home/victor/snap/arduino-mhall119/5/Arduino/libraries/U8glib
Not used: /home/victor/snap/arduino-mhall119/5/.arduino15/packages/rambo/hardware/avr/1.0.1/libraries/U8glib
sketch/src/lcd/menu/menu.h:183:17: note: static void TMenuItem<NAME>::action_edit(const char*, TMenuItem<NAME>::type_t*, TMenuItem<NAME>::type_t, TMenuItem<NAME>::type_t, screenFunc_t, bool) [with NAME = MenuItemInfo_int3; TMenuItem<NAME>::type_t = int; screenFunc_t = void ()()]
static void action_edit(PGM_P const pstr, type_t * const ptr, const type_t minValue, const type_t maxValue, const screenFunc_t callback=NULL, const bool live=false) {
^
sketch/src/lcd/menu/menu.h:183:17: note: no known conversion for argument 2 from 'uint8_t {aka unsigned char*}’ to ‘TMenuItem<MenuItemInfo_int3>::type_t* {aka int*}’
sketch/src/lcd/menu/menu.h:298:110: error: cannot convert ‘uint8_t* {aka unsigned char*}’ to ‘MenuItemInfo_int3::type_t* {aka int*}’ for argument ‘5’ to ‘void draw_menu_item_edit_int3(bool, uint8_t, const char*, const char*, MenuItemInfo_int3::type_t*, …)’
draw_menu_item ## VARIANT ## _ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ## VA_ARGS); </em>
^
sketch/src/lcd/menu/menu.h:330:62: note: in expansion of macro ‘_MENU_ITEM_VARIANT_P’
#define MENU_ITEM_EDIT_CALLBACK(TYPE, LABEL, …) _MENU_ITEM_VARIANT_P(TYPE, _edit, false, PSTR(LABEL), PSTR(LABEL), ## VA_ARGS)
^
sketch/src/lcd/menu/menu_temperature.cpp:332:9: note: in expansion of macro ‘MENU_ITEM_EDIT_CALLBACK’
MENU_ITEM_EDIT_CALLBACK(int3, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power);
^
exit status 1
Error compiling for board RAMBo."