EnableProximitySensor() private méthode

private EnableProximitySensor ( bool interrupts ) : void
interrupts bool
Résultat void
        /// <summary>
        /// Initialize the sensor
        /// </summary>
        /// <param name="mode">The mode of the sensor</param>
        private void InitializeSensor(Mode mode)
        {
            Sensor = new SparkFun_APDS9960(ref _i2CDevice);
            Sensor.Initialize();

            switch (mode)
            {
            case Mode.Gesture:
                Sensor.EnableGestureSensor(true);
                break;

            case Mode.Light:
                Sensor.EnableLightSensor(true);
                break;

            case Mode.Proximity:
                Sensor.EnableProximitySensor(true);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }
        /// <summary>
        /// Initialize the sensor
        /// </summary>
        /// <param name="mode">The mode of the sensor</param>
        private void InitializeSensor(Mode mode)
        {
            Sensor = new SparkFun_APDS9960(ref _i2CDevice);
            Sensor.Initialize();

            switch (mode)
            {
                case Mode.Gesture:
                    Sensor.EnableGestureSensor(true);
                    break;
                case Mode.Light:
                    Sensor.EnableLightSensor(true);
                    break;
                case Mode.Proximity:
                    Sensor.EnableProximitySensor(true);
                    break;
                default:
                    throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }