diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs index 4b7a0cc978f45f687acb4b1391370065a3f7b2b8..087876ce24f6f1f24b288f591f5599b543301928 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs @@ -40,6 +40,7 @@ using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; +using TUGraz.VectoCore.Models.SimulationComponent.Strategies; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.Utils; @@ -50,7 +51,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl protected internal readonly IShiftStrategy _strategy; protected internal readonly TorqueConverter TorqueConverter; private IIdleController _idleController; - protected internal bool RequestAfterGearshift; internal WattSecond _powershiftLossEnergy; protected internal KilogramSquareMeter EngineInertia; @@ -595,21 +595,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (other is ATGearbox g) { PreviousState = g.PreviousState.Clone(); _powershiftLossEnergy = g._powershiftLossEnergy; - EngineInertia = g.EngineInertia; - Disengaged = g.Disengaged; - SwitchToNeutral = g.SwitchToNeutral; - RequestAfterGearshift = g.RequestAfterGearshift; LastShift = g.LastShift; return true; } - - if (other is GearshiftPosition p) { - Gear = p; - DisengageGearbox = !p.Engaged; - Disengaged = !p.Engaged; - return true; - } - + return false; } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs index 7e4527e1c2d56ec070637bb823812ff701195897..39ea12f2c6ca10290670f09c376c2dc1d502cf22 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs @@ -9,6 +9,7 @@ using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Strategies; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.Utils; @@ -582,8 +583,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public bool UpdateFrom(object other) { if (other is ElectricMotor e && Position == e.Position) { - PreviousState = e.PreviousState.Clone(); - ElectricPower = e.ElectricPower; ThermalBuffer = e.ThermalBuffer; DeRatingActive = e.DeRatingActive; return true; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs index dcc2f7d07102a14366bd068086d327580f31356f..86c5c945cb8242a1236396b93a8b5e373081235e 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs @@ -571,30 +571,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public bool UpdateFrom(object other) { if (other is Gearbox g) { PreviousState = g.PreviousState.Clone(); - Disengaged = g.Disengaged; - DisengageGearbox = g.DisengageGearbox; - _nextGear = g.NextGear; - - if (DataBus.VehicleInfo.VehicleStopped) { - Gear = _nextGear; - } else { - Gear = g.Gear; - } - - return true; - } - - if (other is GearshiftPosition p) { - _nextGear = p; - DisengageGearbox = !p.Engaged; - Disengaged = !p.Engaged; return true; } - - if (other is GearboxState s) { - PreviousState = s.Clone(); - } - return false; }