none
Windows 8/8.1 Sensor : Retrieving Float values passed in a field of a Custom Sensor using API RRS feed

  • Question

  • I am trying to retrieve the value of a custom sensor field  like this : 

                 

    Windows7.Sensors.Sensor customSensor

    //code for getting the customSensor   

    Windows7.Sensors.SensorDataReport report = customSensor.GetDataReport();

    if (customSensor!= null)
    {
    object custom1 = report .GetDataField(Windows7.Sensors.SensorPropertyKeys.SENSOR_DATA_TYPE_CUSTOM_VALUE1);

    }

    The value being passed is float  X.YZCD (e.g 0.2351 or -0.0023 or -1.023 )

    I do not get anything in custom1 .

    Is is possible to attain float value in custom sensor field like above  or some hack is needed somewhere?

    Please note that I am not getting any exception at any point.

    rgds,Rp




    • Edited by hcktester Tuesday, November 11, 2014 3:38 PM
    Tuesday, November 11, 2014 3:36 PM