SET(RV "ON")
SET(ORIENTATION "ON")
SET(FACE_DOWN "ON")
+SET(SENSORHUB "ON")
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/shared
SET(SENSOR_HEADERS ${SENSOR_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/gesture)
SET(SENSOR_DEFINITIONS ${SENSOR_DEFINITIONS} "-DENABLE_FACE_DOWN")
ENDIF()
+IF("${SENSORHUB}" STREQUAL "ON")
+ FILE(GLOB_RECURSE SENSOR_SRCS ${SENSOR_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/sensorhub/*.cpp)
+ SET(SENSOR_HEADERS ${SENSOR_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/sensorhub)
+ SET(SENSOR_DEFINITIONS ${SENSOR_DEFINITIONS} "-DENABLE_SENSORHUB")
+ENDIF()
MESSAGE("${SENSOR_SRCS}")
SET(SENSOR_SRCS ${SENSOR_SRCS} PARENT_SCOPE)
--- /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.
+ *
+ */
+
+#include <sensor_common.h>
+#include <sensor_log.h>
+#include "pedometer_sensor.h"
+
+pedometer_sensor::pedometer_sensor()
+{
+ set_permission(SENSOR_PERMISSION_BIO);
+
+ _I("pedometer_sensor is created : %#x", this);
+}
+
+pedometer_sensor::~pedometer_sensor()
+{
+ _I("pedometer_sensor is destroyed : %#x", this);
+}
--- /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 _PEDOMETER_SENSOR_H_
+#define _PEDOMETER_SENSOR_H_
+
+#include <physical_sensor.h>
+
+class pedometer_sensor : public physical_sensor {
+public:
+ pedometer_sensor();
+ virtual ~pedometer_sensor();
+};
+
+#endif /* _PEDOMETER_SENSOR_H_ */
+
#ifdef ENABLE_FACE_DOWN
#include <face_down_sensor.h>
#endif
+#ifdef ENABLE_SENSORHUB
+#include <pedometer_sensor.h>
+#endif
using std::vector;
using std::string;
create_physical_sensors<hrm_sensor>(HRM_LED_GREEN_SENSOR);
create_physical_sensors<hrm_sensor>(HRM_LED_IR_SENSOR);
create_physical_sensors<hrm_sensor>(HRM_LED_RED_SENSOR);
+#ifdef ENABLE_SENSORHUB
+ create_physical_sensors<pedometer_sensor>(HUMAN_PEDOMETER_SENSOR);
+#endif
create_physical_sensors<physical_sensor>(UNKNOWN_SENSOR);