コード例 #1
0
ファイル: RealCar.cs プロジェクト: Spawek/valeo
        public RealCar(DefaultCarController parent)
        {
            System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.Highest;

            Controller = parent;
            CarInfo    = new CarInformations();

            IsAlertBrakeActive = false;

            deviceManager = DeviceManager.GlobalDeviceManager;

            CarComunicator = new RealCarCommunicator(this);

            SpeedRegulator = new PIDSpeedRegulator(this);
            SteeringWheelAngleRegulator = new PIDSteeringWheelAngleRegulator(this);
            BrakeRegulator = new SimpleBrakeRegulator(this);

            CarComunicator.InitRegulatorsEventsHandling();  //TODO: REFACTOR THIS SHIT!!! //for now this is needed, because reagulators does not exists when communicator constructor is invoked

            InternalEventHandlingInitialization();
        }
コード例 #2
0
ファイル: RealCar.cs プロジェクト: Spawek/valeo
        public RealCar(DefaultCarController parent)
        {
            System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.Highest;

            Controller = parent;
            CarInfo = new CarInformations();

            IsAlertBrakeActive = false;

            deviceManager = DeviceManager.GlobalDeviceManager;

            CarComunicator = new RealCarCommunicator(this);

            SpeedRegulator = new PIDSpeedRegulator(this);
            SteeringWheelAngleRegulator = new PIDSteeringWheelAngleRegulator(this);
            BrakeRegulator = new SimpleBrakeRegulator(this);

            CarComunicator.InitRegulatorsEventsHandling();  //TODO: REFACTOR THIS SHIT!!! //for now this is needed, because reagulators does not exists when communicator constructor is invoked

            InternalEventHandlingInitialization();
        }