sensors: UASProximityDistance is missing an "unknown" enum value

Bug #1256969 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
platform-api
New
Undecided
Unassigned

Bug Description

include/ubuntu/application/sensors/event/proximity.h defines

    typedef enum {
        U_PROXIMITY_NEAR = 1, /**< The reading indicates that something is near the sensor/device. */
        U_PROXIMITY_FAR = 2 /**< The reading indicates that something is far away from the sensor/device. */
    } UbuntuApplicationSensorsProximityDistance;

This is missing a "U_PROXIMITY_UNKNOWN = 0" value, for an initial sensor value or other conditions where the value cannot be determined. I guess you even reserved 0 for something like that, but it should get an explicit enum value to avoid ugly type casts in API users.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.