From 3fe9129cb37a89022e9dfb5a3b4494e138b3a789 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Mon, 14 Mar 2022 10:18:39 +0100
Subject: [PATCH] hybrid strategy: allow disengage if engine speed is below
 idle and no lower gear is available

---
 .../SimulationComponent/Strategies/HybridStrategy.cs   | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
index eb8278df26..638b74642f 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
@@ -1081,6 +1081,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
 					} while (GearList.HasPredecessor(nextGear) && firstResponse == null);
 				}
 
+				if (nextGear.Equals(GearList.First()) && engineSpeedTooLow) {
+					// disengage gearbox...
+					var response = ResponseEmOff;
+					response.Gear = new GearshiftPosition(0);
+					response.Setting.GearboxEngaged = false;
+					response.Setting.GearboxInNeutral = true;
+					eval.Add(response);
+					return;
+				}
+
 				if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission() && firstResponse == null && nextGear.Equals(GearList.First())) {
 					var downshift = ResponseEmOff;
 					downshift.Gear = nextGear;
-- 
GitLab