🔧 SPINDLE_LASER_PWM => SPINDLE_LASER_USE_PWM

This commit is contained in:
Scott Lahteine
2021-09-13 16:28:12 -05:00
parent 59ad93560e
commit de4eed33e4
15 changed files with 57 additions and 49 deletions

View File

@ -2255,7 +2255,7 @@ uint32_t Stepper::block_phase_isr() {
}
#else
if (stat.isPlanned) { // Planner controls the laser
#if ENABLED(SPINDLE_LASER_PWM)
#if ENABLED(SPINDLE_LASER_USE_PWM)
cutter.ocr_set_power(
stat.isEnabled ? current_block->laser.power : 0 // ON with power or OFF
);
@ -2303,7 +2303,7 @@ uint32_t Stepper::block_phase_isr() {
// This should mean ending file with 'M5 I' will stop the laser; thus the inline flag isn't needed
const power_status_t stat = planner.laser_inline.status;
if (stat.isPlanned) { // Planner controls the laser
#if ENABLED(SPINDLE_LASER_PWM)
#if ENABLED(SPINDLE_LASER_USE_PWM)
cutter.ocr_set_power(
stat.isEnabled ? planner.laser_inline.power : 0 // ON with power or OFF
);

View File

@ -372,11 +372,11 @@ class Stepper {
uint8_t cur_power; // Current laser power
bool cruise_set; // Power set up for cruising?
#if DISABLED(LASER_POWER_INLINE_TRAPEZOID_CONT)
#if ENABLED(LASER_POWER_INLINE_TRAPEZOID_CONT)
uint16_t till_update; // Countdown to the next update
#else
uint32_t last_step_count, // Step count from the last update
acc_step_count; // Bresenham counter for laser accel/decel
#else
uint16_t till_update; // Countdown to the next update
#endif
} stepper_laser_t;