SET(VERSION ${FULLVER})
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(include ${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(include include/private ${CMAKE_CURRENT_SOURCE_DIR})
# Build options
FOREACH(flag ${${PROJECT_NAME}_CFLAGS})
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(tools)
-INSTALL(FILES include/sensor.h include/sensor-internal.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor)
+INSTALL(DIRECTORY include/ include/private/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor)
--- /dev/null
+#include <sensor.h>
+
+#ifndef _SENSOR_INFO_PRIVATE_H_
+#define _SENSOR_INFO_PRIVATE_H_
+
+#define SENSOR_NUM (sizeof(sensor_info_lists) / sizeof(sensor_info_lists[0]))
+
+struct sensor_info_list {
+ sensor_type_e type;
+ const char* name;
+ const char* alias;
+ int value_num;
+};
+
+static const struct sensor_info_list sensor_info_lists[] = {
+ {SENSOR_ALL, "All", "ALL", 0},
+ {SENSOR_ACCELEROMETER, "Accelerometer", "ACCEL", 3},
+ {SENSOR_GRAVITY, "Gravity sensor", "GRAVITY", 3},
+ {SENSOR_LINEAR_ACCELERATION, "Linear acceleration sensor", "LINEAR_ACCEL", 3},
+ {SENSOR_MAGNETIC, "Magnetic sensor", "MAGNET", 3},
+ {SENSOR_ROTATION_VECTOR, "Rotation vector sensor", "ROTATION", 4},
+ {SENSOR_ORIENTATION, "Orientation sensor", "ORIENTATION", 3},
+ {SENSOR_GYROSCOPE, "Gyroscope", "GYRO", 3},
+ {SENSOR_LIGHT, "Light sensor", "LIGHT", 1},
+ {SENSOR_PROXIMITY, "Proximity sensor", "PROXIMITY", 1},
+ {SENSOR_PRESSURE, "Pressure sensor", "PRESSURE", 1},
+ {SENSOR_ULTRAVIOLET, "Ultraviolet sensor", "UV", 1},
+ {SENSOR_TEMPERATURE, "Temperature sensor", "TEMP", 1},
+ {SENSOR_HUMIDITY, "Humidity sensor", "HUMIDITY", 1},
+ {SENSOR_HRM, "Heart-rate monitor", "HRM", 1},
+ {SENSOR_HRM_LED_GREEN, "Green LED sensor of HRM", "GREEN_HRM", 1},
+ {SENSOR_HRM_LED_IR, "Infra-Red LED sensor of HRM", "IR_HRM", 1},
+ {SENSOR_HRM_LED_RED, "Red LED sensor of HRM", "RED_HRM", 1},
+ {SENSOR_GYROSCOPE_UNCALIBRATED, "Uncalibrated Gyroscope sensor", "UNCAL_GYRO", 6},
+ {SENSOR_GEOMAGNETIC_UNCALIBRATED, "Uncalibrated Geomagnetic sensor", "UNCAL_MAGNET", 6},
+ {SENSOR_GYROSCOPE_ROTATION_VECTOR, "Gyroscope-based rotation vector sensor", "GYRO_ROTATION", 4},
+ {SENSOR_GEOMAGNETIC_ROTATION_VECTOR, "Geomagnetic-based rotation vector sensor", "MAGNET_ROTATION", 4},
+ {SENSOR_GYROSCOPE_ORIENTATION, "Gyroscope-based orientation sensor", "GYRO_ORIENTATION", 3},
+ {SENSOR_GEOMAGNETIC_ORIENTATION, "Geomagnetic-based orientation sensor", "MAGNET_ORIENTATION", 3},
+ {SENSOR_SIGNIFICANT_MOTION, "Significant motion sensor", "MOTION", 1},
+ {SENSOR_HRM_BATCH, "Heart-rate monitor batch sensor", "HRM_BATCH", 1},
+ {SENSOR_HRM_LED_GREEN_BATCH, "Green LED of HRM batch sensor", "GREEN_HRM_BATCH", 1},
+ {SENSOR_HUMAN_PEDOMETER, "Pedometer", "PEDOMETER", 3},
+ {SENSOR_HUMAN_SLEEP_MONITOR, "Sleep monitor", "SLEEP_MONITOR", 1},
+ {SENSOR_HUMAN_SLEEP_DETECTOR, "Sleep detector", "SLEEP_DETECTOR", 1},
+};
+
+#endif /* _SENSOR_INFO_PRIVATE_H_ */
+
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _SENSOR_LOG_H_
+#define _SENSOR_LOG_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <dlog/dlog.h>
+#include <sys/types.h>
+
+#ifdef LOG_TAG
+ #undef LOG_TAG
+#endif
+#define LOG_TAG "TIZEN_SYSTEM_SENSOR"
+
+/* Logging and Error Handling */
+#define _I SLOGI
+#define _D SLOGD
+#define _W SLOGW
+#define _E SLOGE
+#define _SI SECURE_SLOGI
+#define _SD SECURE_SLOGD
+#define _SW SECURE_SLOGW
+#define _SE SECURE_SLOGE
+
+#define _ERRNO(errno, tag, fmt, arg...) \
+ do { \
+ char buf[1024]; \
+ char *error = strerror_r(errno, buf, 1024); \
+ if (!error) { \
+ _E("Failed to strerror_r()"); \
+ break; \
+ } \
+ tag(fmt" (%s[%d])", ##arg, error, errno); \
+ } while (0)
+
+#define warn_if(expr, fmt, arg...) \
+ do { if (expr) { _E(fmt, ##arg); } } while (0)
+
+#define ret_if(expr) \
+ do { if (expr) { return; } } while (0)
+
+#define retv_if(expr, val) \
+ do { if (expr) { return (val); } } while (0)
+
+#define retm_if(expr, fmt, arg...) \
+ do { if (expr) { _E(fmt, ##arg); return; } } while (0)
+
+#define retvm_if(expr, val, fmt, arg...) \
+ do { if (expr) { _E(fmt, ##arg); return (val); } } while (0)
+
+#define LOG_DUMP(fp, fmt, arg...) \
+ do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0)
+
+#define log_oom() ({ \
+ _E("Out of memory"); \
+ -ENOMEM;})
+
+
+#define _MSG_SENSOR_ERROR_IO_ERROR "Io Error"
+#define _MSG_SENSOR_ERROR_INVALID_PARAMETER "Invalid Parameter"
+#define _MSG_SENSOR_ERROR_OUT_OF_MEMORY "Out of Memory"
+#define _MSG_SENSOR_ERROR_NOT_NEED_CALIBRATION "Not need calibration"
+#define _MSG_SENSOR_ERROR_NOT_SUPPORTED "Not supported"
+#define _MSG_SENSOR_ERROR_OPERATION_FAILED "Operation failed"
+
+#define _E_MSG(err) SLOGE(_MSG_##err "(0x%08x)", (err))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SENSOR_LOG_H_ */
--- /dev/null
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SENSOR_PRIVATE_H__
+#define __SENSOR_PRIVATE_H__
+
+struct sensor_listener_s {
+ int id;
+ int type;
+ int pause;
+ unsigned int batch_latency;
+ unsigned int magic;
+ void *sensor;
+ void *callback;
+ void *user_data;
+ void *accu_callback;
+ void *accu_user_data;
+};
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+float clamp(float v);
+int getAngleChange(float *R, float *prevR, float *angleChange);
+int quatToMatrix(float *quat, float *R);
+int matrixToQuat(float *mat, float *q);
+int getRotationMatrix(float *accel, float *geo, float *R, float *I);
+int remapCoordinateSystem(float *inR, int X, int Y, float *outR);
+int getDeclination(float *decl);
+int getInclination(float *incl);
+int setCoordinate(float latitude, float longitude, float altitude, float *declination, float *inclination, int option);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __SENSOR_PRIVATE_H__
--- /dev/null
+/*
+ * sensord
+ *
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SENSOR_TYPES_H__
+#define __SENSOR_TYPES_H__
+
+/* TODO: It is for compatibility with capi-system-sensor */
+#define __SENSOR_COMMON_H__
+
+#include <stddef.h>
+#include <stdint.h>
+#include <hal/hal-sensor-types.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifndef OP_SUCCESS
+#define OP_SUCCESS 0
+#endif
+#ifndef OP_ERROR
+#define OP_ERROR -1
+#endif
+#ifndef OP_DEFAULT
+#define OP_DEFAULT 1
+#endif
+#ifndef OP_CONTINUE
+#define OP_CONTINUE 2
+#endif
+#ifndef NAME_MAX
+#define NAME_MAX 256
+#endif
+
+#define SENSOR_TYPE_SHIFT 32
+#define SENSOR_EVENT_SHIFT 16
+#define SENSOR_INDEX_MASK 0xFFFFFFFF
+
+#define CONVERT_ID_TYPE(id) ((id) >> SENSOR_TYPE_SHIFT)
+#define CONVERT_TYPE_EVENT(type) ((type) << SENSOR_EVENT_SHIFT | 0x1)
+
+#define MICROSECONDS(tv) ((tv.tv_sec * 1000000ll) + tv.tv_usec)
+
+#define SENSOR_UNKNOWN_TYPE "http://tizen.org/sensor/unknown"
+#define SENSOR_UNKNOWN_NAME "Unknown"
+
+typedef int64_t sensor_id_t;
+typedef void *sensor_t;
+
+typedef enum sensor_type_t {
+ UNKNOWN_SENSOR = -2,
+ ALL_SENSOR = -1,
+ ACCELEROMETER_SENSOR = 0,
+ GRAVITY_SENSOR,
+ LINEAR_ACCEL_SENSOR,
+ GEOMAGNETIC_SENSOR,
+ ROTATION_VECTOR_SENSOR,
+ ORIENTATION_SENSOR,
+ GYROSCOPE_SENSOR,
+ LIGHT_SENSOR,
+ PROXIMITY_SENSOR,
+ PRESSURE_SENSOR,
+ ULTRAVIOLET_SENSOR,
+ TEMPERATURE_SENSOR,
+ HUMIDITY_SENSOR,
+ HRM_SENSOR,
+ BIO_HRM_SENSOR = HRM_SENSOR,
+ HRM_LED_GREEN_SENSOR,
+ BIO_LED_GREEN_SENSOR = HRM_LED_GREEN_SENSOR,
+ HRM_LED_IR_SENSOR,
+ BIO_LED_IR_SENSOR = HRM_LED_IR_SENSOR,
+ HRM_LED_RED_SENSOR,
+ BIO_LED_RED_SENSOR = HRM_LED_RED_SENSOR,
+ GYROSCOPE_UNCAL_SENSOR,
+ GEOMAGNETIC_UNCAL_SENSOR,
+ GYROSCOPE_RV_SENSOR,
+ GEOMAGNETIC_RV_SENSOR,
+
+ GYROSCOPE_ORIENTATION_SENSOR = 100,
+ GEOMAGNETIC_ORIENTATION_SENSOR = 105,
+
+ SIGNIFICANT_MOTION_SENSOR = 0x100, //256
+
+ HRM_BATCH_SENSOR = 0x200, //512
+ HRM_LED_GREEN_BATCH_SENSOR,
+
+ HUMAN_PEDOMETER_SENSOR = 0x300, //768
+ HUMAN_SLEEP_MONITOR_SENSOR,
+ HUMAN_SLEEP_DETECTOR_SENSOR,
+ SLEEP_DETECTOR_SENSOR = HUMAN_SLEEP_DETECTOR_SENSOR,
+ HUMAN_STRESS_MONITOR_SENSOR,
+ STRESS_MONITOR_SENSOR = HUMAN_STRESS_MONITOR_SENSOR,
+
+ LIDAR_SENSOR = 1000,
+
+ EXERCISE_WALKING_SENSOR = 0x400, //1024
+ EXERCISE_RUNNING_SENSOR,
+ EXERCISE_HIKING_SENSOR,
+ EXERCISE_CYCLING_SENSOR,
+ EXERCISE_ELLIPTICAL_SENSOR,
+ EXERCISE_INDOOR_CYCLING_SENSOR,
+ EXERCISE_ROWING_SENSOR,
+ EXERCISE_STEPPER_SENSOR,
+
+ DATA_JOURNAL_SENSOR = 0x500,
+ // 0x500~0x600 Reserved (1280 ~ 1536)
+
+ EXTERNAL_EXERCISE_SENSOR = 0x800, //2048
+ EXERCISE_SENSOR = EXTERNAL_EXERCISE_SENSOR,
+
+ FUSION_SENSOR = 0x900, //2304
+ AUTO_ROTATION_SENSOR,
+ AUTO_BRIGHTNESS_SENSOR,
+ MYOTEST_SENSOR,
+
+ GESTURE_MOVEMENT_SENSOR = 0x1200, //4608
+ GESTURE_WRIST_UP_SENSOR,
+ GESTURE_WRIST_DOWN_SENSOR,
+ GESTURE_MOVEMENT_STATE_SENSOR,
+ GESTURE_PICK_UP_SENSOR,
+ GESTURE_FACE_DOWN_SENSOR,
+
+ ACTIVITY_TRACKER_SENSOR = 0x1A00, //6656
+ ACTIVITY_LEVEL_MONITOR_SENSOR,
+ GPS_BATCH_SENSOR,
+ PPG_BATCH_SENSOR,
+ GPS_TIMESYNC_SENSOR,
+
+ HRM_CTRL_SENSOR = 0x1A80, //6784
+ REG_CTRL_SENSOR,
+ GPS_CTRL_SENSOR,
+
+ WEAR_STATUS_SENSOR = 0x2000, //8192
+ WEAR_ON_MONITOR_SENSOR,
+ NO_MOVE_DETECTOR_SENSOR,
+ RESTING_HR_SENSOR,
+ STEP_LEVEL_MONITOR_SENSOR,
+ EXERCISE_STANDALONE_SENSOR,
+ EXERCISE_COACH_SENSOR = EXERCISE_STANDALONE_SENSOR,
+ EXERCISE_HR_SENSOR,
+ WORKOUT_SENSOR,
+ AUTOSESSION_EXERCISE_SENSOR = WORKOUT_SENSOR,
+ CYCLE_MONITOR_SENSOR,
+ STAIR_TRACKER_SENSOR,
+ PRESSURE_INDICATOR_SENSOR,
+ PRESSURE_ALERT_SENSOR,
+ HR_CALORIE_SENSOR,
+ SWIMMING_TRACKER_SENSOR,
+ STRESS_TRACKER_SENSOR,
+ FAKE_MOTION_SENSOR,
+ GEOFENCE_SENSOR,
+ SWIMMING_OUTDOOR_SENSOR,
+ AUTO_SWIMMING_SENSOR,
+ INACTIVITY_DETECTOR_SENSOR,
+ HRM_BP_SENSOR,
+ ECG_SENSOR,
+ FALL_DETECTION_SENSOR,
+
+ CONTEXT_SENSOR = 0x7000, //28,672
+ MOTION_SENSOR,
+ PIR_SENSOR,
+ PIR_LONG_SENSOR,
+ DUST_SENSOR,
+ THERMOMETER_SENSOR,
+ PEDOMETER_SENSOR,
+ FLAT_SENSOR,
+ HRM_RAW_SENSOR,
+ BIO_SENSOR = HRM_RAW_SENSOR,
+ TILT_SENSOR,
+ RV_RAW_SENSOR,
+ GSR_SENSOR,
+ SIMSENSE_SENSOR,
+ PPG_SENSOR,
+
+ CUSTOM_SENSOR = 0X9000, //36,864
+} sensor_type_t;
+
+typedef struct sensor_info2_t {
+ uint32_t id;
+ sensor_type_t type;
+ const char *uri;
+ const char *vendor;
+ float min_range;
+ float max_range;
+ float resolution;
+ int min_interval;
+ int max_interval;
+ int max_batch_count;
+ bool wakeup_supported;
+ const char *privilege;
+ void *reserved[8];
+} sensor_info2_t;
+
+typedef enum sensor_privilege_t {
+ SENSOR_PRIVILEGE_PUBLIC = 0,
+} sensor_privilege_t;
+
+typedef struct sensor_event_t {
+ unsigned int event_type;
+ sensor_id_t sensor_id;
+ unsigned int data_length;
+ sensor_data_t *data;
+} sensor_event_t;
+
+/*
+ * To prevent naming confliction as using same enums as sensor CAPI use
+ */
+#ifndef __SENSOR_H__
+enum sensor_option_t {
+ SENSOR_OPTION_DEFAULT = 0,
+ SENSOR_OPTION_ON_IN_SCREEN_OFF = 1,
+ SENSOR_OPTION_ON_IN_POWERSAVE_MODE = 2,
+ SENSOR_OPTION_ALWAYS_ON = SENSOR_OPTION_ON_IN_SCREEN_OFF | SENSOR_OPTION_ON_IN_POWERSAVE_MODE,
+ SENSOR_OPTION_END
+};
+
+typedef enum sensor_option_t sensor_option_e;
+#endif
+
+enum sensord_attribute_e {
+ SENSORD_ATTRIBUTE_AXIS_ORIENTATION = 1,
+ SENSORD_ATTRIBUTE_PAUSE_POLICY,
+ SENSORD_ATTRIBUTE_INTERVAL = 0x10,
+ SENSORD_ATTRIBUTE_MAX_BATCH_LATENCY,
+ SENSORD_ATTRIBUTE_PASSIVE_MODE,
+ SENSORD_ATTRIBUTE_FLUSH,
+ // 0x50~0x80 Reserved
+};
+
+enum sensord_axis_e {
+ SENSORD_AXIS_DEVICE_ORIENTED = 1,
+ SENSORD_AXIS_DISPLAY_ORIENTED,
+};
+
+enum sensord_pause_e {
+ SENSORD_PAUSE_NONE = 0,
+ SENSORD_PAUSE_ON_DISPLAY_OFF = 1,
+ SENSORD_PAUSE_ON_POWERSAVE_MODE = 2,
+ SENSORD_PAUSE_ALL = 3,
+ SENSORD_PAUSE_END,
+};
+
+enum poll_interval_t {
+ POLL_100HZ_MS = 10,
+ POLL_50HZ_MS = 20,
+ POLL_25HZ_MS = 40,
+ POLL_20HZ_MS = 50,
+ POLL_10HZ_MS = 100,
+ POLL_5HZ_MS = 200,
+ POLL_1HZ_MS = 1000,
+ POLL_MAX_HZ_MS = 255000,
+};
+
+#define DEFAULT_INTERVAL POLL_10HZ_MS
+
+enum sensor_interval_t {
+ SENSOR_INTERVAL_FASTEST = POLL_100HZ_MS,
+ SENSOR_INTERVAL_NORMAL = POLL_5HZ_MS,
+};
+
+enum proxi_change_state {
+ PROXIMITY_STATE_NEAR = 0,
+ PROXIMITY_STATE_FAR = 1,
+};
+
+enum auto_rotation_state {
+ AUTO_ROTATION_DEGREE_UNKNOWN = 0,
+ AUTO_ROTATION_DEGREE_0,
+ AUTO_ROTATION_DEGREE_90,
+ AUTO_ROTATION_DEGREE_180,
+ AUTO_ROTATION_DEGREE_270,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SENSOR_TYPES_H__ */
#include <limits.h>
/*header for common sensor type*/
-#include <sensor-types.h>
#include <sensor.h>
+#include <sensor-types-private.h>
#include <hal-sensor-types.h>
#define SENSOR_BATCH_LATENCY_DEFAULT UINT_MAX
+++ /dev/null
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _SENSOR_LOG_H_
-#define _SENSOR_LOG_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <dlog/dlog.h>
-#include <sys/types.h>
-
-#ifdef LOG_TAG
- #undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_SYSTEM_SENSOR"
-
-/* Logging and Error Handling */
-#define _I SLOGI
-#define _D SLOGD
-#define _W SLOGW
-#define _E SLOGE
-#define _SI SECURE_SLOGI
-#define _SD SECURE_SLOGD
-#define _SW SECURE_SLOGW
-#define _SE SECURE_SLOGE
-
-#define _ERRNO(errno, tag, fmt, arg...) \
- do { \
- char buf[1024]; \
- char *error = strerror_r(errno, buf, 1024); \
- if (!error) { \
- _E("Failed to strerror_r()"); \
- break; \
- } \
- tag(fmt" (%s[%d])", ##arg, error, errno); \
- } while (0)
-
-#define warn_if(expr, fmt, arg...) \
- do { if (expr) { _E(fmt, ##arg); } } while (0)
-
-#define ret_if(expr) \
- do { if (expr) { return; } } while (0)
-
-#define retv_if(expr, val) \
- do { if (expr) { return (val); } } while (0)
-
-#define retm_if(expr, fmt, arg...) \
- do { if (expr) { _E(fmt, ##arg); return; } } while (0)
-
-#define retvm_if(expr, val, fmt, arg...) \
- do { if (expr) { _E(fmt, ##arg); return (val); } } while (0)
-
-#define LOG_DUMP(fp, fmt, arg...) \
- do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0)
-
-#define log_oom() ({ \
- _E("Out of memory"); \
- -ENOMEM;})
-
-
-#define _MSG_SENSOR_ERROR_IO_ERROR "Io Error"
-#define _MSG_SENSOR_ERROR_INVALID_PARAMETER "Invalid Parameter"
-#define _MSG_SENSOR_ERROR_OUT_OF_MEMORY "Out of Memory"
-#define _MSG_SENSOR_ERROR_NOT_NEED_CALIBRATION "Not need calibration"
-#define _MSG_SENSOR_ERROR_NOT_SUPPORTED "Not supported"
-#define _MSG_SENSOR_ERROR_OPERATION_FAILED "Operation failed"
-
-#define _E_MSG(err) SLOGE(_MSG_##err "(0x%08x)", (err))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SENSOR_LOG_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __SENSOR_PRIVATE_H__
-#define __SENSOR_PRIVATE_H__
-
-struct sensor_listener_s {
- int id;
- int type;
- int pause;
- unsigned int batch_latency;
- unsigned int magic;
- void *sensor;
- void *callback;
- void *user_data;
- void *accu_callback;
- void *accu_user_data;
-};
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-float clamp(float v);
-int getAngleChange(float *R, float *prevR, float *angleChange);
-int quatToMatrix(float *quat, float *R);
-int matrixToQuat(float *mat, float *q);
-int getRotationMatrix(float *accel, float *geo, float *R, float *I);
-int remapCoordinateSystem(float *inR, int X, int Y, float *outR);
-int getDeclination(float *decl);
-int getInclination(float *incl);
-int setCoordinate(float latitude, float longitude, float altitude, float *declination, float *inclination, int option);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // __SENSOR_PRIVATE_H__
+++ /dev/null
-/*
- * sensord
- *
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __SENSOR_TYPES_H__
-#define __SENSOR_TYPES_H__
-
-/* TODO: It is for compatibility with capi-system-sensor */
-#define __SENSOR_COMMON_H__
-
-#include <stddef.h>
-#include <stdint.h>
-#include <hal/hal-sensor-types.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef OP_SUCCESS
-#define OP_SUCCESS 0
-#endif
-#ifndef OP_ERROR
-#define OP_ERROR -1
-#endif
-#ifndef OP_DEFAULT
-#define OP_DEFAULT 1
-#endif
-#ifndef OP_CONTINUE
-#define OP_CONTINUE 2
-#endif
-#ifndef NAME_MAX
-#define NAME_MAX 256
-#endif
-
-#define SENSOR_TYPE_SHIFT 32
-#define SENSOR_EVENT_SHIFT 16
-#define SENSOR_INDEX_MASK 0xFFFFFFFF
-
-#define CONVERT_ID_TYPE(id) ((id) >> SENSOR_TYPE_SHIFT)
-#define CONVERT_TYPE_EVENT(type) ((type) << SENSOR_EVENT_SHIFT | 0x1)
-
-#define MICROSECONDS(tv) ((tv.tv_sec * 1000000ll) + tv.tv_usec)
-
-#define SENSOR_UNKNOWN_TYPE "http://tizen.org/sensor/unknown"
-#define SENSOR_UNKNOWN_NAME "Unknown"
-
-typedef int64_t sensor_id_t;
-typedef void *sensor_t;
-
-typedef enum sensor_type_t {
- UNKNOWN_SENSOR = -2,
- ALL_SENSOR = -1,
- ACCELEROMETER_SENSOR = 0,
- GRAVITY_SENSOR,
- LINEAR_ACCEL_SENSOR,
- GEOMAGNETIC_SENSOR,
- ROTATION_VECTOR_SENSOR,
- ORIENTATION_SENSOR,
- GYROSCOPE_SENSOR,
- LIGHT_SENSOR,
- PROXIMITY_SENSOR,
- PRESSURE_SENSOR,
- ULTRAVIOLET_SENSOR,
- TEMPERATURE_SENSOR,
- HUMIDITY_SENSOR,
- HRM_SENSOR,
- BIO_HRM_SENSOR = HRM_SENSOR,
- HRM_LED_GREEN_SENSOR,
- BIO_LED_GREEN_SENSOR = HRM_LED_GREEN_SENSOR,
- HRM_LED_IR_SENSOR,
- BIO_LED_IR_SENSOR = HRM_LED_IR_SENSOR,
- HRM_LED_RED_SENSOR,
- BIO_LED_RED_SENSOR = HRM_LED_RED_SENSOR,
- GYROSCOPE_UNCAL_SENSOR,
- GEOMAGNETIC_UNCAL_SENSOR,
- GYROSCOPE_RV_SENSOR,
- GEOMAGNETIC_RV_SENSOR,
-
- GYROSCOPE_ORIENTATION_SENSOR = 100,
- GEOMAGNETIC_ORIENTATION_SENSOR = 105,
-
- SIGNIFICANT_MOTION_SENSOR = 0x100, //256
-
- HRM_BATCH_SENSOR = 0x200, //512
- HRM_LED_GREEN_BATCH_SENSOR,
-
- HUMAN_PEDOMETER_SENSOR = 0x300, //768
- HUMAN_SLEEP_MONITOR_SENSOR,
- HUMAN_SLEEP_DETECTOR_SENSOR,
- SLEEP_DETECTOR_SENSOR = HUMAN_SLEEP_DETECTOR_SENSOR,
- HUMAN_STRESS_MONITOR_SENSOR,
- STRESS_MONITOR_SENSOR = HUMAN_STRESS_MONITOR_SENSOR,
-
- LIDAR_SENSOR = 1000,
-
- EXERCISE_WALKING_SENSOR = 0x400, //1024
- EXERCISE_RUNNING_SENSOR,
- EXERCISE_HIKING_SENSOR,
- EXERCISE_CYCLING_SENSOR,
- EXERCISE_ELLIPTICAL_SENSOR,
- EXERCISE_INDOOR_CYCLING_SENSOR,
- EXERCISE_ROWING_SENSOR,
- EXERCISE_STEPPER_SENSOR,
-
- DATA_JOURNAL_SENSOR = 0x500,
- // 0x500~0x600 Reserved (1280 ~ 1536)
-
- EXTERNAL_EXERCISE_SENSOR = 0x800, //2048
- EXERCISE_SENSOR = EXTERNAL_EXERCISE_SENSOR,
-
- FUSION_SENSOR = 0x900, //2304
- AUTO_ROTATION_SENSOR,
- AUTO_BRIGHTNESS_SENSOR,
- MYOTEST_SENSOR,
-
- GESTURE_MOVEMENT_SENSOR = 0x1200, //4608
- GESTURE_WRIST_UP_SENSOR,
- GESTURE_WRIST_DOWN_SENSOR,
- GESTURE_MOVEMENT_STATE_SENSOR,
- GESTURE_PICK_UP_SENSOR,
- GESTURE_FACE_DOWN_SENSOR,
-
- ACTIVITY_TRACKER_SENSOR = 0x1A00, //6656
- ACTIVITY_LEVEL_MONITOR_SENSOR,
- GPS_BATCH_SENSOR,
- PPG_BATCH_SENSOR,
- GPS_TIMESYNC_SENSOR,
-
- HRM_CTRL_SENSOR = 0x1A80, //6784
- REG_CTRL_SENSOR,
- GPS_CTRL_SENSOR,
-
- WEAR_STATUS_SENSOR = 0x2000, //8192
- WEAR_ON_MONITOR_SENSOR,
- NO_MOVE_DETECTOR_SENSOR,
- RESTING_HR_SENSOR,
- STEP_LEVEL_MONITOR_SENSOR,
- EXERCISE_STANDALONE_SENSOR,
- EXERCISE_COACH_SENSOR = EXERCISE_STANDALONE_SENSOR,
- EXERCISE_HR_SENSOR,
- WORKOUT_SENSOR,
- AUTOSESSION_EXERCISE_SENSOR = WORKOUT_SENSOR,
- CYCLE_MONITOR_SENSOR,
- STAIR_TRACKER_SENSOR,
- PRESSURE_INDICATOR_SENSOR,
- PRESSURE_ALERT_SENSOR,
- HR_CALORIE_SENSOR,
- SWIMMING_TRACKER_SENSOR,
- STRESS_TRACKER_SENSOR,
- FAKE_MOTION_SENSOR,
- GEOFENCE_SENSOR,
- SWIMMING_OUTDOOR_SENSOR,
- AUTO_SWIMMING_SENSOR,
- INACTIVITY_DETECTOR_SENSOR,
- HRM_BP_SENSOR,
- ECG_SENSOR,
- FALL_DETECTION_SENSOR,
-
- CONTEXT_SENSOR = 0x7000, //28,672
- MOTION_SENSOR,
- PIR_SENSOR,
- PIR_LONG_SENSOR,
- DUST_SENSOR,
- THERMOMETER_SENSOR,
- PEDOMETER_SENSOR,
- FLAT_SENSOR,
- HRM_RAW_SENSOR,
- BIO_SENSOR = HRM_RAW_SENSOR,
- TILT_SENSOR,
- RV_RAW_SENSOR,
- GSR_SENSOR,
- SIMSENSE_SENSOR,
- PPG_SENSOR,
-
- CUSTOM_SENSOR = 0X9000, //36,864
-} sensor_type_t;
-
-typedef struct sensor_info2_t {
- uint32_t id;
- sensor_type_t type;
- const char *uri;
- const char *vendor;
- float min_range;
- float max_range;
- float resolution;
- int min_interval;
- int max_interval;
- int max_batch_count;
- bool wakeup_supported;
- const char *privilege;
- void *reserved[8];
-} sensor_info2_t;
-
-typedef enum sensor_privilege_t {
- SENSOR_PRIVILEGE_PUBLIC = 0,
-} sensor_privilege_t;
-
-typedef struct sensor_event_t {
- unsigned int event_type;
- sensor_id_t sensor_id;
- unsigned int data_length;
- sensor_data_t *data;
-} sensor_event_t;
-
-/*
- * To prevent naming confliction as using same enums as sensor CAPI use
- */
-#ifndef __SENSOR_H__
-enum sensor_option_t {
- SENSOR_OPTION_DEFAULT = 0,
- SENSOR_OPTION_ON_IN_SCREEN_OFF = 1,
- SENSOR_OPTION_ON_IN_POWERSAVE_MODE = 2,
- SENSOR_OPTION_ALWAYS_ON = SENSOR_OPTION_ON_IN_SCREEN_OFF | SENSOR_OPTION_ON_IN_POWERSAVE_MODE,
- SENSOR_OPTION_END
-};
-
-typedef enum sensor_option_t sensor_option_e;
-#endif
-
-enum sensord_attribute_e {
- SENSORD_ATTRIBUTE_AXIS_ORIENTATION = 1,
- SENSORD_ATTRIBUTE_PAUSE_POLICY,
- SENSORD_ATTRIBUTE_INTERVAL = 0x10,
- SENSORD_ATTRIBUTE_MAX_BATCH_LATENCY,
- SENSORD_ATTRIBUTE_PASSIVE_MODE,
- SENSORD_ATTRIBUTE_FLUSH,
- // 0x50~0x80 Reserved
-};
-
-enum sensord_axis_e {
- SENSORD_AXIS_DEVICE_ORIENTED = 1,
- SENSORD_AXIS_DISPLAY_ORIENTED,
-};
-
-enum sensord_pause_e {
- SENSORD_PAUSE_NONE = 0,
- SENSORD_PAUSE_ON_DISPLAY_OFF = 1,
- SENSORD_PAUSE_ON_POWERSAVE_MODE = 2,
- SENSORD_PAUSE_ALL = 3,
- SENSORD_PAUSE_END,
-};
-
-enum poll_interval_t {
- POLL_100HZ_MS = 10,
- POLL_50HZ_MS = 20,
- POLL_25HZ_MS = 40,
- POLL_20HZ_MS = 50,
- POLL_10HZ_MS = 100,
- POLL_5HZ_MS = 200,
- POLL_1HZ_MS = 1000,
- POLL_MAX_HZ_MS = 255000,
-};
-
-#define DEFAULT_INTERVAL POLL_10HZ_MS
-
-enum sensor_interval_t {
- SENSOR_INTERVAL_FASTEST = POLL_100HZ_MS,
- SENSOR_INTERVAL_NORMAL = POLL_5HZ_MS,
-};
-
-enum proxi_change_state {
- PROXIMITY_STATE_NEAR = 0,
- PROXIMITY_STATE_FAR = 1,
-};
-
-enum auto_rotation_state {
- AUTO_ROTATION_DEGREE_UNKNOWN = 0,
- AUTO_ROTATION_DEGREE_0,
- AUTO_ROTATION_DEGREE_90,
- AUTO_ROTATION_DEGREE_180,
- AUTO_ROTATION_DEGREE_270,
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SENSOR_TYPES_H__ */
+++ /dev/null
-#define SENSOR_NUM (sizeof(sensor_info_lists) / sizeof(sensor_info_lists[0]))
-
-struct sensor_info_list {
- sensor_type_e type;
- const char* name;
- const char* alias;
- int value_num;
-};
-
-static const struct sensor_info_list sensor_info_lists[] = {
- {SENSOR_ALL, "All", "ALL", 0},
- {SENSOR_ACCELEROMETER, "Accelerometer", "ACCEL", 3},
- {SENSOR_GRAVITY, "Gravity sensor", "GRAVITY", 3},
- {SENSOR_LINEAR_ACCELERATION, "Linear acceleration sensor", "LINEAR_ACCEL", 3},
- {SENSOR_MAGNETIC, "Magnetic sensor", "MAGNET", 3},
- {SENSOR_ROTATION_VECTOR, "Rotation vector sensor", "ROTATION", 4},
- {SENSOR_ORIENTATION, "Orientation sensor", "ORIENTATION", 3},
- {SENSOR_GYROSCOPE, "Gyroscope", "GYRO", 3},
- {SENSOR_LIGHT, "Light sensor", "LIGHT", 1},
- {SENSOR_PROXIMITY, "Proximity sensor", "PROXIMITY", 1},
- {SENSOR_PRESSURE, "Pressure sensor", "PRESSURE", 1},
- {SENSOR_ULTRAVIOLET, "Ultraviolet sensor", "UV", 1},
- {SENSOR_TEMPERATURE, "Temperature sensor", "TEMP", 1},
- {SENSOR_HUMIDITY, "Humidity sensor", "HUMIDITY", 1},
- {SENSOR_HRM, "Heart-rate monitor", "HRM", 1},
- {SENSOR_HRM_LED_GREEN, "Green LED sensor of HRM", "GREEN_HRM", 1},
- {SENSOR_HRM_LED_IR, "Infra-Red LED sensor of HRM", "IR_HRM", 1},
- {SENSOR_HRM_LED_RED, "Red LED sensor of HRM", "RED_HRM", 1},
- {SENSOR_GYROSCOPE_UNCALIBRATED, "Uncalibrated Gyroscope sensor", "UNCAL_GYRO", 6},
- {SENSOR_GEOMAGNETIC_UNCALIBRATED, "Uncalibrated Geomagnetic sensor", "UNCAL_MAGNET", 6},
- {SENSOR_GYROSCOPE_ROTATION_VECTOR, "Gyroscope-based rotation vector sensor", "GYRO_ROTATION", 4},
- {SENSOR_GEOMAGNETIC_ROTATION_VECTOR, "Geomagnetic-based rotation vector sensor", "MAGNET_ROTATION", 4},
- {SENSOR_GYROSCOPE_ORIENTATION, "Gyroscope-based orientation sensor", "GYRO_ORIENTATION", 3},
- {SENSOR_GEOMAGNETIC_ORIENTATION, "Geomagnetic-based orientation sensor", "MAGNET_ORIENTATION", 3},
- {SENSOR_SIGNIFICANT_MOTION, "Significant motion sensor", "MOTION", 1},
- {SENSOR_HRM_BATCH, "Heart-rate monitor batch sensor", "HRM_BATCH", 1},
- {SENSOR_HRM_LED_GREEN_BATCH, "Green LED of HRM batch sensor", "GREEN_HRM_BATCH", 1},
- {SENSOR_HUMAN_PEDOMETER, "Pedometer", "PEDOMETER", 3},
- {SENSOR_HUMAN_SLEEP_MONITOR, "Sleep monitor", "SLEEP_MONITOR", 1},
- {SENSOR_HUMAN_SLEEP_DETECTOR, "Sleep detector", "SLEEP_DETECTOR", 1},
-};
%manifest packaging/capi-system-sensor.manifest
%{_libdir}/pkgconfig/*.pc
%{_includedir}/sensor/*.h
+%{_includedir}/sensor/private/*.h
%{_libdir}/libcapi-system-sensor.so
%files test
#include <sensor-internal.h>
#include <sensor.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
#include <sensor_types_private.h>
#include <sensor_utils.h>
#include <channel_handler.h>
#include <sensor_manager.h>
#include <sensor_listener.h>
#include <sensor_provider_internal.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include <cmutex.h>
#include <command_types.h>
#include "sensor_reader.h"
#include <sensor.h>
#include <sensor-internal.h>
#include <sensor-private.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#define RETURN_VAL_IF(expr, err) \
do { \
#include "sensor_listener.h"
#include <channel_handler.h>
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
#include <command_types.h>
#include <ipc_client.h>
#include <channel_handler.h>
#include <event_loop.h>
#include <sensor_info.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
#include <cmutex.h>
#include <map>
#include <atomic>
#include "sensor_manager.h"
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include <sensor_info.h>
#include <sensor_utils.h>
#include <command_types.h>
#include "sensor_manager_channel_handler.h"
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include <command_types.h>
#include "sensor_manager.h"
*/
#include <sensor.h>
-#include <sensor-private.h>
#include <sensor-internal.h>
+#include <sensor-private.h>
+#include <sensor-log-private.h>
#include <new>
#include <map>
-#include "include/sensor-log.h"
-
#define RETV_IF(expr, val) \
do { if (expr) { return (val); } } while (0)
#include "sensor_provider_channel_handler.h"
#include <command_types.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include "sensor_provider_internal.h"
using namespace sensor;
#include <message.h>
#include <channel.h>
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
#include <sensor_utils.h>
#include <ipc_client.h>
#include <command_types.h>
#include <event_loop.h>
#include <sensor-internal.h>
#include <sensor_info.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
#include <map>
#include <atomic>
#include "sensor_reader.h"
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
#include <chrono>
using namespace sensor;
#include <stdlib.h>
#include <sensor.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include <sensor_recorder_internal.h>
#include <map>
#include <string>
#include <stdlib.h>
#include <sensor.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
int sensor_recorder_is_supported(sensor_type_e type, bool *supported)
{
#include "accept_event_handler.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#include "ipc_server.h"
using namespace ipc;
#include <errno.h>
#include <sys/time.h>
#include <cbase_lock.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
using namespace sensor;
#include <memory>
#include <algorithm>
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#include "channel_event_handler.h"
#define SYSTEMD_SOCK_BUF_SIZE (128*1024)
#include "channel.h"
#include "channel_handler.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
using namespace ipc;
*/
#include <cmutex.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
using namespace sensor;
#ifndef __COMMAND_TYPES_H__
#define __COMMAND_TYPES_H__
-#include <sensor-types.h>
+#include <sensor-types-private.h>
#include "sensor_info.h"
#define SENSOR_CHANNEL_PATH "/run/.sensord.socket"
#include <queue>
#include "channel_event_handler.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#include "event_handler.h"
#include "channel.h"
#include "ipc_client.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#include "stream_socket.h"
#include "event_handler.h"
#include "channel_event_handler.h"
#include "ipc_server.h"
#include "channel.h"
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#include "event_loop.h"
#include "channel_event_handler.h"
#include "accept_event_handler.h"
#include "message.h"
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include <atomic>
using namespace ipc;
#include "sensor_info.h"
-#include <sensor-types.h>
+#include <sensor-types-private.h>
#include <sensor_types_private.h>
-#include <sensor-log.h>
+#include <sensor-log-private.h>
#include <cfloat>
#include <algorithm>
#include <string>
#include <string>
#include <vector>
#include <hal/hal-sensor-types.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
namespace sensor {
#include <stddef.h>
#include <map>
-#include <sensor-log.h>
-#include <sensor-types.h>
+#include <sensor-log-private.h>
+#include <sensor-types-private.h>
#include <sensor_types_private.h>
#ifndef PATH_MAX
#define __SENSOR_UTILS_H__
#include <time.h>
-#include <sensor-types.h>
+#include <sensor-types-private.h>
#include <string>
#include <vector>
#include <sys/types.h>
#include <sys/socket.h>
-#include "sensor-log.h"
+#include "sensor-log-private.h"
using namespace ipc;
#include <sys/ioctl.h>
#include <systemd/sd-daemon.h>
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#define SOCK_TIMEOUT 10
#include <sys/types.h>
#include <sys/socket.h>
-#include "sensor-log.h"
+#include "sensor-log-private.h"
#define SLEEP_10_MS usleep(10000)
#include "spec_test.h"
#include "stress_test.h"
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
static void usage(void)
{
#include <sensor.h>
#include "spec_test.h"
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
#define TEST_COUNT_ONE 100
#define TEST_COUNT_ALL 1000
#include <sensor.h>
#include "stress_test.h"
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
void sensor_events_callback(sensor_h sensor, sensor_event_s events[], int events_count, void *user_data)
{
}
printf("Test was terminated with error.\n");
-}
\ No newline at end of file
+}
#include <glib.h>
#include <sensor.h>
-#include "sensor_info_list.h"
+#include "sensor-info-private.h"
static GMainLoop *loop;
static bool turned_on[40];