From 213aa625793aade0a702b7d100247dbf03849d39 Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Thu, 14 Apr 2022 15:02:13 +0200
Subject: [PATCH] code formatting

---
 .../SimulationComponent/Impl/DefaultDriverStrategy.cs      | 7 ++++---
 .../SimulationComponent/Strategies/HybridStrategy.cs       | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs
index 009c0de5f1..4596dc3e07 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs
@@ -1288,9 +1288,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 						if (response is ResponseOverload) {
 							Log.Info("Brake -> Overload -> 2nd Brake -> Overload -> Trying accelerate action");
 							var gear = DataBus.GearboxInfo.Gear;
-							response = DataBus.GearboxInfo.GearEngaged(absTime)
-								? Driver.DrivingActionAccelerate(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient)
-								: Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient);
+							if (DataBus.GearboxInfo.GearEngaged(absTime))
+								response = Driver.DrivingActionAccelerate(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient);
+							else
+								response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient);
 
 							switch (response) {
 								case ResponseGearShift _:
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
index 3a356983de..e1ff741aeb 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
@@ -1735,7 +1735,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
 				// ICE is off, selected solution has a too low or too high engine speed - keep ICE off
 				retVal.CombustionEngineOn = false;
 			}
-			if (best.IgnoreReason.EngineSpeedTooLow() && !DataBus.EngineInfo.EngineOn && DataBus.VehicleInfo.VehicleSpeed.IsGreater(ModelData.GearshiftParameters.StartSpeed)) {
+			if (best.IgnoreReason.EngineSpeedTooLow() && !DataBus.EngineInfo.EngineOn 
+				&& DataBus.VehicleInfo.VehicleSpeed.IsGreater(ModelData.GearshiftParameters.StartSpeed)) {
 				// ICE is off, selected solution has a too low or too high engine speed - keep ICE off
 				retVal.CombustionEngineOn = false;
 			}
-- 
GitLab