🐛 Fix, improve PWM on AVR (#23520)

This commit is contained in:
Mike La Spina
2022-01-15 23:05:53 -06:00
committed by Scott Lahteine
parent 44249b1380
commit 01cb7c19f9
2 changed files with 19 additions and 13 deletions

View File

@ -1244,10 +1244,6 @@ void Planner::recalculate() {
recalculate_trapezoids();
}
#if HAS_FAN && DISABLED(LASER_SYNCHRONOUS_M106_M107)
#define HAS_TAIL_FAN_SPEED 1
#endif
/**
* Apply fan speeds
*/
@ -1308,8 +1304,9 @@ void Planner::check_axes_activity() {
xyze_bool_t axis_active = { false };
#endif
#if HAS_TAIL_FAN_SPEED
static uint8_t tail_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 255);
#if HAS_FAN && DISABLED(LASER_SYNCHRONOUS_M106_M107)
#define HAS_TAIL_FAN_SPEED 1
static uint8_t tail_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 128);
bool fans_need_update = false;
#endif