コード例 #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();
            }
        }
コード例 #2
0
ファイル: EcoMode.cs プロジェクト: christoff85/GearBoxDriver
        public void Accelerate(Threshold threshold)
        {
            var currentRpm = _externalSystems.GetCurrentRpm();

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

            if (currentRpm < _gearShiftBoundaries.DownshiftBoundary)
            {
                _gearShifter.Downshift();
            }
        }
コード例 #3
0
 public void ManualUpshift()
 {
     _gearShifter.Upshift();
 }