Ejemplo n.º 1
0
        public void Accelerate(GearShiftBoundaries gearShiftBoundaries)
        {
            var currentRpm = _externalSystems.GetCurrentRpm();

            if (currentRpm < gearShiftBoundaries.DownshiftBoundary)
            {
                _gearShifter.Downshift();
            }

            else if (currentRpm > gearShiftBoundaries.UpshiftBoundary * _rpmUpshiftFactor)
            {
                _gearShifter.Upshift();
            }
        }
Ejemplo n.º 2
0
        public void Accelerate(Threshold threshold)
        {
            var currentRpm = _externalSystems.GetCurrentRpm();

            if (currentRpm > _gearShiftBoundaries.UpshiftBoundary)
            {
                _gearShifter.Upshift();
                return;
            }

            if (currentRpm < _gearShiftBoundaries.DownshiftBoundary)
            {
                _gearShifter.Downshift();
            }
        }
Ejemplo n.º 3
0
 public void ManualUpshift()
 {
     _gearShifter.Upshift();
 }