WVR_TriggerVibrator¶
- WVR_EXPORT void WVR_TriggerVibrator(WVR_DeviceType type, WVR_InputId id = WVR_InputId_Max, unsigned short durationMicroSec = 65535)
Function to trigger vibrator.
- Parameters
- type -
which indicate what device type (refer to WVR_DeviceType)
- id -
indicates the WVR_InputId to trigger a vibrator on.
- durationMicroSec -
The duration when vibrator works, default value is 0.065535 second, max value is 65535
- type -
How to use¶
Here is an example for the function:
- durationMicroSec: The number of microseconds to vibrate.
- Maximum value for vibrate duration is 65536.
#include <wvr/wvr_device.h>
// Let left controller to trigger vibrator,
// set duration for which to turn on or off the vibrator in 0.01 seconds.
WVR_TriggerVibrator(WVR_DeviceType_Controller_Left, WVR_InputId_Max, 10000);