🩹 Fix MPC compile (#25669)

This commit is contained in:
Giuliano Zaro
2023-04-16 06:59:23 +02:00
committed by GitHub
parent e49cf0665a
commit b6a1a6273f
2 changed files with 2 additions and 2 deletions

View File

@@ -1085,9 +1085,9 @@ volatile bool Temperature::raw_temps_ready = false;
block_responsiveness = -log((t2 - asymp_temp) / (t1 - asymp_temp)) / (sample_distance * (sample_count >> 1));
mpc.ambient_xfer_coeff_fan0 = mpc.heater_power * (MPC_MAX) / 255 / (asymp_temp - ambient_temp);
mpc.fan255_adjustment = 0.0f;
mpc.block_heat_capacity = mpc.ambient_xfer_coeff_fan0 / block_responsiveness;
mpc.sensor_responsiveness = block_responsiveness / (1.0f - (ambient_temp - asymp_temp) * exp(-block_responsiveness * t1_time) / (t1 - asymp_temp));
TERN_(MPC_INCLUDE_FAN, mpc.fan255_adjustment = 0.0f);
hotend.modeled_block_temp = asymp_temp + (ambient_temp - asymp_temp) * exp(-block_responsiveness * (ms - heat_start_time) / 1000.0f);
hotend.modeled_sensor_temp = current_temp;