Example #1
0
        public PIDSpeedRegulator(ICar parent)
        {
            Car = parent;
            CarComunicator = parent.CarComunicator;

            regulator = new PIDRegulator(new Settings(), "speed PID regulator");

            Car.evAlertBrake += new EventHandler(Car_evAlertBrake);
            Car.evTargetSpeedChanged += new TargetSpeedChangedEventHandler(Car_evTargetSpeedChanged);
            evNewSpeedSettingCalculated += new NewSpeedSettingCalculatedEventHandler(PIDSpeedRegulator_evNewSpeedSettingCalculated);
            CarComunicator.evSpeedInfoReceived += new SpeedInfoReceivedEventHander(CarComunicator_evSpeedInfoReceived);
        }
Example #2
0
        public PIDSpeedRegulator(ICar parent)
        {
            Car            = parent;
            CarComunicator = parent.CarComunicator;

            regulator = new PIDRegulator(new Settings(), "speed PID regulator");

            Car.evAlertBrake                   += new EventHandler(Car_evAlertBrake);
            Car.evTargetSpeedChanged           += new TargetSpeedChangedEventHandler(Car_evTargetSpeedChanged);
            evNewSpeedSettingCalculated        += new NewSpeedSettingCalculatedEventHandler(PIDSpeedRegulator_evNewSpeedSettingCalculated);
            CarComunicator.evSpeedInfoReceived += new SpeedInfoReceivedEventHander(CarComunicator_evSpeedInfoReceived);
        }