Example #1
0
        public RealCarCommunicator(ICar parent)
        {
            ICar = parent;

            servoDriver = new ServoDriver();
            deviceManager.RegisterDevice(servoDriver);

            //angleAndSpeedMeter = new SafeRS232Controller(this, new SafeRS232Communicator("COM4"));
            //deviceManager.RegisterDevice(angleAndSpeedMeter);

            angleAndSpeedMeter = new CarController_old.RS232Controller(this);
            deviceManager.RegisterDevice(angleAndSpeedMeter);

            extentionCardCommunicator = new USB4702();
            deviceManager.RegisterDevice(extentionCardCommunicator);

            speedometer = new Speedometer(extentionCardCommunicator);
            deviceManager.RegisterDevice(speedometer);

            gearboxController = new GearboxController(extentionCardCommunicator, this);
            deviceManager.RegisterDevice(gearboxController);



            speedometer.evSpeedInfoReceived += speedometer_evSpeedInfoReceived;
        }
Example #2
0
        public RealCarCommunicator(ICar parent)
        {
            ICar = parent;

            servoDriver = new ServoDriver();
            deviceManager.RegisterDevice(servoDriver);

            //angleAndSpeedMeter = new SafeRS232Controller(this, new SafeRS232Communicator("COM4"));
            //deviceManager.RegisterDevice(angleAndSpeedMeter);

            angleAndSpeedMeter = new CarController_old.RS232Controller(this);
            deviceManager.RegisterDevice(angleAndSpeedMeter);

            extentionCardCommunicator = new USB4702();
            deviceManager.RegisterDevice(extentionCardCommunicator);

            speedometer = new Speedometer(extentionCardCommunicator);
            deviceManager.RegisterDevice(speedometer);

            gearboxController = new GearboxController(extentionCardCommunicator, this);
            deviceManager.RegisterDevice(gearboxController);

            speedometer.evSpeedInfoReceived += speedometer_evSpeedInfoReceived;
        }