platform/core/system/sensord.git
7 years agoMerge branch 'devel/tizen_3.0' into tizen 28/90028/1 accepted/tizen/3.0/ivi/20161011.062327 accepted/tizen/3.0/mobile/20161015.034142 accepted/tizen/3.0/tv/20161016.005732 accepted/tizen/3.0/wearable/20161015.084055 accepted/tizen/common/20160928.164057 accepted/tizen/ivi/20160929.081006 accepted/tizen/mobile/20160929.080924 accepted/tizen/tv/20160929.080956 accepted/tizen/wearable/20160929.080946 submit/tizen/20160928.053031 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000006 submit/tizen_3.0_mobile/20161015.000006 submit/tizen_3.0_tv/20161015.000005 submit/tizen_3.0_wearable/20161015.000005
kibak.yoon [Wed, 28 Sep 2016 05:30:27 +0000 (14:30 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0: (24 commits)
  sensord: version 2.0.8
  sensord: enable rv/gesture sensors in CMakeLists
  [face_down_sensor] increasing the window size to increase detection rate
  sensord: return false if the size of id is 0
  sensord: fix socket issue when client cannot receive the event
  sensord: change an input value name of set_attribute function
  sensord: call external sensor service run
  sensord: fix the problem that attribute is not restored properly
  sensord: delete batch latency/attribute when client is terminated unexpectedly
  sensord: license: remove unnecessary scripts(license conflict)
  sensord: change the default axis policy from DEVICE_ORIENTED to DISPLAY_ORIENTED
  Change the order of the member variables of rv_sensor to fix a build warning
  Version 2.0.7
  Fix the external sensor worker to handle NULL payload properly
  Remove unnecessary header inclusion from face_down_alg_impl
  Face Down Gesture Sensor
  Gyroscope RV Sensor
  Magnetic RV Sensor
  Rotation Vector Sensor
  Moved Fusion Backed from sensor_fusion folder to rotation_vector folder
  ...

Change-Id: I29e0ce5f16f24a52aa599edf40d675bbf85829b8
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: version 2.0.8 24/90024/1
kibak.yoon [Wed, 28 Sep 2016 05:28:47 +0000 (14:28 +0900)]
sensord: version 2.0.8

Change-Id: I4f09f8202b551b1c0ed367998ffad47ff5bb08b2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agoMerge "sensord: enable rv/gesture sensors in CMakeLists" into devel/tizen_3.0
Mu-Woong Lee [Wed, 28 Sep 2016 05:26:17 +0000 (22:26 -0700)]
Merge "sensord: enable rv/gesture sensors in CMakeLists" into devel/tizen_3.0

7 years agoMerge "sensord: return false if the size of id is 0" into devel/tizen_3.0
Mu-Woong Lee [Wed, 28 Sep 2016 05:25:48 +0000 (22:25 -0700)]
Merge "sensord: return false if the size of id is 0" into devel/tizen_3.0

7 years agoMerge "sensord: fix socket issue when client cannot receive the event" into devel...
Mu-Woong Lee [Wed, 28 Sep 2016 05:25:26 +0000 (22:25 -0700)]
Merge "sensord: fix socket issue when client cannot receive the event" into devel/tizen_3.0

7 years agoMerge "sensord: change an input value name of set_attribute function" into devel...
Mu-Woong Lee [Wed, 28 Sep 2016 05:24:58 +0000 (22:24 -0700)]
Merge "sensord: change an input value name of set_attribute function" into devel/tizen_3.0

7 years agoMerge "sensord: call external sensor service run" into devel/tizen_3.0
Mu-Woong Lee [Wed, 28 Sep 2016 05:24:23 +0000 (22:24 -0700)]
Merge "sensord: call external sensor service run" into devel/tizen_3.0

7 years agoMerge "sensord: fix the problem that attribute is not restored properly" into devel...
Mu-Woong Lee [Wed, 28 Sep 2016 05:23:14 +0000 (22:23 -0700)]
Merge "sensord: fix the problem that attribute is not restored properly" into devel/tizen_3.0

7 years agoMerge "sensord: delete batch latency/attribute when client is terminated unexpectedly...
Mu-Woong Lee [Wed, 28 Sep 2016 05:22:31 +0000 (22:22 -0700)]
Merge "sensord: delete batch latency/attribute when client is terminated unexpectedly" into devel/tizen_3.0

7 years agoMerge "sensord: license: remove unnecessary scripts(license conflict)" into devel...
Mu-Woong Lee [Wed, 28 Sep 2016 05:22:13 +0000 (22:22 -0700)]
Merge "sensord: license: remove unnecessary scripts(license conflict)" into devel/tizen_3.0

7 years agoMerge "sensord: change the default axis policy from DEVICE_ORIENTED to DISPLAY_ORIENT...
Mu-Woong Lee [Wed, 28 Sep 2016 05:20:16 +0000 (22:20 -0700)]
Merge "sensord: change the default axis policy from DEVICE_ORIENTED to DISPLAY_ORIENTED" into devel/tizen_3.0

7 years agosensord: enable rv/gesture sensors in CMakeLists 13/90013/1
kibak.yoon [Wed, 28 Sep 2016 04:54:50 +0000 (13:54 +0900)]
sensord: enable rv/gesture sensors in CMakeLists

* remove the unused macro for motion sensor

Change-Id: I198014b1355cc395891c403fe1f2c385b40cada1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years ago[face_down_sensor] increasing the window size to increase detection rate 87/89987/1
akhilkedia94 [Wed, 28 Sep 2016 03:45:34 +0000 (12:45 +0900)]
[face_down_sensor] increasing the window size to increase detection rate

Change-Id: I7095440151ff4117442f0d0f2d8e22717a2b3a97
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agosensord: return false if the size of id is 0 92/89192/2
kibak.yoon [Mon, 18 Jul 2016 11:19:11 +0000 (20:19 +0900)]
sensord: return false if the size of id is 0

- If the size of ids is zero, it doesn't need to process the next works.
- It doesn't make a problem although it is not fixed.
  but it would be better to reduce the unnecessary work.

Change-Id: I2187d738ee90bae47cb4276b39b5651afa771b97
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix socket issue when client cannot receive the event 89/89189/2
kibak.yoon [Tue, 20 Sep 2016 15:41:28 +0000 (00:41 +0900)]
sensord: fix socket issue when client cannot receive the event

if client is blocked because of some reason, e.g., works heavy in mainloop,
sensor daemon is also blocked about sending sensor event.

Change-Id: I35ec9f43065594f55e413244470c74fc1c3f2ff1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change an input value name of set_attribute function 88/89188/1
hs81.go [Thu, 1 Sep 2016 06:20:22 +0000 (15:20 +0900)]
sensord: change an input value name of set_attribute function

because a name is not clear which is 'value_len' in set_attribute function
so 'value_len' is changed to 'len'.

Change-Id: I19caa23268e451653139c2b5f5c73af22edffe95
Signed-off-by: hs81.go <hs81.go@samsung.com>
7 years agosensord: call external sensor service run 87/89187/1
minsoo kim [Mon, 1 Aug 2016 09:38:51 +0000 (18:38 +0900)]
sensord: call external sensor service run

during code refactoring, external sensor
service running call is removed. after that external sensor
client can't recieve command.

Change-Id: I25f10790458782518ad732aa4b47af699f59f1f9
Signed-off-by: minsoo kim <ms203.kim@samsung.com>
7 years agosensord: fix the problem that attribute is not restored properly 86/89186/1
kibak.yoon [Wed, 31 Aug 2016 02:45:10 +0000 (11:45 +0900)]
sensord: fix the problem that attribute is not restored properly

if command including "0", e.g., command is "-63, 23, 50, 0, 0, 0, 0", is
sent to sensord, just "-63, 23, 50" command is stored to cache.
because std::string recognize 4th character as NULL termination.
so value and value_len should be stored to cache.

Change-Id: Ib04afa1f9824a679b546ce9c284b91d389172a82
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: delete batch latency/attribute when client is terminated unexpectedly 85/89185/1
kibak.yoon [Mon, 8 Aug 2016 10:18:58 +0000 (19:18 +0900)]
sensord: delete batch latency/attribute when client is terminated unexpectedly

- if client stops sensor explicitly, batch latency and attributes are deleted
from client information. but client is terminated unexpectedly, they are
not deleted.

Change-Id: I61475ba5979d83e17d725e3621c479640c55d86e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: license: remove unnecessary scripts(license conflict) 84/89184/1
kibak.yoon [Mon, 25 Jul 2016 11:10:47 +0000 (20:10 +0900)]
sensord: license: remove unnecessary scripts(license conflict)

Change-Id: Ifd272badf02b30f0fd06835f5eadc965b36162f5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change the default axis policy from DEVICE_ORIENTED to DISPLAY_ORIENTED 83/89183/1
kibak.yoon [Mon, 25 Jul 2016 05:30:57 +0000 (14:30 +0900)]
sensord: change the default axis policy from DEVICE_ORIENTED to DISPLAY_ORIENTED

Change-Id: I72268fd085d82943182a0287c62c7d59905c51f3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agoChange the order of the member variables of rv_sensor to fix a build warning 40/87340/1
Mu-Woong Lee [Wed, 7 Sep 2016 11:07:21 +0000 (20:07 +0900)]
Change the order of the member variables of rv_sensor to fix a build warning

Change-Id: Ifa28a42d379118d039446c5f3dab61f678885879
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
7 years agoVersion 2.0.7 49/87249/1
Mu-Woong Lee [Wed, 7 Sep 2016 06:55:11 +0000 (15:55 +0900)]
Version 2.0.7

Change-Id: Id06dd0f98fb13a37c405c07d88237af1c62ae557
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
7 years agoFix the external sensor worker to handle NULL payload properly 10/87010/2
Mu-Woong Lee [Tue, 6 Sep 2016 03:47:39 +0000 (12:47 +0900)]
Fix the external sensor worker to handle NULL payload properly

Change-Id: If425d87b5cae885ee972fdb16edd9b30c9987182
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
7 years agoRemove unnecessary header inclusion from face_down_alg_impl 11/87011/1
Mu-Woong Lee [Tue, 6 Sep 2016 03:59:04 +0000 (12:59 +0900)]
Remove unnecessary header inclusion from face_down_alg_impl

Change-Id: I3d5ec7e8673498d16e06c830e70964829b8b9d8f
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
7 years agoFace Down Gesture Sensor 11/81911/21
akhilkedia94 [Fri, 29 Jul 2016 07:53:35 +0000 (16:53 +0900)]
Face Down Gesture Sensor

Detects the face down gesture defined as -
The phone being face up (<20 degrees from screen pointing vertically upwards) and
then face down (<20 degrees from vertically downwards) in 2 second.

Change-Id: I8045109a3266baaa11ab0316e07857474a5b1e8b
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agoGyroscope RV Sensor 76/84076/7
akhilkedia94 [Tue, 16 Aug 2016 11:40:06 +0000 (20:40 +0900)]
Gyroscope RV Sensor

Created a Rotation Vector Sensor which uses only accel and gyro

Note - In lines 288-290 of src/sensor/rotation_vector/fusion_utils/
orientation_filter.cpp, the fusion backend does not update the quaternion
if acceleration and gyroscope values are higher than a very low threshold.

While this may improve performance in high noise situations, doing so
causes the sensor to not update its values in most common-use scenarios.

I would hence recommend to remove the 3 if conditions in the lines above.

Change-Id: I0b96e6235c52f76195529b918bd54e29bf946631
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agoMagnetic RV Sensor 74/84074/6
akhilkedia94 [Tue, 16 Aug 2016 11:33:00 +0000 (20:33 +0900)]
Magnetic RV Sensor

Change-Id: I7a0586952f69404573d5ae974d6dc3c8cf1b7055
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agoRotation Vector Sensor 39/83639/7
akhilkedia94 [Thu, 18 Aug 2016 05:48:33 +0000 (14:48 +0900)]
Rotation Vector Sensor

Created a rv_sensor using Sensor Fusion.

Change-Id: Ie7b3f2585621d724f0f3bd2e956e1bab4d3bfdfc
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agoMoved Fusion Backed from sensor_fusion folder to rotation_vector folder 29/84329/1
akhilkedia94 [Thu, 18 Aug 2016 04:59:32 +0000 (13:59 +0900)]
Moved Fusion Backed from sensor_fusion folder to rotation_vector folder

Change-Id: I45f24c4926b35093ddbbb71f0e048d028a5ece07
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years ago[Bugfix] Order of parameters passed was incorrect - magnetometer was being passed... 57/84057/1
akhilkedia94 [Tue, 16 Aug 2016 10:29:01 +0000 (19:29 +0900)]
[Bugfix] Order of parameters passed was incorrect - magnetometer was being passed in place of gyro

Change-Id: Id65df1004721f55e76169aaee69d2c7af459569b
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years ago[Bugfix] Timestamp was not being passed by refferencce to sensor_fusion 14/84014/1
akhilkedia94 [Tue, 16 Aug 2016 08:37:51 +0000 (17:37 +0900)]
[Bugfix] Timestamp was not being passed by refferencce to sensor_fusion

Change-Id: Ifb0ff04689880ede5fe565f85931a49f8bc16e6d
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agoPorting Sensor Fusion to Tizen 3.0 00/81900/9
akhilkedia94 [Fri, 29 Jul 2016 06:27:17 +0000 (15:27 +0900)]
Porting Sensor Fusion to Tizen 3.0

Change-Id: I8607fea652431cf277d7f9a577686c77318052bc
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>
7 years agoSet SmackProcessLabel to System 05/80905/1
Yunjin Lee [Wed, 20 Jul 2016 11:28:46 +0000 (20:28 +0900)]
Set SmackProcessLabel to System

Change-Id: Ic6db23e47dfc46aeade072e08a8396b4505774a5
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
7 years agoSet SmackProcessLabel to System 53/80853/1 accepted/tizen/common/20160721.175619 accepted/tizen/ivi/20160721.090722 accepted/tizen/mobile/20160721.090402 accepted/tizen/tv/20160721.091328 accepted/tizen/wearable/20160721.090907 submit/tizen/20160721.003054
Yunjin Lee [Wed, 20 Jul 2016 11:28:46 +0000 (20:28 +0900)]
Set SmackProcessLabel to System

Change-Id: Ic6db23e47dfc46aeade072e08a8396b4505774a5
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
7 years agoMerge branch 'devel/tizen_3.0' into tizen 82/77482/3 accepted/tizen/common/20160706.142207 accepted/tizen/ivi/20160706.082614 accepted/tizen/mobile/20160706.082522 accepted/tizen/tv/20160706.082512 accepted/tizen/wearable/20160706.082451 submit/tizen/20160705.060431 submit/tizen/20160706.022032
kibak.yoon [Fri, 1 Jul 2016 11:05:14 +0000 (20:05 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: modify enum values for classification
  sensord: print errno log when proper errors are returned
  sensord: version 2.0.6
  sensord: fix wrong log in case of setting batch latency
  sensord: remove unused sensor_config sources
  sensord: clean up switch-case statement if attribute is not global.
Change-Id: I44aa8474b8c636d7d175006115a6af593eee1514
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: modify enum values for classification 87/77887/1
hs81.go [Fri, 1 Jul 2016 05:05:45 +0000 (14:05 +0900)]
sensord: modify enum values for classification

Change-Id: I0db7552f2c29f1805a20f13f47a7d79a73f0adec
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: print errno log when proper errors are returned 19/77719/2
kibak.yoon [Thu, 30 Jun 2016 14:02:17 +0000 (23:02 +0900)]
sensord: print errno log when proper errors are returned

Change-Id: Ib89d28b1b75fc4ef563536f643633928ab0ec17e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: version 2.0.6 70/77470/1
kibak.yoon [Thu, 30 Jun 2016 02:29:22 +0000 (11:29 +0900)]
sensord: version 2.0.6

Change-Id: I03bd5c537de1f3ad27d9f5cc6d5f1ce0f72b90c1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix wrong log in case of setting batch latency 81/77281/2
kibak.yoon [Wed, 29 Jun 2016 08:04:20 +0000 (17:04 +0900)]
sensord: fix wrong log in case of setting batch latency

Change-Id: I9254577b0ac02b44645578e1680550e7672b3bef
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: remove unused sensor_config sources 80/77280/2
kibak.yoon [Wed, 29 Jun 2016 02:51:58 +0000 (11:51 +0900)]
sensord: remove unused sensor_config sources

- device_config
- virtual_sensor_config

Change-Id: I91eb3abf9c062c6dd0576b846440fc199b6be89f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: clean up switch-case statement if attribute is not global. 79/77279/1
kibak.yoon [Mon, 27 Jun 2016 04:27:25 +0000 (13:27 +0900)]
sensord: clean up switch-case statement if attribute is not global.

- if it is a default attribute in switch-case statement, break and call
  set_attribute_int() function.

Change-Id: I1bf0403ad268a8465190439acd9c1ebe320cda2c
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agoMerge branch 'devel/tizen_3.0' into tizen 26/76026/1 accepted/tizen/common/20160627.191141 accepted/tizen/ivi/20160623.121114 accepted/tizen/mobile/20160623.121001 accepted/tizen/tv/20160623.121041 accepted/tizen/wearable/20160623.121057 submit/tizen/20160622.045445
kibak.yoon [Wed, 22 Jun 2016 10:59:49 +0000 (19:59 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: fix the bug which converts wrong pause policy

Change-Id: Id9f267f94098c5999d9a3f0dbf9a7f9f175776da
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix the bug which converts wrong pause policy 22/76022/1
kibak.yoon [Wed, 22 Jun 2016 10:07:50 +0000 (19:07 +0900)]
sensord: fix the bug which converts wrong pause policy

Change-Id: I655ccde45a65637672fb9c23141e66b32d34c2c7
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agoMerge branch 'devel/tizen_3.0' into tizen 37/75737/1
kibak.yoon [Tue, 21 Jun 2016 06:16:34 +0000 (15:16 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0: (35 commits)
  sensord: rename and reorder sensor types
  sensord: add new internal sensor types
  sensord: change sensor axis policy by using attribute setting via C-API
  sensord: set to UINT_MAX batch count when there is no batch latency for sensor
  sensord: restore attributes after sensor daemon is restarted
  sensord: support the passive mode which listens sensor event only
  sensord: change to use is_started() instead of using member variable directly
  sensord: move operate_sensor function to sensor_client_info
  sensord: rename option to pause policy
  sensord: support attribute interface & clean up option
  sensord: store unknown rotation event when auto_rotation sensor starts
  sensord: fix comments properly about getting sensor data logic
  sensord: rename return variables from err to ret
  sensord: fix to not loading sensor which is already loaded
  sensord: move udev rules to HAL packages
  sensord: fix double free problem after the allocation of memory is failed
  sensord: clean up permission_checker for syncing with tizen_2.3
  sensord: remove unused APIs
  sensord: change the log level from _E to _I
  sensord: remove EVENT_TYPE_SHIFT macro in sensor_log.h
  ...

Change-Id: Ifc875d0a985c856ad0988735f8744fdd2d217b3b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: rename and reorder sensor types 22/75722/1
kibak.yoon [Tue, 21 Jun 2016 03:45:25 +0000 (12:45 +0900)]
sensord: rename and reorder sensor types

- EXERCISE_COACH -> EXERCISE_STANDALONE
- EXERCISE       -> EXERCISE_COMPANION
- EXERCISE_STAIR_CLIMBING -> X

Change-Id: I43290e81ad9175bc2c63b46db7d6c98dcea62046
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add new internal sensor types 04/75604/1
kibak.yoon [Thu, 2 Jun 2016 08:48:10 +0000 (17:48 +0900)]
sensord: add new internal sensor types

Change-Id: I9c7bb390184877f41d379fa1bb0115dd7edecc3b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change sensor axis policy by using attribute setting via C-API 03/75603/1
kibak.yoon [Mon, 20 Jun 2016 03:46:07 +0000 (12:46 +0900)]
sensord: change sensor axis policy by using attribute setting via C-API

- SENSORD_AXIS_DEVICE_ORIENTED
- SENSORD_AXIS_DISPLAY_ORIENTED

Change-Id: Iab201d26c1d957d58ee48a00d4aa1403aa034f9e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: set to UINT_MAX batch count when there is no batch latency for sensor 02/75602/1
kibak.yoon [Tue, 7 Jun 2016 05:02:41 +0000 (14:02 +0900)]
sensord: set to UINT_MAX batch count when there is no batch latency for sensor

- if there is no client which uses batch latency, batch count should be set
  the default value, not 0 but max batch count. if sensord sets the
  UINT_MAX as a default value, HAL will set the proper value comparing
  between this sensor's max batch count and UINT_MAX.

Change-Id: I3aff8d24c00ca6b232d33c803b1783cb60325abb
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: restore attributes after sensor daemon is restarted 01/75601/1
kibak.yoon [Wed, 8 Jun 2016 11:18:58 +0000 (20:18 +0900)]
sensord: restore attributes after sensor daemon is restarted

sensor attributes also has to restored when daemon is restarted,
like listener, interval, batch latency.

Change-Id: Id9bfb37fc9ab9b71caca08639f2106710a65741f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: support the passive mode which listens sensor event only 00/75600/1
kibak.yoon [Thu, 2 Jun 2016 05:11:04 +0000 (14:11 +0900)]
sensord: support the passive mode which listens sensor event only

if a client wants to be listening sensor event which other clients start
sensor, use sensord_set_passive_mode() before sensord_register_event().

Change-Id: Idbe59ed663c8a0bc268c406afcdc8cac13286b98
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change to use is_started() instead of using member variable directly 99/75599/1
kibak.yoon [Thu, 2 Jun 2016 05:07:47 +0000 (14:07 +0900)]
sensord: change to use is_started() instead of using member variable directly

- it would be better to use member function

Change-Id: I2475768459215731d36bdd3ef00df263688c4431
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: move operate_sensor function to sensor_client_info 98/75598/1
kibak.yoon [Thu, 2 Jun 2016 04:49:19 +0000 (13:49 +0900)]
sensord: move operate_sensor function to sensor_client_info

- it would be better to move operate_sensor() to sensor_client_info class,
  because it is only related with that class.
- because "operate_sensor" name is ambiguous, rename it to
  set_pause_policy.

Change-Id: I593f1380015e7d38ed413e5cda8141718942d23a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: rename option to pause policy 97/75597/1
kibak.yoon [Wed, 8 Jun 2016 04:42:44 +0000 (13:42 +0900)]
sensord: rename option to pause policy

Change-Id: I2bcb62312af65f693aa83a1071bac1eee3d3a4a5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: support attribute interface & clean up option 96/75596/1
kibak.yoon [Tue, 7 Jun 2016 12:34:47 +0000 (21:34 +0900)]
sensord: support attribute interface & clean up option

- SENSORD_PAUSE_POLICY( = sensor option)
- SENSORD_AXIS_ORIENTATION
- SENSORD_ATTRIBUTE_*

Change-Id: Ida4039b55fc72a5cff4cbe021ef79c33429c3948
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: store unknown rotation event when auto_rotation sensor starts 10/74010/1 accepted/tizen/common/20160610.182644 accepted/tizen/ivi/20160611.084529 accepted/tizen/mobile/20160611.084346 accepted/tizen/tv/20160611.084432 accepted/tizen/wearable/20160611.084456 submit/tizen/20160610.104308
kibak.yoon [Wed, 8 Jun 2016 03:45:22 +0000 (12:45 +0900)]
sensord: store unknown rotation event when auto_rotation sensor starts

- when sensor starts, it would be better to store unknown rotation event
  for getting auto_rotation sensor data.

Change-Id: I68e25ec9460b7959b200185ef674adc2293a3b55
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
(cherry picked from commit 6c74491e0abe56efac3f217ddcd34323cc135272)

7 years agosensord: store unknown rotation event when auto_rotation sensor starts 87/73387/1
kibak.yoon [Wed, 8 Jun 2016 03:45:22 +0000 (12:45 +0900)]
sensord: store unknown rotation event when auto_rotation sensor starts

- when sensor starts, it would be better to store unknown rotation event
  for getting auto_rotation sensor data.

Change-Id: I68e25ec9460b7959b200185ef674adc2293a3b55
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix comments properly about getting sensor data logic 09/72509/1
kibak.yoon [Tue, 31 May 2016 15:15:20 +0000 (00:15 +0900)]
sensord: fix comments properly about getting sensor data logic

- remove wrong tab before assignment

Change-Id: I49f18ea005c3f6f69209a30ebe4d03f0029353d9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: rename return variables from err to ret 08/72508/1
kibak.yoon [Tue, 31 May 2016 15:13:28 +0000 (00:13 +0900)]
sensord: rename return variables from err to ret

- change the condition about state is not equal to PSMODE_NORMAL

Change-Id: I7d8de4b7434a5c857760ae81789b8805f9c38607
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix to not loading sensor which is already loaded 68/72068/1
kibak.yoon [Mon, 30 May 2016 10:58:51 +0000 (19:58 +0900)]
sensord: fix to not loading sensor which is already loaded

- a sensor has to be loaded just once.

Change-Id: I9cbd1897e6a582a85ed90cc8f36812503c2d08c3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: move udev rules to HAL packages 67/72067/1
kibak.yoon [Mon, 30 May 2016 10:12:01 +0000 (19:12 +0900)]
sensord: move udev rules to HAL packages

- there are some devices which doesn't have sensorhub, e.g. TM1.
- so udev rules should be moved to HAL packages

Change-Id: Ib0c7b36fdf9973b1b72e0cdda5b897351fc8b514
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix double free problem after the allocation of memory is failed 15/71515/2
kibak.yoon [Wed, 25 May 2016 15:15:26 +0000 (00:15 +0900)]
sensord: fix double free problem after the allocation of memory is failed

- if the allocation of memory is failed, this function has to be finished.

Change-Id: Iea3ca9184812a82b34b3ad3bd299b2d33a382323
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: clean up permission_checker for syncing with tizen_2.3 09/71509/3
kibak.yoon [Wed, 25 May 2016 14:20:03 +0000 (23:20 +0900)]
sensord: clean up permission_checker for syncing with tizen_2.3

- in tizen 2.3, there is another security module, security_server.
- clean up permission_checker for converting it easily

Change-Id: I4489849fbb4e8178058e1b1d403dde99c402b0bd
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: remove unused APIs 08/71508/2
kibak.yoon [Wed, 25 May 2016 14:12:55 +0000 (23:12 +0900)]
sensord: remove unused APIs

- there is no module which uses these APIs
- sf_check_rotation is used in xwalk....

Change-Id: I3c462da847015f54f3aa1d573a7380342f941205
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change the log level from _E to _I 07/71507/2
kibak.yoon [Wed, 25 May 2016 14:12:05 +0000 (23:12 +0900)]
sensord: change the log level from _E to _I

- this state is not error

Change-Id: I9f294f14e6071f7cab8f40eaf8d296fd836a57a9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: remove EVENT_TYPE_SHIFT macro in sensor_log.h 06/71506/3
kibak.yoon [Wed, 25 May 2016 09:23:22 +0000 (18:23 +0900)]
sensord: remove EVENT_TYPE_SHIFT macro in sensor_log.h

- they are duplicated macro, so remove them.

Change-Id: I1a635c7b49657229da2edf539a3f183033d4de64
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change error log macro from ERR to _E for code unity 05/71505/3
kibak.yoon [Wed, 25 May 2016 08:58:02 +0000 (17:58 +0900)]
sensord: change error log macro from ERR to _E for code unity

Change-Id: I2498ce26cbd92a39ef72e5ca2832e6035dec0072
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add null check when sensor event is pushed to event queue 04/71504/2
kibak.yoon [Wed, 25 May 2016 08:56:46 +0000 (17:56 +0900)]
sensord: add null check when sensor event is pushed to event queue

if event or data is null, it is unnecessary to push event

Change-Id: If7e28e3531f59dd30d5d9f0d14e46662c340ca45
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: initialize dbus when sensord is launched 03/71503/2
kibak.yoon [Wed, 25 May 2016 08:53:40 +0000 (17:53 +0900)]
sensord: initialize dbus when sensord is launched

Change-Id: Ie8563a7892cdb70ef01d29b329daa85f1ea47281
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix build warning because of using g_type_init() 38/71338/2
kibak.yoon [Wed, 25 May 2016 05:44:02 +0000 (14:44 +0900)]
sensord: fix build warning because of using g_type_init()

- g_type_init() should be called under glib version 2.36

Change-Id: I5291cd4ea92168ddba0a961c0f24631cc2265dfb
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: move deprecated event types to sensor_deprecated.h 37/71337/2
kibak.yoon [Wed, 25 May 2016 05:34:47 +0000 (14:34 +0900)]
sensord: move deprecated event types to sensor_deprecated.h

- clean up sensor_types.h

Change-Id: I41225fcb478d00fd780aa46cda2ff94c18ede5c9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add power save vconf for syncing with tizen 2.3 06/71306/3
kibak.yoon [Wed, 25 May 2016 04:27:26 +0000 (13:27 +0900)]
sensord: add power save vconf for syncing with tizen 2.3

- in public, there is no power save vconf key
- this patch is only for maintainance

Change-Id: I327fd0dfe96a849ef24b344a60aab971228340d5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: remove unused configs in spec file 49/70849/2
kibak.yoon [Mon, 23 May 2016 04:57:24 +0000 (13:57 +0900)]
sensord: remove unused configs in spec file

- unused sensor compile flags
- unused build require package

Change-Id: I26915b6fed772e7c29deec3fb595fefb4db0e9a6
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: terminate sensord if there is no sensor 12/70412/2
kibak.yoon [Thu, 19 May 2016 07:11:49 +0000 (16:11 +0900)]
sensord: terminate sensord if there is no sensor

Change-Id: Ib4d2fe95691662fa8d750493b0c80067eaddd764
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: update the duration of copyright in license 94/71294/1
kibak.yoon [Wed, 25 May 2016 02:40:59 +0000 (11:40 +0900)]
sensord: update the duration of copyright in license

Change-Id: I74c2b8d75f02ce89f5c8bb756923e997cc8c5a8d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: support external sensor feature 61/71161/1
kibak.yoon [Tue, 24 May 2016 09:40:53 +0000 (18:40 +0900)]
sensord: support external sensor feature

Change-Id: I3649a0b017c6b94c98cc5c71ac3c776002ea0f43
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change comment for syncing 60/71160/1
kibak.yoon [Tue, 24 May 2016 07:56:21 +0000 (16:56 +0900)]
sensord: change comment for syncing

- comments are different between tizen 2.3 and tizen 3.0. so sync them.

Change-Id: I011df5ef30ac5075f2eb36327364fc90bc85e4b1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: transpose acc/gyro axis w.r.t the display rotation 87/71087/1
kibak.yoon [Tue, 24 May 2016 05:00:39 +0000 (14:00 +0900)]
sensord: transpose acc/gyro axis w.r.t the display rotation

Change-Id: I23f81740000c13d377038b15b1904da642b4060e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: write void explicitly when no parameters allowed 86/71086/1
kibak.yoon [Tue, 24 May 2016 04:36:59 +0000 (13:36 +0900)]
sensord: write void explicitly when no parameters allowed

- 6.7.5.3 Function declarators
  * The special case of an unnamed parameter of type void as the only
  item in the list specifies that the function has no parameters.

Change-Id: I5a9afdd938a317c23a86d7fc4cd0514a91f0b6b5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change the log level from INFO to ERROR 85/71085/1
kibak.yoon [Tue, 24 May 2016 04:22:20 +0000 (13:22 +0900)]
sensord: change the log level from INFO to ERROR

- it must be ERROR level.

Change-Id: I23fbff0d2e26def0751c4e03730a7a4e7a8971c6
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add/remove useless spaces for code style 76/71076/1
kibak.yoon [Tue, 24 May 2016 04:18:19 +0000 (13:18 +0900)]
sensord: add/remove useless spaces for code style

Change-Id: Idae508f8b763a3b2674c1e121dce42b289c46fd4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agoMerge branch 'devel/tizen_3.0' into tizen 85/70985/1 accepted/tizen/common/20160526.145737 accepted/tizen/ivi/20160524.004525 accepted/tizen/mobile/20160524.004456 accepted/tizen/tv/20160524.004516 accepted/tizen/wearable/20160524.004424 submit/tizen/20160523.074005
kibak.yoon [Mon, 23 May 2016 12:51:29 +0000 (21:51 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: fix default interval when there is no client which registers event

Change-Id: I8fd5947339dea0ce349de671215ea0e02466f7bc
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: fix default interval when there is no client which registers event 84/70984/1
kibak.yoon [Mon, 23 May 2016 12:47:05 +0000 (21:47 +0900)]
sensord: fix default interval when there is no client which registers event

- POLL_MAX_HZ_MS is too big, so it has to be changed to POLL_10HZ_MS(default)

Change-Id: I611c0983c601c02ab822b700efda4153dcb6a420
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agoMerge branch 'devel/tizen_3.0' into tizen 79/70879/2
kibak.yoon [Mon, 23 May 2016 06:55:57 +0000 (15:55 +0900)]
Merge branch 'devel/tizen_3.0' into tizen

* devel/tizen_3.0:
  sensord: version up 2.0.5
  sensord:fix compiler warnings due to the comparison of the signed and unsigned int
  sensord: set cynara configuration for cache size
  sensord: terminate sensor daemon safely
  sensord: auto_rotation: fix interval setting in auto_rotation
  sensord: change raw pointer to shared pointer for managing device(HAL) handles
  sensord: set signal fd to poller for knowing what signal is received
  sensord: add stop() in event_dispatcher thread
  sensord: add log message in destructor of sensors
  sensord: add lock in permission_checker functions
  sensord: add a newline for code readability
  sensord: check whether client list is empty or not before using std::find()
  sensord: put a space after "if"
  sensord: enable rotation vector/orientation sensors
  sensord: remove unused rotation vector source files
  sensord: clean up the code detected by style checker
  sensord: add coding style checker scripts

Change-Id: I458a433b9856667805e3f9b0a0fc53709ff522e2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: version up 2.0.5 73/70873/4
kibak.yoon [Mon, 23 May 2016 06:44:33 +0000 (15:44 +0900)]
sensord: version up 2.0.5

Change-Id: I7502e5b53f45ccfdd35a25b11df337f242730c37
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord:fix compiler warnings due to the comparison of the signed and 78/70878/2
kibak.yoon [Mon, 23 May 2016 06:46:30 +0000 (15:46 +0900)]
sensord:fix compiler warnings due to the comparison of the signed and
unsigned int

-Wsign-compare

Change-Id: I0f1b785c38aa3972a0b3fc249cf02f532d05d3e3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: set cynara configuration for cache size 44/70244/4
kibak.yoon [Thu, 19 May 2016 04:11:32 +0000 (13:11 +0900)]
sensord: set cynara configuration for cache size

- cynara cache size : 16

Change-Id: Ia28f3b0da49a731ff2fa7493800482cdd08e77ad
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: terminate sensor daemon safely 39/70239/3
kibak.yoon [Thu, 19 May 2016 02:54:50 +0000 (11:54 +0900)]
sensord: terminate sensor daemon safely

- checking event by using select() before accept()
  if event is accepted when sensord is terminating, restoring connection has
  a problem that client cannot connect to sensord.
- in server, quit g_main_loop and close socket safely.
- sensord.service : off restart option

Change-Id: Ibb2c9eca3cdc26b9782e93d3a3e0337b0a28f1a0
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: auto_rotation: fix interval setting in auto_rotation 38/70238/2
kibak.yoon [Thu, 19 May 2016 02:54:06 +0000 (11:54 +0900)]
sensord: auto_rotation: fix interval setting in auto_rotation

- use interval instead of m_interval

Change-Id: I8ae7d1371f8b9e4c7110f1caf4b7541f45c239ea
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: change raw pointer to shared pointer for managing device(HAL) 02/70202/3
kibak.yoon [Wed, 18 May 2016 12:17:24 +0000 (21:17 +0900)]
sensord: change raw pointer to shared pointer for managing device(HAL)
handles

- erase items in map and dlclose so handle in destructor explicitly

Change-Id: I8c7e8359fe9741b31f857e127c3a8e2a192df1c7
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: set signal fd to poller for knowing what signal is received 01/70201/3
kibak.yoon [Wed, 18 May 2016 12:04:48 +0000 (21:04 +0900)]
sensord: set signal fd to poller for knowing what signal is received

- delete fds which is added to poller when event_poller is destroyed.

Change-Id: I098326f609b215e448c92420d88cfa7616d8f9c9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add stop() in event_dispatcher thread 00/70200/2
kibak.yoon [Wed, 18 May 2016 11:56:26 +0000 (20:56 +0900)]
sensord: add stop() in event_dispatcher thread

- because sensord can be shutdown, event_dispatcher can be stopped.

Change-Id: Idd59e0f34dad468c3f4a32d3a47e4329cdec0936
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add log message in destructor of sensors 99/70199/2
kibak.yoon [Wed, 18 May 2016 11:52:46 +0000 (20:52 +0900)]
sensord: add log message in destructor of sensors

- add NULL check in get_name() in physical_sensor

Change-Id: Idef67bd894d46e141a674302415893015131437e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add lock in permission_checker functions 98/70198/2
kibak.yoon [Wed, 18 May 2016 11:48:42 +0000 (20:48 +0900)]
sensord: add lock in permission_checker functions

Change-Id: I1969e07d02482f44d6db810b3c33b17b4282d28d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: add a newline for code readability 97/70197/2
kibak.yoon [Wed, 18 May 2016 11:46:29 +0000 (20:46 +0900)]
sensord: add a newline for code readability

Change-Id: Ida83fdfcdedf399a8de927fcb7ee344541267db4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: check whether client list is empty or not before using 96/70196/1
kibak.yoon [Wed, 18 May 2016 11:40:38 +0000 (20:40 +0900)]
sensord: check whether client list is empty or not before using
std::find()

- if client list is empty, almost of functions in client_info_manager are unnecessary.

Change-Id: Ifce3bba890238bf8e2456362f41687111a00340b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: put a space after "if" 21/70121/1
kibak.yoon [Wed, 18 May 2016 07:35:19 +0000 (16:35 +0900)]
sensord: put a space after "if"

- fixed all code in sensord

Change-Id: Ia56bcb22e7ada3f559c9a650a31bbd5ed067b317
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: enable rotation vector/orientation sensors 58/69058/3
kibak.yoon [Wed, 11 May 2016 08:59:00 +0000 (17:59 +0900)]
sensord: enable rotation vector/orientation sensors

- applied simple fusion algorithm

Change-Id: I31b0c09a29595804946f8a105198bee381d090ae
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: remove unused rotation vector source files 57/69057/1
kibak.yoon [Wed, 11 May 2016 08:56:32 +0000 (17:56 +0900)]
sensord: remove unused rotation vector source files

Change-Id: I3a362c3204dc300c0f0b2a9ecbf37a85ce75f6f4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
7 years agosensord: clean up the code detected by style checker 43/68943/4
kibak.yoon [Tue, 10 May 2016 12:22:45 +0000 (21:22 +0900)]
sensord: clean up the code detected by style checker

- [LNE_R_TWS] Redundant blank line at the start of a code block should be deleted.
- [SPC_M_SEP] Missing space after ,
- [SPC_M_SEP] Missing space before ( in while(
- [SPC_M_SEP] Extra space after (
- [SPC_M_OPR] Missing spaces around <
- ...

Change-Id: I238c4c0be773ef2b9f0067a09b35049ed322cacd
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>