Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 68d7398a authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

refactoring initialization of start gear: always have the ICE on in the...

refactoring initialization of start gear: always have the ICE on in the testpowertrain to select a gear that is suitable for the ICE as well.
parent db1230c2
No related branches found
No related tags found
No related merge requests found
......@@ -435,9 +435,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected virtual GearshiftPosition InitStartGear(Second absTime, NewtonMeter outTorque, PerSecond outAngularVelocity)
{
if (!DataBus.EngineCtl.CombustionEngineOn) {
return _nextGear;
}
//if (!DataBus.EngineCtl.CombustionEngineOn) {
// return _nextGear;
//}
foreach (var gear in GearList.IterateGears(MaxStartGear, GearList.First())) {
//for (var gear = MaxStartGear; gear > 1; gear--) {
......@@ -450,12 +450,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
//var response = _gearbox.Initialize(absTime, gear, outTorque, outAngularVelocity);
TestPowertrain.UpdateComponents();
TestPowertrain.Gearbox.Gear = gear;
TestPowertrain.Gearbox._nextGear = gear;
if (_controller.CurrentStrategySettings != null) {
TestPowertrain.HybridController.ApplyStrategySettings(_controller.CurrentStrategySettings);
}
TestPowertrain.CombustionEngine.CombustionEngineOn = true;
var response = TestPowertrain.Gearbox.Initialize(outTorque, outAngularVelocity);
response = TestPowertrain.Gearbox.Request(absTime,
Constants.SimulationSettings.MeasuredSpeedTargetTimeInterval, outTorque, outAngularVelocity,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment