Code development platform for open source projects from the European Union institutions

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 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.
Finish editing this message first!
Please register or to comment