Esempio n. 1
0
 private static void DoSomeManualDrivingInTheMiddle(CabinService cabinService)
 {
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.15));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.45));
     TimeHelper.WaitSeconds(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.65));
     TimeHelper.WaitSeconds(10);
     cabinService.EnterManualMode();
     cabinService.DownshiftManually();
     cabinService.DownshiftManually();
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.95));
     TimeHelper.WaitSeconds(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     cabinService.UpshiftManually();
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ExitManualMode();
     TimeHelper.WaitSeconds(10);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyBrakePedalPressure(new PedalPressure(0.5));
     TimeHelper.WaitSeconds(13);
 }
Esempio n. 2
0
        public static void PlaySportsScenario()
        {
            TimeHelper.PlayMessage("\n\nNow we will observe the same situation in sport mode.\n", 3);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.SetResponsivenessMode(ResponsivenessMode.Sport);
            TimeHelper.WaitSeconds(4);

            DoCommonPedalOperations(cabinService);

            eventBus.Kill();
        }
Esempio n. 3
0
        public static void PlayMDynamicScenario()
        {
            TimeHelper.PlayMessage("\n\nTime for MDynamic scenario. In the middle of the demo, the car will start slipping and gears won't change.\n", 3);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.EnterDynamicMode();
            TimeHelper.WaitSeconds(4);

            DoCommonPedalOperationsWithAngularSpeedPeakInTheMiddle(cabinService);

            eventBus.Kill();
        }
Esempio n. 4
0
        public static void PlaySportsAggressiveScenario()
        {
            TimeHelper.PlayMessage("\n\nLet's add third aggressive mode now! Observe the explosions from the exhaust when reducing!\n", 3);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.SetResponsivenessMode(ResponsivenessMode.Sport);
            cabinService.SetAggressivenessLevel(AggressivenessLevel.Third);
            TimeHelper.WaitSeconds(4);

            DoCommonPedalOperations(cabinService);

            eventBus.Kill();
        }
Esempio n. 5
0
 private static void DoAggressivePedalChangesToCauseKickdown(CabinService cabinService)
 {
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.15));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(10);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.75));
     TimeHelper.WaitSeconds(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyBrakePedalPressure(new PedalPressure(0.5));
     TimeHelper.WaitSeconds(5);
 }
Esempio n. 6
0
 private static void DoCommonPedalOperations(CabinService cabinService)
 {
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.15));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.75));
     TimeHelper.WaitSeconds(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyBrakePedalPressure(new PedalPressure(0.5));
     TimeHelper.WaitSeconds(15);
 }
Esempio n. 7
0
        public static void PlayManualScenario()
        {
            TimeHelper.PlayMessage("\n\nManual gearshifting scenario. The driver will turn on manual mode during the drive.", 3);
            TimeHelper.PlayMessage("He will keep switching the gears and then come back to automatic economic mode.\n", 3);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.SetResponsivenessMode(ResponsivenessMode.Economic);
            TimeHelper.WaitSeconds(4);

            DoSomeManualDrivingInTheMiddle(cabinService);

            eventBus.Kill();
        }
Esempio n. 8
0
        public static void PlayTowingScenario()
        {
            TimeHelper.PlayMessage("\n\nTowing mode? Hold our beer. We will attach a trailer and the car will enter a hill in the middle of the demo.", 3);
            TimeHelper.PlayMessage("You can observe gear downshift as soon as the car tilts down. The gear will be restored along with the position.\n", 3);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.AttachTrailer();
            TimeHelper.WaitSeconds(4);

            DoCommonPedalOperationsWithLightsChangesInTheMiddle(cabinService);

            eventBus.Kill();
        }
Esempio n. 9
0
        public static void PlayEconomicScenario()
        {
            TimeHelper.PlayMessage("Our driver will enter the car now.", 3);
            TimeHelper.PlayMessage("He is going to setup Comfort Mode, slowly accelerate and then decelerate.", 3);
            TimeHelper.PlayMessage("You will the have chance to observe the changes in the gears and rpm being kept between 1000 - 2000.", 5);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.SetResponsivenessMode(ResponsivenessMode.Economic);
            TimeHelper.WaitSeconds(4);

            DoCommonPedalOperations(cabinService);

            eventBus.Kill();
        }
Esempio n. 10
0
        public static void PlayKickdownScenario()
        {
            TimeHelper.PlayMessage("\n\nTime for kickdown! The car will enter 5000 RPM. Then the driver will add more gas.", 3);
            TimeHelper.PlayMessage("At that point the car should drop 2 gears. The driver will reduce gas and the gears will upshift back.\n", 3);

            var eventBus = new EventBusThatYouDontWantToUseInProduction();

            SetupSystem(eventBus);
            var cabinService = new CabinService(eventBus);

            cabinService.SetDriveMode();
            TimeHelper.WaitSeconds(4);
            cabinService.SetResponsivenessMode(ResponsivenessMode.Sport);
            cabinService.SetAggressivenessLevel(AggressivenessLevel.Third);
            TimeHelper.WaitSeconds(4);

            DoAggressivePedalChangesToCauseKickdown(cabinService);

            eventBus.Kill();
        }
Esempio n. 11
0
 private static void DoCommonPedalOperationsWithLightsChangesInTheMiddle(CabinService cabinService)
 {
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.15));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     _externalSystems.getLights().setLightsPosition(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.75));
     TimeHelper.WaitSeconds(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     _externalSystems.getLights().setLightsPosition(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyBrakePedalPressure(new PedalPressure(0.5));
     TimeHelper.WaitSeconds(5);
 }
Esempio n. 12
0
 private static void DoCommonPedalOperationsWithAngularSpeedPeakInTheMiddle(CabinService cabinService)
 {
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.15));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     _externalSystems.setAngularSpeed(500);
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.75));
     TimeHelper.WaitSeconds(5);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.55));
     TimeHelper.WaitSeconds(3);
     _externalSystems.setAngularSpeed(100);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0.35));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyGasPedalPressure(new PedalPressure(0));
     TimeHelper.WaitSeconds(3);
     cabinService.ApplyBrakePedalPressure(new PedalPressure(0.5));
     TimeHelper.WaitSeconds(5);
 }