️ Fix and improve Inline Laser Power (#22690)

This commit is contained in:
Mike La Spina
2022-07-06 07:46:39 -05:00
committed by Scott Lahteine
parent 5b6c46db29
commit d965303a7a
18 changed files with 851 additions and 715 deletions

View File

@ -444,25 +444,6 @@ class Stepper {
// Current stepper motor directions (+1 or -1)
static xyze_int8_t count_direction;
#if ENABLED(LASER_POWER_INLINE_TRAPEZOID)
typedef struct {
bool enabled; // Trapezoid needed flag (i.e., laser on, planner in control)
uint8_t cur_power; // Current laser power
bool cruise_set; // Power set up for cruising?
#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
#endif
} stepper_laser_t;
static stepper_laser_t laser_trap;
#endif
public:
// Initialize stepper hardware
static void init();