Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 2e693cc1 authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

Merge branch 'bugfix/CodeEU-134_vehicleHalt' into 'amdm2/develop'

disable recuperation of EM only in case the driver wants to brake (i.e., allow...

See merge request vecto/vecto!159
parents 5ddb6f29 c5995b15
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Utils;
......@@ -58,8 +59,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
#endregion
protected virtual bool CannotProvideRecuperationAtLowSpeed(NewtonMeter outTorque)
{
return (DataBus.VehicleInfo.VehicleSpeed ?? 0.SI<MeterPerSecond>()).IsSmallerOrEqual(
{
var driverIsBraking = DataBus.DriverInfo.DriverBehavior == DrivingBehavior.Braking &&
DataBus.DriverInfo.DrivingAction == DrivingAction.Brake;
return driverIsBraking && (DataBus.VehicleInfo.VehicleSpeed ?? 0.SI<MeterPerSecond>()).IsSmallerOrEqual(
GearboxModelData?.DisengageWhenHaltingSpeed ?? Constants.SimulationSettings.ATGearboxDisengageWhenHaltingSpeed)
&& outTorque.IsSmaller(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