Singleton for cutting tools (#14429)

This commit is contained in:
Scott Lahteine
2019-06-27 23:06:49 -05:00
committed by GitHub
parent 2fde1475cb
commit d7d80418ae
127 changed files with 2773 additions and 2675 deletions

View File

@@ -303,48 +303,6 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
#endif // HAS_TEMP_HOTEND || HAS_HEATED_BED
#if ENABLED(SPINDLE_LASER_ENABLE)
extern uint8_t spindle_laser_power;
bool spindle_laser_enabled();
void set_spindle_laser_enabled(const bool enabled);
#if ENABLED(SPINDLE_LASER_PWM)
void update_spindle_laser_power();
#endif
inline void _lcd_spindle_laser_off() { set_spindle_laser_enabled(false); }
void set_spindle_direction(bool);
inline void _lcd_spindle_laser_on(const bool is_M4) {
#if SPINDLE_DIR_CHANGE
set_spindle_direction(is_M4);
#endif
set_spindle_laser_enabled(true);
}
inline void _lcd_spindle_laser_on() { _lcd_spindle_laser_on(false); }
#if SPINDLE_DIR_CHANGE
inline void _lcd_spindle_on_reverse() { _lcd_spindle_laser_on(true); }
#endif
void menu_spindle_laser() {
START_MENU();
MENU_BACK(MSG_MAIN);
if (spindle_laser_enabled()) {
#if ENABLED(SPINDLE_LASER_PWM)
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power);
#endif
MENU_ITEM(function, MSG_LASER_OFF, _lcd_spindle_laser_off);
}
else {
MENU_ITEM(function, MSG_LASER_ON, _lcd_spindle_laser_on);
#if SPINDLE_DIR_CHANGE
MENU_ITEM(function, MSG_SPINDLE_REVERSE, _lcd_spindle_on_reverse);
#endif
}
END_MENU();
}
#endif // SPINDLE_LASER_ENABLE
void menu_temperature() {
START_MENU();
MENU_BACK(MSG_MAIN);
@@ -415,10 +373,6 @@ void menu_temperature() {
#endif
#endif // FAN_COUNT > 0
#if ENABLED(SPINDLE_LASER_ENABLE)
MENU_ITEM(submenu, MSG_LASER_MENU, menu_spindle_laser);
#endif
#if HAS_TEMP_HOTEND
//