예제 #1
0
        /// <inheritdoc />
        public void Initialize(PluginConfiguration configuration, Action<Action<ISystemController, IRaceController>> queueCommand)
        {
            _components = new List<IPluginComponent>();
            _initialized = false;
			GpsSensor sensor;
			if (_simulated)
			{
				sensor = new SimulatedGpsSensor (_logger, this);
			}
			else
			{
				sensor = new GpsSensor(_logger, this, _gpsPort, _gpsBaud);
			}
			sensor.Start ();
            configuration.Sensors.Add(sensor);
            _components.Add(sensor);
            _initialized = true;
        }
예제 #2
0
        /// <inheritdoc />
        public void Initialize(PluginConfiguration configuration, Action <Action <ISystemController, IRaceController> > queueCommand)
        {
            _components  = new List <IPluginComponent>();
            _initialized = false;
            GpsSensor sensor;

            if (_simulated)
            {
                sensor = new SimulatedGpsSensor(_logger, this);
            }
            else
            {
                sensor = new GpsSensor(_logger, this, _gpsPort, _gpsBaud);
            }
            sensor.Start();
            configuration.Sensors.Add(sensor);
            _components.Add(sensor);
            _initialized = true;
        }