Skip to content

Commit

Permalink
thermal: fix another case of subtraction in the wrong order
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-shift committed Nov 3, 2022
1 parent 54c4830 commit 438eede
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion task/thermal/src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ impl<'a> ThermalControl<'a> {
for (v, i) in values.iter().zip(self.bsp.inputs.iter()) {
if let TemperatureReading::Valid { value, time_ms } = v {
let temperature = value.0
+ (time_ms - now_ms) as f32 / 1000.0
+ (now_ms - time_ms) as f32 / 1000.0
* i.temps.temperature_slew_deg_per_sec;
any_power_down |=
temperature >= i.temps.power_down_temperature.0;
Expand Down

0 comments on commit 438eede

Please sign in to comment.