VEX V5 Python API
Public Member Functions | List of all members
vex.BrainBattery Class Reference

Public Member Functions

def __init__ (self, parent)
 Use the battery class to see information about the battery. More...
 
def capacity (self, percentUnits=PercentUnits.PCT)
 Get the batteries capacity. More...
 
def temperature (self, temperatureUnits=TemperatureUnits.CELSIUS)
 Gets the battery temperature. More...
 
def voltage (self, voltageUnits=VoltageUnits.VOLT)
 Gets the battery voltage. More...
 
def current (self, currentUnits=CurrentUnits.AMP)
 Gets the battery current. More...
 

Constructor & Destructor Documentation

◆ __init__()

def vex.BrainBattery.__init__ (   self,
  parent 
)

Use the battery class to see information about the battery.

Member Function Documentation

◆ capacity()

def vex.BrainBattery.capacity (   self,
  percentUnits = PercentUnits.PCT 
)

Get the batteries capacity.

Parameters
percentUnitsThe type of unit that should be returned.
Returns
Returns an integer that represents the batteries capacity in the units specified by the parameter.

◆ temperature()

def vex.BrainBattery.temperature (   self,
  temperatureUnits = TemperatureUnits.CELSIUS 
)

Gets the battery temperature.

Returns
Returns a double that represents the current temperature of the battery in the units specified by the parameter.
Parameters
temperatureUnitsThe type of unit that should be returned.

◆ voltage()

def vex.BrainBattery.voltage (   self,
  voltageUnits = VoltageUnits.VOLT 
)

Gets the battery voltage.

Returns
Returns the battery voltage in the units specified by the parameter.
Parameters
voltageUnitsThe unit of voltage to be returned.

◆ current()

def vex.BrainBattery.current (   self,
  currentUnits = CurrentUnits.AMP 
)

Gets the battery current.

Returns
Returns the battery current in the units specified by the parameter.
Parameters
currentUnitsThe type of current to be returned.