Skip to main content

Module controller

Module controller 

Source
Expand description

Read from the buttons and joysticks on the controller and write to the controller’s display.

Controllers are identified by their id, which is either 0 (master) or 1 (partner). State of a controller can be checked by calling Controller::state which will return a struct with all of the buttons’ and joysticks’ state.

Structs§

Buttons
Holds whether or not the buttons on the controller are pressed or not
ControllerLine
Represents one line on the controller console.
ControllerState
Stores the current state of the controller; the joysticks and buttons.
Joystick
Stores how far the joystick is away from the center (at (0, 0)) from -1 to 1. On the x axis left is negative, and right is positive. On the y axis down is negative, and up is positive.
Joysticks
Stores both joysticks on the controller.

Enums§

Controller
The basic type for a controller. Used to get the state of its joysticks and controllers.
ControllerButton
A digital channel (button) on the VEX controller.
ControllerError
Errors that can occur when interacting with the controller.
JoystickAxis
An analog channel (joystick axis) on the VEX controller.