⚡️ Fix and improve Inline Laser Power (#22690)
This commit is contained in:
committed by
Scott Lahteine
parent
5b6c46db29
commit
d965303a7a
@ -447,6 +447,16 @@
|
||||
#error "SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE."
|
||||
#elif defined(SPINDLE_LASER_ENABLE_INVERT)
|
||||
#error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_STATE."
|
||||
#elif defined(LASER_POWER_INLINE)
|
||||
#error "LASER_POWER_INLINE is not required, inline mode is enabled with 'M3 I' and disabled with 'M5 I'."
|
||||
#elif defined(LASER_POWER_INLINE_TRAPEZOID)
|
||||
#error "LASER_POWER_INLINE_TRAPEZOID is now LASER_POWER_TRAP."
|
||||
#elif defined(LASER_POWER_INLINE_TRAPEZOID_CONT)
|
||||
#error "LASER_POWER_INLINE_TRAPEZOID_CONT is replaced with LASER_POWER_TRAP."
|
||||
#elif defined(LASER_POWER_INLINE_TRAPEZOID_PER)
|
||||
#error "LASER_POWER_INLINE_TRAPEZOID_CONT_PER replaced with LASER_POWER_TRAP."
|
||||
#elif defined(LASER_POWER_INLINE_CONTINUOUS)
|
||||
#error "LASER_POWER_INLINE_CONTINUOUS is not required, inline mode is enabled with 'M3 I' and disabled with 'M5 I'."
|
||||
#elif defined(CUTTER_POWER_DISPLAY)
|
||||
#error "CUTTER_POWER_DISPLAY is now CUTTER_POWER_UNIT."
|
||||
#elif defined(CHAMBER_HEATER_PIN)
|
||||
@ -595,6 +605,8 @@
|
||||
#error "ARC_SUPPORT no longer uses ARC_SEGMENTS_PER_R."
|
||||
#elif ENABLED(ARC_SUPPORT) && (!defined(MIN_ARC_SEGMENT_MM) || !defined(MAX_ARC_SEGMENT_MM))
|
||||
#error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM."
|
||||
#elif defined(LASER_POWER_INLINE)
|
||||
#error "LASER_POWER_INLINE is obsolete."
|
||||
#elif defined(SPINDLE_LASER_PWM)
|
||||
#error "SPINDLE_LASER_PWM (true) is now set with SPINDLE_LASER_USE_PWM (enabled)."
|
||||
#elif ANY(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF)
|
||||
@ -3841,37 +3853,26 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#error "CUTTER_POWER_UNIT must be PWM255, PERCENT, RPM, or SERVO."
|
||||
#endif
|
||||
|
||||
#if ENABLED(LASER_POWER_INLINE)
|
||||
#if ENABLED(LASER_FEATURE)
|
||||
#if ENABLED(SPINDLE_CHANGE_DIR)
|
||||
#error "SPINDLE_CHANGE_DIR and LASER_POWER_INLINE are incompatible."
|
||||
#elif ENABLED(LASER_MOVE_G0_OFF) && DISABLED(LASER_MOVE_POWER)
|
||||
#error "LASER_MOVE_G0_OFF requires LASER_MOVE_POWER."
|
||||
#error "SPINDLE_CHANGE_DIR and LASER_FEATURE are incompatible."
|
||||
#elif ENABLED(LASER_MOVE_G0_OFF)
|
||||
#error "LASER_MOVE_G0_OFF is no longer required, G0 and G28 cannot apply power."
|
||||
#elif ENABLED(LASER_MOVE_G28_OFF)
|
||||
#error "LASER_MOVE_G0_OFF is no longer required, G0 and G28 cannot apply power."
|
||||
#elif ENABLED(LASER_MOVE_POWER)
|
||||
#error "LASER_MOVE_POWER is no longer applicable."
|
||||
#endif
|
||||
#if ENABLED(LASER_POWER_INLINE_TRAPEZOID)
|
||||
#if ENABLED(LASER_POWER_TRAP)
|
||||
#if DISABLED(SPINDLE_LASER_USE_PWM)
|
||||
#error "LASER_POWER_INLINE_TRAPEZOID requires SPINDLE_LASER_USE_PWM to function."
|
||||
#elif ENABLED(S_CURVE_ACCELERATION)
|
||||
//#ifndef LASER_POWER_INLINE_S_CURVE_ACCELERATION_WARN
|
||||
// #define LASER_POWER_INLINE_S_CURVE_ACCELERATION_WARN
|
||||
// #warning "Combining LASER_POWER_INLINE_TRAPEZOID with S_CURVE_ACCELERATION may result in unintended behavior."
|
||||
//#endif
|
||||
#error "LASER_POWER_TRAP requires SPINDLE_LASER_USE_PWM to function."
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(LASER_POWER_INLINE_INVERT)
|
||||
//#ifndef LASER_POWER_INLINE_INVERT_WARN
|
||||
// #define LASER_POWER_INLINE_INVERT_WARN
|
||||
// #warning "Enabling LASER_POWER_INLINE_INVERT means that `M5` won't kill the laser immediately; use `M5 I` instead."
|
||||
//#endif
|
||||
#endif
|
||||
#else
|
||||
#if SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif ENABLED(LASER_MOVE_POWER)
|
||||
#error "LASER_MOVE_POWER requires LASER_POWER_INLINE."
|
||||
#elif ANY(LASER_POWER_INLINE_TRAPEZOID, LASER_POWER_INLINE_INVERT, LASER_MOVE_G0_OFF, LASER_MOVE_POWER)
|
||||
#error "Enabled an inline laser feature without inline laser power being enabled."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -3889,7 +3890,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT is required for (SPINDLE|LASER)_FEATURE."
|
||||
#elif !(defined(SPEED_POWER_INTERCEPT) && defined(SPEED_POWER_MIN) && defined(SPEED_POWER_MAX) && defined(SPEED_POWER_STARTUP))
|
||||
#elif !(defined(SPEED_POWER_MIN) && defined(SPEED_POWER_MAX) && defined(SPEED_POWER_STARTUP))
|
||||
#error "SPINDLE_LASER_USE_PWM equation constant(s) missing."
|
||||
#elif _PIN_CONFLICT(X_MIN)
|
||||
#error "SPINDLE_LASER_USE_PWM pin conflicts with X_MIN_PIN."
|
||||
|
Reference in New Issue
Block a user