示例#1
0
        /// <summary>
        /// This method will return the luminance of the surrounding environment in view of the sensor.
        /// The return value will be in candela/m^2 (aka nit).
        /// </summary>
        /// <returns></returns>
        public override double GetLumens()
        {
            HTCLightSensorData data = GetRawSensorData();

            // Not really sure a good way to calibrate this.
            // Did it by holding it up to my 700 lumen lightbulb, and it returns ~208.
            return((double)data.Luminance * ((double)755 / (double)208));
        }
示例#2
0
 extern static IntPtr HTCSensorGetDataOutput(IntPtr handle, out HTCLightSensorData sensorData);
示例#3
0
 static extern IntPtr HTCSensorGetDataOutput(IntPtr handle, out HTCLightSensorData sensorData);