From 5dd708590a1a74832c9d39e83cdfb631e72c92ff Mon Sep 17 00:00:00 2001
From: "VKMTHD\\haraldmartini" <harald.martini@student.tugraz.at>
Date: Tue, 31 Jan 2023 13:43:43 +0100
Subject: [PATCH] switch em on in pevamt shift strategy testpowertrain

(cherry picked from commit 7fafd126261a701c0032a0f6caa6ddced9aafa91)
---
 .../Impl/Shiftstrategies/PEVAMTShiftStrategy.cs             | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Shiftstrategies/PEVAMTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Shiftstrategies/PEVAMTShiftStrategy.cs
index a95252c997..7757296b4a 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Shiftstrategies/PEVAMTShiftStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Shiftstrategies/PEVAMTShiftStrategy.cs
@@ -144,6 +144,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl.Shiftstrategies
 			PowertrainBuilder.BuildSimplePowertrainElectric(runData, testContainer);
 
 			TestPowertrain = new TestPowertrain<Gearbox>(testContainer, DataBus);
+			foreach (var motor in testContainer.ElectricMotors.Values)
+			{
+				if ((motor as ElectricMotor).Control is SimpleElectricMotorControl emCtl) {
+					emCtl.EmOff = false; //Make sure em is switched on
+				}
+			}
 		}
 
 		protected void SetupVelocityDropPreprocessor(IVehicleContainer dataBus)
-- 
GitLab