-
Notifications
You must be signed in to change notification settings - Fork 1
Add battery level support #38
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestmodule-deviceIssue relates to the device modulesIssue relates to the device modulesmodule-hid-usbIssue relates to the HID & USB modulesIssue relates to the HID & USB modulesmodule-xinputIssue relates to the X-input moduleIssue relates to the X-input module
Description
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmodule-deviceIssue relates to the device modulesIssue relates to the device modulesmodule-hid-usbIssue relates to the HID & USB modulesIssue relates to the HID & USB modulesmodule-xinputIssue relates to the X-input moduleIssue relates to the X-input module
An I/O feature representing the battery level of a device should be added when possible to the
controllermodule. The class of the I/O feature may possibly be namedBatteryorInternalBattery, and its state classBatteryLevel. The state class shall have a method namedgetLevel(), which returns a floating point value from 0.0 for an empty battery and 1.0 for a fully charged battery. It shall also have a method calledgetPercentage(), which callsgetLevel()and converts its value to an integer with a range from 0 to 100.Device classes which may have a battery feature could be, but are not limited to:
XboxController,Ps3Controller,Ps4Controller,Ps5Controller,Wiimote,NxLeftJoyCon,NxRightJoyCon, andNxProController.UPDATE: The
xinputmodule now supports theINTERNAL_BATTERYfeature present inXboxController.