summaryrefslogtreecommitdiff
path: root/src/controller.c
diff options
context:
space:
mode:
authorBoyeon <boyeon.son@samsung.com>2019-01-31 18:02:25 +0900
committerBoyeon <boyeon.son@samsung.com>2019-01-31 18:11:21 +0900
commit1eb948c259df6ce7bf2e5c60a1ef86867731c8b6 (patch)
treedc6752ea808da9f869a98fd8ecf8e1f8643fec7b /src/controller.c
parent45bc5a4f7661a7a876e8fbbca6a96fb8b3626df7 (diff)
downloadst-things-light-1eb948c259df6ce7bf2e5c60a1ef86867731c8b6.tar.gz
st-things-light-1eb948c259df6ce7bf2e5c60a1ef86867731c8b6.tar.bz2
st-things-light-1eb948c259df6ce7bf2e5c60a1ef86867731c8b6.zip
Fix comments
Change-Id: I414cf7f45fbaef0498b84343c17b59b69e915124
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/controller.c b/src/controller.c
index 8c3e48d..ecca89f 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -25,28 +25,29 @@
#include "resource/resource_infrared_motion_sensor.h"
#include "resource/resource_led.h"
-// Duration for a timer
+// Timer duration
#define TIMER_GATHER_INTERVAL (5.0f)
-// Motion sensor info
+// Motion sensor information
#define SENSOR_MOTION_GPIO_NUMBER (46)
-// LED info
+// LED sensor information
#define SENSOR_LED_GPIO_NUMBER (130)
#define SENSOR_LED_ON "on"
#define SENSOR_LED_OFF "off"
+// For using SmartThings SDK
#define USE_ST_SDK
#ifdef USE_ST_SDK
#include "smartthings.h"
#include "smartthings_resource.h"
#include "smartthings_payload.h"
-// Cert file name in 'res' directory
+// Certification file and private key file stored in the resource directory
#define CERT_FILE "certificate.pem"
-// Private key file name in 'res' directory
#define PRIV_FILE "privatekey.der"
+// URI and key information
#define SENSOR_MOTION_URI "/capability/motionSensor/main/0"
#define SENSOR_MOTION_KEY "value"
#define SENSOR_LED_URI "/capability/switch/main/0"
@@ -63,6 +64,7 @@ typedef struct app_data_s {
smartthings_status_e status;
#endif /* USE_ST_SDK */
} app_data;
+
static app_data *g_ad = NULL;
#ifdef USE_ST_SDK
@@ -430,7 +432,6 @@ static void _thing_status_cb(
ad->status = status;
}
-//static void _things_connection_status_cb(smartthings_error_e error,
static void _things_connection_status_cb(
smartthings_h handle, smartthings_connection_status_e status,
void *user_data)