Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 4a26a44e authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

Pull request #193: handle the case that there is no next braketrigger speed

Merge in VECTO/vecto-dev from VECTO/mq_vecto-dev:develop to develop

* commit 'e06bcf5a':
  handle the case that there is no next braketrigger speed
parents 5a149604 e06bcf5a
No related branches found
No related tags found
No related merge requests found
...@@ -1459,6 +1459,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -1459,6 +1459,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public PCCStates PCCState => DriverStrategy.PCCState; public PCCStates PCCState => DriverStrategy.PCCState;
public MeterPerSecond NextBrakeTriggerSpeed => DriverStrategy.BrakeTrigger.NextTargetSpeed; public MeterPerSecond NextBrakeTriggerSpeed => DriverStrategy.BrakeTrigger?.NextTargetSpeed;
} }
} }
\ No newline at end of file
...@@ -1053,7 +1053,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1053,7 +1053,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
// hint: only check for halting speed if vehicle is actually braking to halt. // hint: only check for halting speed if vehicle is actually braking to halt.
var vehiclespeedBelowThreshold = DataBus.VehicleInfo.VehicleSpeed.IsSmaller(disengageSpeedThreshold) var vehiclespeedBelowThreshold = DataBus.VehicleInfo.VehicleSpeed.IsSmaller(disengageSpeedThreshold)
&& DataBus.DriverInfo.NextBrakeTriggerSpeed.IsEqual(0); && (DataBus.DriverInfo.NextBrakeTriggerSpeed?.IsEqual(0) ?? false);
if (ElectricMotorCanPropellDuringTractionInterruption || DataBus.GearboxInfo.GearEngaged(absTime)) { if (ElectricMotorCanPropellDuringTractionInterruption || DataBus.GearboxInfo.GearEngaged(absTime)) {
...@@ -1378,7 +1378,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1378,7 +1378,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
// only disengage if we are actually braking for halting (meaning: next brake trigger speed is 0). // only disengage if we are actually braking for halting (meaning: next brake trigger speed is 0).
if (DataBus.GearboxInfo.GearboxType.ManualTransmission() if (DataBus.GearboxInfo.GearboxType.ManualTransmission()
&& DataBus.DriverInfo.NextBrakeTriggerSpeed.IsEqual(0) && (DataBus.DriverInfo.NextBrakeTriggerSpeed?.IsEqual(0) ?? false)
&& endSpeed.IsSmallerOrEqual(ModelData.GearboxData.DisengageWhenHaltingSpeed, 0.1.KMPHtoMeterPerSecond())) { && endSpeed.IsSmallerOrEqual(ModelData.GearboxData.DisengageWhenHaltingSpeed, 0.1.KMPHtoMeterPerSecond())) {
return new GearshiftPosition(0); return new GearshiftPosition(0);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment