コード例 #1
0
        public RealCar(CarController parent)
        {
            Controller = parent;
            CarInfo = new CarInformations();

            IsAlertBrakeActive = false;

            //regulators and communicator initiation
            CarComunicator = new RealCarCommunicator(this); // = new RealCarCommunicator(this);

            SpeedRegulator = new PIDSpeedRegulator(this);
            //SpeedRegulator = new FakeSpeedRegulator();

            //SteeringWheelAngleRegulator = new SimpleSteeringWheelRegulator(this);
            SteeringWheelAngleRegulator = new PIDSteeringWheelAngleRegulator(this);
            //SteeringWheelAngleRegulator = new FakeSteeringWheelRegulator();

            BrakeRegulator = new PIDBrakeRegulator(this);

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

            //internal event handling initialization
            evAlertBrake += new EventHandler(ExampleFakeCar_evAlertBrake);
            evTargetSpeedChanged += new TargetSpeedChangedEventHandler(ExampleFakeCar_evTargetSpeedChanged);
            evTargetSteeringWheelAngleChanged += new TargetSteeringWheelAngleChangedEventHandler(ExampleFakeCar_evTargetSteeringWheelAngleChanged);
        }
コード例 #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();
        }
コード例 #3
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();
        }
コード例 #4
0
ファイル: SafeRS232Controller.cs プロジェクト: Spawek/valeo
 public SafeRS232Controller(RealCarCommunicator comm, SafeRS232Communicator safeRS232Communicator) //TODO: IT SHOULD NOT RELY ON RealCarCommunicator but on ICarCommunicator //its untestable now
 {
     communicator = comm;
     RS232        = safeRS232Communicator;
 }
コード例 #5
0
ファイル: SafeRS232Controller.cs プロジェクト: Spawek/valeo
 //TODO: IT SHOULD NOT RELY ON RealCarCommunicator but on ICarCommunicator //its untestable now
 public SafeRS232Controller(RealCarCommunicator comm, SafeRS232Communicator safeRS232Communicator)
 {
     communicator = comm;
     RS232 = safeRS232Communicator;
 }
コード例 #6
0
ファイル: SafeRS232Controller.cs プロジェクト: rAum/auton_net
 public SafeRS232Controller(RealCarCommunicator comm, SafeRS232Communicator safeRS232Communicator) //TODO: IT SHOULD NOT RELY ON RealCarCommunicator but on ICarCommunicator //its untestable now
 {
     communicator = comm;
     RS232 = safeRS232Communicator;
 }
コード例 #7
0
ファイル: RS232_old.cs プロジェクト: Spawek/valeo
 public RS232Controller(RealCarCommunicator comm)
 {
     communicator = comm;
 }
コード例 #8
0
ファイル: GearboxController.cs プロジェクト: Spawek/valeo
 public GearboxController(USB4702 _extentionCardCommunicator, RealCarCommunicator comunicator)
 {
     extentionCardCommunicator = _extentionCardCommunicator;
     realCarCommunicator       = comunicator;
 }