WVR_GetBatteryStatus¶
- WVR_EXPORT WVR_BatteryStatus WVR_GetBatteryStatus(WVR_DeviceType type)
Get the current status of battery capacity.
- Return
- The status of battery capacity. (refer to WVR_BatteryStatus)
- Parameters
- type -
Type of the device to get the InputDeviceState. (refer to WVR_DeviceType)
- type -
How to use¶
Here is an example for the function:
#include <wvr/wvr_status.h>
// To get HMD device Battery Status
WVR_BatteryStatus status;
Status = WVR_GetBatteryStatus(WVR_DeviceType_HMD);
switch(Status)
{
case WVR_BatteryStatus_Unknown:
LOGI("HMD Device Battery Status is Unknown.");
break;
case WVR_BatteryStatus_Normal:
LOGI("HMD Device Battery Status is Normal.");
break;
case WVR_BatteryStatus_Low:
LOGI("HMD Device Battery Status is Low, please pay a attention.");
break;
case WVR_BatteryStatus_UltraLow:
LOGI("HMD Device Battery Status is UltraLow, please charging.");
break;
}
Battery Status includes the following below: