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

Public Member Functions

def __init__ (self, parent, id)
 Use the axis class to get axis values from the controllers joystick. More...
 
def value (self)
 Gets the value of the axis. More...
 
def position (self, percentUnits=PercentUnits.PCT)
 Gets the position of the axis. More...
 

Constructor & Destructor Documentation

◆ __init__()

def vex.ControllerAxis.__init__ (   self,
  parent,
  id 
)

Use the axis class to get axis values from the controllers joystick.

Member Function Documentation

◆ value()

def vex.ControllerAxis.value (   self)

Gets the value of the axis.

Returns
Returns an integer that represents the value of the axis.

◆ position()

def vex.ControllerAxis.position (   self,
  percentUnits = PercentUnits.PCT 
)

Gets the position of the axis.

Returns
Returns an integer that represents the position of the axis as defined by the unit in the parameter.
Parameters
percentUnitsThe type of unit that should be returned.