mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-06-26 09:25:18 -06:00
🎨 Minor ternary style tweak
This commit is contained in:
parent
cf7f5bcdee
commit
9ad9323aac
3 changed files with 9 additions and 7 deletions
|
@ -1609,7 +1609,7 @@ void Planner::quick_stop() {
|
|||
// Restart the block delay for the first movement - As the queue was
|
||||
// forced to empty, there's no risk the ISR will touch this.
|
||||
|
||||
delay_before_delivering = TERN_(FT_MOTION, ftMotion.cfg.active ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
delay_before_delivering = TERN0(FT_MOTION, ftMotion.cfg.active) ? BLOCK_DELAY_NONE : BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
|
||||
TERN_(HAS_WIRED_LCD, clear_block_buffer_runtime()); // Clear the accumulated runtime
|
||||
|
||||
|
@ -1770,7 +1770,7 @@ bool Planner::_buffer_steps(const xyze_long_t &target
|
|||
// As there are no queued movements, the Stepper ISR will not touch this
|
||||
// variable, so there is no risk setting this here (but it MUST be done
|
||||
// before the following line!!)
|
||||
delay_before_delivering = TERN_(FT_MOTION, ftMotion.cfg.active ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
delay_before_delivering = TERN0(FT_MOTION, ftMotion.cfg.active) ? BLOCK_DELAY_NONE : BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
}
|
||||
|
||||
// Move buffer head
|
||||
|
@ -2841,7 +2841,7 @@ void Planner::buffer_sync_block(const BlockFlagBit sync_flag/*=BLOCK_BIT_SYNC_PO
|
|||
// As there are no queued movements, the Stepper ISR will not touch this
|
||||
// variable, so there is no risk setting this here (but it MUST be done
|
||||
// before the following line!!)
|
||||
delay_before_delivering = TERN_(FT_MOTION, ftMotion.cfg.active ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
delay_before_delivering = TERN0(FT_MOTION, ftMotion.cfg.active) ? BLOCK_DELAY_NONE : BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
}
|
||||
|
||||
block_buffer_head = next_buffer_head;
|
||||
|
@ -3133,7 +3133,7 @@ bool Planner::buffer_line(const xyze_pos_t &cart, const_feedRate_t fr_mm_s
|
|||
// As there are no queued movements, the Stepper ISR will not touch this
|
||||
// variable, so there is no risk setting this here (but it MUST be done
|
||||
// before the following line!!)
|
||||
delay_before_delivering = TERN_(FT_MOTION, ftMotion.cfg.active ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
delay_before_delivering = TERN0(FT_MOTION, ftMotion.cfg.active) ? BLOCK_DELAY_NONE : BLOCK_DELAY_FOR_1ST_MOVE;
|
||||
}
|
||||
|
||||
// Move buffer head
|
||||
|
|
|
@ -3708,6 +3708,7 @@ void MarlinSettings::reset() {
|
|||
// Model predictive control
|
||||
//
|
||||
#if ENABLED(MPCTEMP)
|
||||
|
||||
constexpr float _mpc_heater_power[] = MPC_HEATER_POWER;
|
||||
constexpr float _mpc_block_heat_capacity[] = MPC_BLOCK_HEAT_CAPACITY;
|
||||
constexpr float _mpc_sensor_responsiveness[] = MPC_SENSOR_RESPONSIVENESS;
|
||||
|
@ -3737,7 +3738,8 @@ void MarlinSettings::reset() {
|
|||
#endif
|
||||
mpc.filament_heat_capacity_permm = _filament_heat_capacity_permm[e];
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // MPCTEMP
|
||||
|
||||
//
|
||||
// Fixed-Time Motion
|
||||
|
|
|
@ -1383,7 +1383,7 @@ void Temperature::factory_reset() {
|
|||
|
||||
// If analytic tuning fails, fall back to differential tuning
|
||||
if (tuning_type == AUTO && (mpc.sensor_responsiveness <= 0 || mpc.block_heat_capacity <= 0))
|
||||
tuning_type = FORCE_DIFFERENTIAL;
|
||||
tuning_type = FORCE_DIFFERENTIAL;
|
||||
|
||||
if (tuning_type == FORCE_DIFFERENTIAL) {
|
||||
#if ENABLED(MPC_AUTOTUNE_DEBUG)
|
||||
|
@ -1846,7 +1846,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T
|
|||
float ambient_xfer_coeff = mpc.ambient_xfer_coeff_fan0;
|
||||
#if ENABLED(MPC_INCLUDE_FAN)
|
||||
const uint8_t fan_index = TERN(SINGLEFAN, 0, ee);
|
||||
const float fan_fraction = TERN_(MPC_FAN_0_ACTIVE_HOTEND, !this_hotend ? 0.0f :) fan_speed[fan_index] * RECIPROCAL(255);
|
||||
const float fan_fraction = TERN0(MPC_FAN_0_ACTIVE_HOTEND, !this_hotend) ? 0.0f : fan_speed[fan_index] * RECIPROCAL(255);
|
||||
ambient_xfer_coeff += fan_fraction * mpc.fan255_adjustment;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue