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 42f6c47e authored by Stefanos Doumpoulakis's avatar Stefanos Doumpoulakis
Browse files

fix #516, #517, #519, #527, #528: ATGearbox dryrun

Problem: The ATGearbox would sometimes change the gear during a dry run.
parent ccf2a11d
No related branches found
No related tags found
No related merge requests found
......@@ -256,7 +256,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
IResponse retVal;
var count = 0;
var loop = false;
SetPowershiftLossEnergy(absTime, dt, outTorque, outAngularVelocity);
SetPowershiftLossEnergy(absTime, dt, outTorque, outAngularVelocity, dryRun);
do {
if (CurrentState.Disengaged
|| (DataBus.DriverInfo.DriverBehavior == DrivingBehavior.Halted)
......@@ -294,11 +294,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return retVal;
}
private void SetPowershiftLossEnergy(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity)
private void SetPowershiftLossEnergy(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun)
{
if (RequestAfterGearshift /*&& Gear != PreviousState.Gear*/) {
LastShift = absTime;
Gear = _strategy?.Engage(absTime, dt, outTorque, outAngularVelocity) ?? Gear;
if (!dryRun) {
Gear = _strategy?.Engage(absTime, dt, outTorque, outAngularVelocity) ?? Gear;
}
_powershiftLossEnergy = ComputeShiftLosses(outTorque, outAngularVelocity, Gear);
} else {
if (PreviousState.PowershiftLossEnergy != null && PreviousState.PowershiftLossEnergy.IsGreater(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