[ITC][device][Non-ACR][Vibrate before close haptic handle]
authorpr.jung <pr.jung@samsung.com>
Tue, 17 Jan 2017 10:07:21 +0000 (19:07 +0900)
committerpr.jung <pr.jung@samsung.com>
Tue, 17 Jan 2017 10:07:21 +0000 (19:07 +0900)
Change-Id: If1b17568a217873f879307bb8681a063ff1111df
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/itc/device/ITs-device_haptic.c

index 466ecbf364f3f8a83fecd162c2a772d93b1f31e5..1d7f51a650d2119b007c054a912a2a1a9220c522 100755 (executable)
@@ -180,11 +180,17 @@ int ITc_device_haptic_open_close_p(void)
 
        int nDeviceIndex = nDeviceCount - 1;
 
+       int nDuration = 20;
+       int nFeedback = 50;     // 0~100
+       haptic_effect_h pHapticEffect;
+
        // Target API
        nRet = device_haptic_open(nDeviceIndex, &hHapticDevice);
        PRINT_RESULT(DEVICE_ERROR_NONE, nRet, "device_haptic_open", DeviceGetError(nRet));
        CHECK_HANDLE(hHapticDevice, "device_haptic_open");
 
+       nRet = device_haptic_vibrate(hHapticDevice, nDuration, nFeedback, &pHapticEffect);
+
        // Target API
        nRet = device_haptic_close(hHapticDevice);
        PRINT_RESULT(DEVICE_ERROR_NONE, nRet, "device_haptic_close", DeviceGetError(nRet));
@@ -193,4 +199,4 @@ int ITc_device_haptic_open_close_p(void)
 }
 #endif //COMMON_IOT
 /** @} */
-/** @} */
\ No newline at end of file
+/** @} */