From cbfbe2bb446f739e8f49837df46833607440329f Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Tue, 19 Jul 2022 11:25:27 +0200
Subject: [PATCH] HybridStrategy: Minor changes

---
 .../Models/SimulationComponent/Strategies/HybridStrategy.cs    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
index 26c32bebe6..6fa4c70631 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
@@ -77,7 +77,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
 
 			TestPowertrain.Gearbox.UpdateFrom(nextGear);
 			TestPowertrain.Gearbox._nextGear = Controller.ShiftStrategy.NextGear;
-			TestPowertrain.Gearbox.UpdateFrom((DataBus.GearboxInfo as AbstractGearbox<GearboxState>).PreviousState);
+			TestPowertrain.Gearbox.UpdateFrom((DataBus.GearboxInfo as Gearbox).PreviousState);
 			
 			foreach (var emPos in TestPowertrain.ElectricMotorsUpstreamTransmission.Keys) {
 				TestPowertrain.ElectricMotorsUpstreamTransmission[ModelData.ElectricMachinesData.FirstOrDefault().Item1].PreviousState.EMSpeed = DataBus.ElectricMotorInfo(emPos).ElectricMotorSpeed;
@@ -129,6 +129,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
 			TestPowertrain.UpdateComponents();
 
 			TestPowertrain.Gearbox.Gear = PreviousState.GearboxEngaged ? DataBus.GearboxInfo.Gear : Controller.ShiftStrategy.NextGear;
+			
 			TestPowertrain.Gearbox.UpdateFrom(nextGear);
 			
 			TestPowertrain.Container.VehiclePort.Initialize(DataBus.VehicleInfo.VehicleSpeed, DataBus.DrivingCycleInfo.RoadGradient ?? 0.SI<Radian>());
-- 
GitLab