From 70ed87a282a4093a54ac164dd41c73930168291d Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 27 Apr 2022 14:15:35 +0200 Subject: [PATCH] set previous state of gearbox in case of S2 --- .../SimulationComponent/Strategies/SerialHybridStrategy.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs index 7203984dea..da5d0c0253 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs @@ -188,7 +188,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies TestPowertrain.HybridController.Initialize(Controller.PreviousState.OutTorque, Controller.PreviousState.OutAngularVelocity); TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower; - var testResponse = + if (TestPowertrain.Gearbox != null) { + TestPowertrain.Gearbox.PreviousState.InAngularVelocity = + (DataBus.GearboxInfo as Gearbox).PreviousState.InAngularVelocity; + } + var testResponse = TestPowertrain.HybridController.NextComponent.Request(absTime, dt, outTorque, outAngularVelocity, false); TestPowertrain.HybridController.ApplyStrategySettings(new HybridStrategyResponse() { -- GitLab