Remove useless comments
[apps/native/position-finder-server.git] / src / controller.c
index a9ce579..9856085 100644 (file)
@@ -35,21 +35,22 @@ typedef struct app_data_s {
        connectivity_resource_s *resource_info;
 } app_data;
 
-static void _ultrasonic_sensor_read_cb(float value, void *data)
+static void _ultrasonic_sensor_read_cb(double value, void *data)
 {
        app_data *ad = data;
 
-       /**
-        * TODO: Send the value of the ultrasonic sensor to the Client.
-        */
-
-       /*
+#if 0
        if (value < 0) {
                _E("OUT OF RANGE");
        } else {
                _D("Measured Distance : %0.2fcm", value);
+
+               if (connectivity_notify_double(ad->resource_info, "distance", value) == -1)
+                       _E("Cannot notify message");
        }
-       */
+#endif
+
+       return;
 }
 
 static Eina_Bool _control_sensors_cb(void *data)
@@ -57,26 +58,12 @@ static Eina_Bool _control_sensors_cb(void *data)
        app_data *ad = data;
        int ret = 0;
 
-       /**
-        * TODO: Prepare to read the value of the ultrasonic sensor.
-        */
-
-    /*
-       ret = resource_read_ultrasonic_sensor(TRIG_PIN_NUMBER, ECHO_PIN_NUMBER, _ultrasonic_sensor_read_cb, NULL);
-       */
-
+#if 0
+       ret = resource_read_ultrasonic_sensor(TRIG_PIN_NUMBER, ECHO_PIN_NUMBER, _ultrasonic_sensor_read_cb, ad);
        if (ret < 0) {
                _E("Failed to read from ultrasonic sensor");
        }
-
-       /*
-        * Notifies specific clients that resource's attributes have changed.
-        */
-       /*
-       if (connectivity_notify_double(ad->resource_info, "distance", value) == -1)
-               _E("Cannot notify message");
-       */
-
+#endif
 
        return ECORE_CALLBACK_RENEW;
 }