From 52db7e5e70694e764ae0b59995ebe124c7b24240 Mon Sep 17 00:00:00 2001 From: Yunmi Ha Date: Mon, 13 Apr 2020 12:08:37 +0900 Subject: [PATCH] Add INFO log about play/stop vibration Change-Id: Id6587a5c93f674887e596a461af8925c94650642 Signed-off-by: Yunmi Ha --- src/haptic/haptic.c | 2 +- src/haptic/standard.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/haptic/haptic.c b/src/haptic/haptic.c index 93c1352..b35703f 100644 --- a/src/haptic/haptic.c +++ b/src/haptic/haptic.c @@ -949,7 +949,7 @@ static gboolean haptic_duration_play(void *data) } DD_LIST_FOREACH_SAFE(head, n, next, node) { - _D("Handle(%d) play=%dms and Wait=%dms %s type. (level=%d, intensity=%d, frequency=%d)", + _I("Handle(%d) play=%dms and Wait=%dms %s type. (level=%d, intensity=%d, frequency=%d)", cur_h_data.handle, node->duration, node->wait, cur_h_data.unlimit ? "Unlimit" : "Once", cur_h_data.level, node->intensity, node->frequency); if ((node->duration + node->wait) <= 0) { diff --git a/src/haptic/standard.c b/src/haptic/standard.c index 78e1326..60b2a6d 100644 --- a/src/haptic/standard.c +++ b/src/haptic/standard.c @@ -477,6 +477,8 @@ static int vibrate_monotone(int device_handle, int duration, int frequency, int return ret; } + _I("Play vibration. Handle %d effect id : %d %dms", device_handle, info->effect.id, duration); + /* register timer */ if (duration) { info->timer = g_timeout_add(duration, timer_cb, info); @@ -484,8 +486,6 @@ static int vibrate_monotone(int device_handle, int duration, int frequency, int _E("Handle %d failed to add timer callback", device_handle); } - _D("Handle %d effect id : %d %dms", device_handle, info->effect.id, duration); - return 0; } @@ -520,7 +520,7 @@ static int stop_device(int device_handle) if (r < 0) _E("failed to stop effect(id:%d) : %d", info->effect.id, r); else - _D("succeed to stop effect"); + _I("Stop vibration by request. id(%d)", info->effect); /* unregister existing timer */ if (r >= 0 && info->timer) { -- 2.7.4