Fixing Proximity state definitions 05/39605/5
authorAnkur <ankur29.garg@samsung.com>
Tue, 19 May 2015 11:09:57 +0000 (16:39 +0530)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Wed, 27 May 2015 14:22:38 +0000 (07:22 -0700)
Change-Id: I650b15614b923ed592061bb4bc393e300308480c

src/proxi/proxi_sensor_hal.h

index ebb24b9..3b96b04 100755 (executable)
@@ -28,12 +28,19 @@ using std::string;
 class proxi_sensor_hal : public sensor_hal
 {
 public:
-       enum proxi_node_state_event_t { //changed as per IIO definitions
-               PROXIMITY_NODE_STATE_NEAR = 1,
-               PROXIMITY_NODE_STATE_FAR = 2,
-               PROXIMITY_NODE_STATE_UNKNOWN = 0,
+       enum proxi_node_state_event_t { //changed as per Input Event Method definitions
+               PROXIMITY_NODE_STATE_NEAR = 0,
+               PROXIMITY_NODE_STATE_FAR = 1,
+               PROXIMITY_NODE_STATE_UNKNOWN = -1,
        };
 
+// In case of IIO input method, use the following definitions as the values returned by sensor are different.
+//     enum proxi_node_state_event_t { //changed as per IIO Method definitions
+//             PROXIMITY_NODE_STATE_NEAR = 1,
+//             PROXIMITY_NODE_STATE_FAR = 2,
+//             PROXIMITY_NODE_STATE_UNKNOWN = 0,
+//     };
+
        proxi_sensor_hal();
        virtual ~proxi_sensor_hal();
        string get_model_id(void);