Skip to content

Commit

Permalink
cabin is following FC temp, which is good!
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Jan 30, 2025
1 parent 98decf6 commit 9af0632
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fastsim-core/src/vehicle/hvac/hvac_sys_for_lumped_cabin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl HVACSystemForLumpedCabin {
)
.with_context(|| format_dbg!())?;
ensure!(
pwr_thrml_hvac_to_cab > si::Power::ZERO,
pwr_thrml_hvac_to_cab >= si::Power::ZERO,
"{}\nHVAC should be heating cabin",
format_dbg!()
);
Expand Down Expand Up @@ -237,7 +237,7 @@ impl HVACSystemForLumpedCabin {
.max(si::Power::ZERO),
);
ensure!(
*pwr_thrml_hvac_to_cab > si::Power::ZERO,
*pwr_thrml_hvac_to_cab >= si::Power::ZERO,
"{}\nHVAC should be heating cabin",
format_dbg!()
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: lots of `ensures` need to propagate from hvac_sys_for_lumped_cabin
use super::*;

#[fastsim_api(
Expand Down Expand Up @@ -355,7 +356,7 @@ impl HVACSystemForLumpedCabinAndRES {
self.state.pwr_i = si::Power::ZERO;
}
let mut pwr_thrml_hvac_to_cabin: si::Power =
(-self.state.pwr_p - self.state.pwr_i - self.state.pwr_d)
(self.state.pwr_p + self.state.pwr_i + self.state.pwr_d)
.min(self.pwr_thrml_max);

// Assumes blower has negligible impact on aux load, may want to revise later
Expand Down

0 comments on commit 9af0632

Please sign in to comment.