🧑💻 Remove extraneous 'inline' hints
This commit is contained in:
@@ -103,12 +103,12 @@ public:
|
||||
static void init();
|
||||
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
static inline void refresh_frequency() { set_pwm_frequency(pin_t(SPINDLE_LASER_PWM_PIN), frequency); }
|
||||
static void refresh_frequency() { set_pwm_frequency(pin_t(SPINDLE_LASER_PWM_PIN), frequency); }
|
||||
#endif
|
||||
|
||||
// Modifying this function should update everywhere
|
||||
static inline bool enabled(const cutter_power_t opwr) { return opwr > 0; }
|
||||
static inline bool enabled() { return enabled(power); }
|
||||
static bool enabled(const cutter_power_t opwr) { return opwr > 0; }
|
||||
static bool enabled() { return enabled(power); }
|
||||
|
||||
static void apply_power(const uint8_t inpow);
|
||||
|
||||
@@ -124,13 +124,13 @@ public:
|
||||
public:
|
||||
|
||||
static void set_ocr(const uint8_t ocr);
|
||||
static inline void ocr_set_power(const uint8_t ocr) { power = ocr; set_ocr(ocr); }
|
||||
static void ocr_set_power(const uint8_t ocr) { power = ocr; set_ocr(ocr); }
|
||||
static void ocr_off();
|
||||
|
||||
/**
|
||||
* Update output for power->OCR translation
|
||||
*/
|
||||
static inline uint8_t upower_to_ocr(const cutter_power_t upwr) {
|
||||
static uint8_t upower_to_ocr(const cutter_power_t upwr) {
|
||||
return uint8_t(
|
||||
#if CUTTER_UNIT_IS(PWM255)
|
||||
upwr
|
||||
@@ -145,11 +145,11 @@ public:
|
||||
/**
|
||||
* Correct power to configured range
|
||||
*/
|
||||
static inline cutter_power_t power_to_range(const cutter_power_t pwr) {
|
||||
static cutter_power_t power_to_range(const cutter_power_t pwr) {
|
||||
return power_to_range(pwr, _CUTTER_POWER(CUTTER_POWER_UNIT));
|
||||
}
|
||||
|
||||
static inline cutter_power_t power_to_range(const cutter_power_t pwr, const uint8_t pwrUnit) {
|
||||
static cutter_power_t power_to_range(const cutter_power_t pwr, const uint8_t pwrUnit) {
|
||||
static constexpr float
|
||||
min_pct = TERN(CUTTER_POWER_RELATIVE, 0, TERN(SPINDLE_FEATURE, round(100.0f * (SPEED_POWER_MIN) / (SPEED_POWER_MAX)), SPEED_POWER_MIN)),
|
||||
max_pct = TERN(SPINDLE_FEATURE, 100, SPEED_POWER_MAX);
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
* Enable/Disable spindle/laser
|
||||
* @param enable true = enable; false = disable
|
||||
*/
|
||||
static inline void set_enabled(const bool enable) {
|
||||
static void set_enabled(const bool enable) {
|
||||
uint8_t value = 0;
|
||||
if (enable) {
|
||||
#if ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
@@ -203,14 +203,14 @@ public:
|
||||
set_power(value);
|
||||
}
|
||||
|
||||
static inline void disable() { isReady = false; set_enabled(false); }
|
||||
static void disable() { isReady = false; set_enabled(false); }
|
||||
|
||||
/**
|
||||
* Wait for spindle to spin up or spin down
|
||||
*
|
||||
* @param on true = state to on; false = state to off.
|
||||
*/
|
||||
static inline void power_delay(const bool on) {
|
||||
static void power_delay(const bool on) {
|
||||
#if DISABLED(LASER_POWER_INLINE)
|
||||
safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY);
|
||||
#endif
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
static void set_reverse(const bool reverse);
|
||||
static bool is_reverse() { return READ(SPINDLE_DIR_PIN) == SPINDLE_INVERT_DIR; }
|
||||
#else
|
||||
static inline void set_reverse(const bool) {}
|
||||
static void set_reverse(const bool) {}
|
||||
static bool is_reverse() { return false; }
|
||||
#endif
|
||||
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
static void air_evac_enable(); // Turn On Cutter Vacuum or Laser Blower motor
|
||||
static void air_evac_disable(); // Turn Off Cutter Vacuum or Laser Blower motor
|
||||
static void air_evac_toggle(); // Toggle Cutter Vacuum or Laser Blower motor
|
||||
static inline bool air_evac_state() { // Get current state
|
||||
static bool air_evac_state() { // Get current state
|
||||
return (READ(AIR_EVACUATION_PIN) == AIR_EVACUATION_ACTIVE);
|
||||
}
|
||||
#endif
|
||||
@@ -237,13 +237,13 @@ public:
|
||||
static void air_assist_enable(); // Turn on air assist
|
||||
static void air_assist_disable(); // Turn off air assist
|
||||
static void air_assist_toggle(); // Toggle air assist
|
||||
static inline bool air_assist_state() { // Get current state
|
||||
static bool air_assist_state() { // Get current state
|
||||
return (READ(AIR_ASSIST_PIN) == AIR_ASSIST_ACTIVE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
static inline void enable_with_dir(const bool reverse) {
|
||||
static void enable_with_dir(const bool reverse) {
|
||||
isReady = true;
|
||||
const uint8_t ocr = TERN(SPINDLE_LASER_USE_PWM, upower_to_ocr(menuPower), 255);
|
||||
if (menuPower)
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
FORCE_INLINE static void enable_same_dir() { enable_with_dir(is_reverse()); }
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
static inline void update_from_mpower() {
|
||||
static void update_from_mpower() {
|
||||
if (isReady) power = upower_to_ocr(menuPower);
|
||||
unitPower = menuPower;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
* Also fires with any PWM power that was previous set
|
||||
* If not set defaults to 80% power
|
||||
*/
|
||||
static inline void test_fire_pulse() {
|
||||
static void test_fire_pulse() {
|
||||
TERN_(USE_BEEPER, buzzer.tone(30, 3000));
|
||||
enable_forward(); // Turn Laser on (Spindle speak but same funct)
|
||||
delay(testPulse); // Delay for time set by user in pulse ms menu screen.
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
*/
|
||||
|
||||
// Force disengage planner power control
|
||||
static inline void inline_disable() {
|
||||
static void inline_disable() {
|
||||
isReady = false;
|
||||
unitPower = 0;
|
||||
planner.laser_inline.status.isPlanned = false;
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
}
|
||||
|
||||
// Inline modes of all other functions; all enable planner inline power control
|
||||
static inline void set_inline_enabled(const bool enable) {
|
||||
static void set_inline_enabled(const bool enable) {
|
||||
if (enable)
|
||||
inline_power(255);
|
||||
else {
|
||||
@@ -326,10 +326,10 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void inline_direction(const bool) { /* never */ }
|
||||
static void inline_direction(const bool) { /* never */ }
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
static inline void inline_ocr_power(const uint8_t ocrpwr) {
|
||||
static void inline_ocr_power(const uint8_t ocrpwr) {
|
||||
isReady = ocrpwr > 0;
|
||||
planner.laser_inline.status.isEnabled = ocrpwr > 0;
|
||||
planner.laser_inline.power = ocrpwr;
|
||||
@@ -337,7 +337,7 @@ public:
|
||||
#endif
|
||||
#endif // LASER_POWER_INLINE
|
||||
|
||||
static inline void kill() {
|
||||
static void kill() {
|
||||
TERN_(LASER_POWER_INLINE, inline_disable());
|
||||
disable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user