public void Accelerate(GearShiftBoundaries gearShiftBoundaries) { var currentRpm = _externalSystems.GetCurrentRpm(); if (currentRpm < gearShiftBoundaries.DownshiftBoundary) { _gearShifter.Downshift(); } else if (currentRpm > gearShiftBoundaries.UpshiftBoundary * _rpmUpshiftFactor) { _gearShifter.Upshift(); } }
public void Accelerate(Threshold threshold) { var currentRpm = _externalSystems.GetCurrentRpm(); if (currentRpm > _gearShiftBoundaries.UpshiftBoundary) { _gearShifter.Upshift(); return; } if (currentRpm < _gearShiftBoundaries.DownshiftBoundary) { _gearShifter.Downshift(); } }
public void ManualUpshift() { _gearShifter.Upshift(); }