diff --git a/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs index 3257c65fced326dfc894dab023afd2864194d85a..4a30d7ac060379c38219c2b4b4f741939abf53a9 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/IShiftStrategy.cs @@ -90,14 +90,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent /// </value> IGearbox Gearbox { get; set; } - GearInfo NextGear { get; } + GearInfo NextGear { get; } + } + public class GearInfo + { + public GearInfo(uint gear, bool tcLocked) + { + Gear = gear; + TorqueConverterLocked = tcLocked; + } + public uint Gear { get; private set; } + public bool TorqueConverterLocked { get; private set; } } - - public class GearInfo - { - public uint Gear; - public bool TorqueConverterLocked; - } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs index cde52fe32b79dc6ff1b68bab537edb2358caa494..eba3292474c8cbbb9e299a0e6e09df871c6d306b 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AMTShiftStrategy.cs @@ -63,7 +63,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public override GearInfo NextGear { - get { return new GearInfo(){Gear = _nextGear, TorqueConverterLocked = false}; } + get { return new GearInfo( _nextGear, false); } } public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs index 2450592d0717289a4a418e0f16619059c4e6aaf7..300c7d773e97c0c1aa5aab6b7df64bb59f8961d4 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs @@ -285,7 +285,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public GearInfo NextGear { - get { return new GearInfo() { Gear = _nextGear.Gear, TorqueConverterLocked = _nextGear.TorqueConverterLocked }; } + get { return new GearInfo(_nextGear.Gear, _nextGear.TorqueConverterLocked ); } } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs index 1f04871d93bfe8d6b41565a561f403bf0f9dea22..514a67e4cce141424217692efe83735d87c8578b 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CycleGearbox.cs @@ -366,10 +366,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { get { - return new GearInfo() { - Gear = DataBus.CycleData.RightSample.Gear, - TorqueConverterLocked = !DataBus.CycleData.RightSample.TorqueConverterActive ?? true - }; + return new GearInfo(DataBus.CycleData.RightSample.Gear, !DataBus.CycleData.RightSample.TorqueConverterActive ?? true); } }