|
|
@ -423,21 +423,58 @@ void Planner::check_axes_activity() { |
|
|
|
|
|
|
|
#if ENABLED(BARICUDA) |
|
|
|
#if HAS_HEATER_1 |
|
|
|
uint8_t tail_valve_pressure; |
|
|
|
uint8_t tail_valve_pressure = baricuda_valve_pressure; |
|
|
|
#endif |
|
|
|
#if HAS_HEATER_2 |
|
|
|
uint8_t tail_e_to_p_pressure; |
|
|
|
uint8_t tail_e_to_p_pressure = baricuda_e_to_p_pressure; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if FAN_COUNT > 0 |
|
|
|
for (uint8_t i = 0; i < FAN_COUNT; i++) tail_fan_speed[i] = fanSpeeds[i]; |
|
|
|
#endif |
|
|
|
|
|
|
|
if (blocks_queued()) { |
|
|
|
|
|
|
|
#if FAN_COUNT > 0 |
|
|
|
|
|
|
|
for (uint8_t i = 0; i < FAN_COUNT; i++) |
|
|
|
tail_fan_speed[i] = block_buffer[block_buffer_tail].fan_speed[i]; |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef FAN_KICKSTART_TIME |
|
|
|
block_t* block; |
|
|
|
|
|
|
|
#if ENABLED(BARICUDA) |
|
|
|
block = &block_buffer[block_buffer_tail]; |
|
|
|
#if HAS_HEATER_1 |
|
|
|
tail_valve_pressure = block->valve_pressure; |
|
|
|
#endif |
|
|
|
#if HAS_HEATER_2 |
|
|
|
tail_e_to_p_pressure = block->e_to_p_pressure; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { |
|
|
|
block = &block_buffer[b]; |
|
|
|
LOOP_XYZE(i) if (block->steps[i]) axis_active[i]++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#if ENABLED(DISABLE_X) |
|
|
|
if (!axis_active[X_AXIS]) disable_X(); |
|
|
|
#endif |
|
|
|
#if ENABLED(DISABLE_Y) |
|
|
|
if (!axis_active[Y_AXIS]) disable_Y(); |
|
|
|
#endif |
|
|
|
#if ENABLED(DISABLE_Z) |
|
|
|
if (!axis_active[Z_AXIS]) disable_Z(); |
|
|
|
#endif |
|
|
|
#if ENABLED(DISABLE_E) |
|
|
|
if (!axis_active[E_AXIS]) disable_e_steppers(); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if FAN_COUNT > 0 |
|
|
|
|
|
|
|
#if FAN_KICKSTART_TIME > 0 |
|
|
|
|
|
|
|
static millis_t fan_kick_end[FAN_COUNT] = { 0 }; |
|
|
|
|
|
|
@ -461,7 +498,7 @@ void Planner::check_axes_activity() { |
|
|
|
KICKSTART_FAN(2); |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif // FAN_KICKSTART_TIME
|
|
|
|
#endif // FAN_KICKSTART_TIME > 0
|
|
|
|
|
|
|
|
#ifdef FAN_MIN_PWM |
|
|
|
#define CALC_FAN_SPEED(f) (tail_fan_speed[f] ? ( FAN_MIN_PWM + (tail_fan_speed[f] * (255 - FAN_MIN_PWM)) / 255 ) : 0) |
|
|
@ -493,51 +530,6 @@ void Planner::check_axes_activity() { |
|
|
|
|
|
|
|
#endif // FAN_COUNT > 0
|
|
|
|
|
|
|
|
block_t* block; |
|
|
|
|
|
|
|
#if ENABLED(BARICUDA) |
|
|
|
block = &block_buffer[block_buffer_tail]; |
|
|
|
#if HAS_HEATER_1 |
|
|
|
tail_valve_pressure = block->valve_pressure; |
|
|
|
#endif |
|
|
|
#if HAS_HEATER_2 |
|
|
|
tail_e_to_p_pressure = block->e_to_p_pressure; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { |
|
|
|
block = &block_buffer[b]; |
|
|
|
LOOP_XYZE(i) if (block->steps[i]) axis_active[i]++; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
#if FAN_COUNT > 0 |
|
|
|
for (uint8_t i = 0; i < FAN_COUNT; i++) tail_fan_speed[i] = fanSpeeds[i]; |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(BARICUDA) |
|
|
|
#if HAS_HEATER_1 |
|
|
|
tail_valve_pressure = baricuda_valve_pressure; |
|
|
|
#endif |
|
|
|
#if HAS_HEATER_2 |
|
|
|
tail_e_to_p_pressure = baricuda_e_to_p_pressure; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
#if ENABLED(DISABLE_X) |
|
|
|
if (!axis_active[X_AXIS]) disable_X(); |
|
|
|
#endif |
|
|
|
#if ENABLED(DISABLE_Y) |
|
|
|
if (!axis_active[Y_AXIS]) disable_Y(); |
|
|
|
#endif |
|
|
|
#if ENABLED(DISABLE_Z) |
|
|
|
if (!axis_active[Z_AXIS]) disable_Z(); |
|
|
|
#endif |
|
|
|
#if ENABLED(DISABLE_E) |
|
|
|
if (!axis_active[E_AXIS]) disable_e_steppers(); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(AUTOTEMP) |
|
|
|
getHighESpeed(); |
|
|
|
#endif |
|
|
|