Exemple #1
0
		public Hmc5883Sensor(ILogger logger, Hmc5883Plugin plugin,Hmc5883 hmc)
		{
			_logger = logger;
			_plugin = plugin;

			_hmc5883 = hmc;
            _hmc5883.Initialize();

		    if (!_hmc5883.TestConnection())
		    {
		        throw new ExternalException("Failed to connect to HMC5883L");
		    }
		}
Exemple #2
0
        public Hmc5883Sensor(ILogger logger, Hmc5883Plugin plugin, Hmc5883 hmc)
        {
            _logger = logger;
            _plugin = plugin;

            _hmc5883 = hmc;
            _hmc5883.Initialize();

            if (!_hmc5883.TestConnection())
            {
                throw new ExternalException("Failed to connect to HMC5883L");
            }
        }