From 58e665ccc81f9239302c3b16a262296595b1fac9 Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Mon, 2 May 2022 12:41:59 +0200
Subject: [PATCH] HybridStrategy HandleCoastAction: Update CombustionEngineOn
 flag accordingly to the ICEoff flag (after setting it).

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

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
index 669132a8cf..627b768362 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
@@ -1446,13 +1446,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
 			var result = ResponseEmOff;
 			if (DataBus.DriverInfo.PCCState.IsOneOf(PCCStates.UseCase1, PCCStates.UseCase2)) {
 				result.ICEOff = AllowICEOff(absTime);
-				result.Setting.CombustionEngineOn = !result.ICEOff;
 
 				if (DataBus.PowertrainInfo.ElectricMotorPositions.Contains(PowertrainPosition.HybridP1)) {
 					// special logic for HybridP1 (VECTO-1493)
 					result.Setting.GearboxInNeutral = true;
 					result.ICEOff &= ModelData.VehicleData.ADAS.EngineStopStart;
 				}
+				result.Setting.CombustionEngineOn = !result.ICEOff;
 			}
 			eval.Add(result);
 		}
-- 
GitLab