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)

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:

enum WVR_BatteryStatus

The status of battery capacity.

Values:

WVR_BatteryStatus_Unknown = 0
WVR_BatteryStatus_Normal = 1

battery capacity is normal.

WVR_BatteryStatus_Low = 2

warning, batter capacity is low.

WVR_BatteryStatus_UltraLow = 3

battery capacity is too low.