コード例 #1
0
ファイル: GpsPlugin.cs プロジェクト: brookpatten/MrGibbs
        /// <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
ファイル: GpsPlugin.cs プロジェクト: gandy92/MrGibbs
        /// <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;
        }