From eb84a27aa2db62b7899e5a29bd387085fbc286c7 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Tue, 19 Jul 2022 16:24:56 +0200 Subject: [PATCH] Pulled up Member "RequestAfterGearshift" to avoid having to cast to ATGearbox --- VectoCore/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs | 2 ++ VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs | 2 ++ .../Models/SimulationComponent/Impl/AbstractGearbox.cs | 1 + .../Models/SimulationComponent/Impl/DummyGearboxInfo.cs | 2 ++ .../Models/SimulationComponent/Impl/SingleSpeedGearbox.cs | 2 ++ VectoCore/VectoCoreTest/Utils/MockGearbox.cs | 2 ++ VectoCore/VectoCoreTest/Utils/MockVehicleContainer.cs | 2 ++ 7 files changed, 13 insertions(+) diff --git a/VectoCore/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs b/VectoCore/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs index 481476c779..ea6f671b0a 100644 --- a/VectoCore/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs +++ b/VectoCore/VectoCore/Models/Simulation/DataBus/IGearboxInfo.cs @@ -78,6 +78,8 @@ namespace TUGraz.VectoCore.Models.Simulation.DataBus bool DisengageGearbox { get; } bool GearEngaged(Second absTime); + + bool RequestAfterGearshift { get; set; } } public interface IGearboxControl diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index 966448ffbe..9a40b68106 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -1866,6 +1866,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl return true; } + public bool RequestAfterGearshift { get; set; } + #endregion } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs index 14028b6418..6c150c4188 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs @@ -124,6 +124,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl #endregion public abstract bool GearEngaged(Second absTime); + public bool RequestAfterGearshift { get; set; } protected bool ConsiderShiftLosses(GearshiftPosition nextGear, NewtonMeter torqueOut) { diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DummyGearboxInfo.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DummyGearboxInfo.cs index 74ee79b2c1..66cbd71d1c 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DummyGearboxInfo.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DummyGearboxInfo.cs @@ -67,6 +67,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return true; } + public bool RequestAfterGearshift { get; set; } + #endregion } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/SingleSpeedGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/SingleSpeedGearbox.cs index 1ea1767960..f52817d0e2 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/SingleSpeedGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/SingleSpeedGearbox.cs @@ -83,6 +83,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return true; } + public bool RequestAfterGearshift { get; set; } + #endregion } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Utils/MockGearbox.cs b/VectoCore/VectoCoreTest/Utils/MockGearbox.cs index 8f656aa0f2..1e83d98200 100644 --- a/VectoCore/VectoCoreTest/Utils/MockGearbox.cs +++ b/VectoCore/VectoCoreTest/Utils/MockGearbox.cs @@ -131,6 +131,8 @@ namespace TUGraz.VectoCore.Tests.Utils return _clutchClosed; } + public bool RequestAfterGearshift { get; set; } + public bool ClutchClosed(Second absTime) { return _clutchClosed; diff --git a/VectoCore/VectoCoreTest/Utils/MockVehicleContainer.cs b/VectoCore/VectoCoreTest/Utils/MockVehicleContainer.cs index 56faff6941..911ee8289e 100644 --- a/VectoCore/VectoCoreTest/Utils/MockVehicleContainer.cs +++ b/VectoCore/VectoCoreTest/Utils/MockVehicleContainer.cs @@ -315,6 +315,8 @@ namespace TUGraz.VectoCore.Tests.Utils return ClutchClosed(absTime); } + public bool RequestAfterGearshift { get; set; } + #endregion public IEnumerable<ISimulationPreprocessor> GetPreprocessingRuns { get { return new ISimulationPreprocessor[] { }; } } -- GitLab