Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 06c91592 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

check if a battery is available, so the electric WHR is connected to the...

check if a battery is available, so the electric WHR is connected to the battery before checking whether the batery is full
parent d19b25c0
No related branches found
No related tags found
No related merge requests found
......@@ -495,7 +495,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var (pWHRelMap, pWHRelCorr) = GetWHRPower(ModelData.ElectricalWHR, engineSpeed, engineTorque);
var (pWHRmechMap, pWHRmechCorr) = GetWHRPower(ModelData.MechanicalWHR, engineSpeed, engineTorque);
if (Math.Abs(DataBus.BatteryInfo.StateOfCharge - DataBus.BatteryInfo.MaxSoC) < 0.01) {
if (DataBus.BatteryInfo != null && Math.Abs(DataBus.BatteryInfo.StateOfCharge - DataBus.BatteryInfo.MaxSoC) < 0.01) {
// we are close to the max charge - 'bypass' electric WHR...
pWHRelCorr = 0.SI<Watt>();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment