Open whirvis opened 2 years ago
While not fully implemented, the feature InternalBattery
with state BatteryLevelZ
/ BatteryLevel
has been added in commit 16de8ff8d2f13023b19b8bcb448bfdab528bb024. A later version of Ketill will fully support these features. At which point, this issue will be closed accordingly.
An I/O feature representing the battery level of a device should be added when possible to the
controller
module. The class of the I/O feature may possibly be namedBattery
orInternalBattery
, 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
xinput
module now supports theINTERNAL_BATTERY
feature present inXboxController
.