From dc001c3c9eb7748d16e937c42da0c7dd20a2536b Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 23 Jan 2019 15:33:41 +0100
Subject: [PATCH] fix: setting lastDown/Upshift to a veeery low value (again) -
 fixes changes in commit c73b4e0

---
 .../VectoCore/Models/SimulationComponent/Impl/Gearbox.cs  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
index 6bfdecae50..885259436f 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs
@@ -83,8 +83,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 				_strategy.Gearbox = this;
 			}
 
-			LastDownshift = double.MaxValue.SI<Second>();
-			LastUpshift = double.MaxValue.SI<Second>();
+			LastDownshift = -double.MaxValue.SI<Second>();
+			LastUpshift = -double.MaxValue.SI<Second>();
 		}
 
 		public override IResponse Initialize(NewtonMeter outTorque, PerSecond outAngularVelocity)
@@ -180,8 +180,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 			Log.Debug("Gearbox Power Request: torque: {0}, angularVelocity: {1}", outTorque, outAngularVelocity);
 			if (DataBus.VehicleStopped) {
 				EngageTime = absTime;
-				LastDownshift = double.MaxValue.SI<Second>();
-				LastUpshift = double.MaxValue.SI<Second>();
+				LastDownshift = -double.MaxValue.SI<Second>();
+				LastUpshift = -double.MaxValue.SI<Second>();
 			}
 			if (DataBus.DriverBehavior == DrivingBehavior.Halted) {
 				EngageTime = absTime + dt;
-- 
GitLab