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

Skip to content
Snippets Groups Projects
Commit 1d74a39f authored by Michael KRISPER's avatar Michael KRISPER
Browse files

DefaultDriverStrategy: inlined dataBus variable

parent 3e3eb719
No related branches found
No related tags found
No related merge requests found
...@@ -286,8 +286,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -286,8 +286,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
private void HandlePCC(Second absTime, MeterPerSecond targetVelocity) private void HandlePCC(Second absTime, MeterPerSecond targetVelocity)
{ {
var dataBus = DataBus; var vehicleSpeed = DataBus.VehicleInfo.VehicleSpeed;
var vehicleSpeed = dataBus.VehicleInfo.VehicleSpeed;
UpdatePCCState(targetVelocity); UpdatePCCState(targetVelocity);
...@@ -318,12 +317,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -318,12 +317,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
switch (ADAS.EcoRoll) { switch (ADAS.EcoRoll) {
case EcoRollType.None: break; case EcoRollType.None: break;
case EcoRollType.WithoutEngineStop: case EcoRollType.WithoutEngineStop:
dataBus.GearboxCtl.DisengageGearbox = true; DataBus.GearboxCtl.DisengageGearbox = true;
break; break;
case EcoRollType.WithEngineStop: case EcoRollType.WithEngineStop:
dataBus.GearboxCtl.DisengageGearbox = true; DataBus.GearboxCtl.DisengageGearbox = true;
if (dataBus.EngineCtl != null) { if (DataBus.EngineCtl != null) {
dataBus.EngineCtl.CombustionEngineOn = false; DataBus.EngineCtl.CombustionEngineOn = false;
} }
break; break;
default: throw new ArgumentOutOfRangeException(); default: throw new ArgumentOutOfRangeException();
...@@ -333,12 +332,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -333,12 +332,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
case PCCStates.OutsideSegment: case PCCStates.OutsideSegment:
case PCCStates.WithinSegment: case PCCStates.WithinSegment:
case PCCStates.PCCinterrupt: case PCCStates.PCCinterrupt:
if (dataBus.GearboxCtl != null) { if (DataBus.GearboxCtl != null) {
dataBus.GearboxCtl.DisengageGearbox = false; DataBus.GearboxCtl.DisengageGearbox = false;
} }
if (dataBus.EngineCtl != null) { if (DataBus.EngineCtl != null) {
dataBus.EngineCtl.CombustionEngineOn = true; DataBus.EngineCtl.CombustionEngineOn = true;
} }
break; break;
default: throw new ArgumentOutOfRangeException(); default: throw new ArgumentOutOfRangeException();
......
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