VEXcode IQ C++ Unofficial documentation for version 3.0.4.1
Loading...
Searching...
No Matches
vex::brain::button Class Reference

Use the button class to get values from the brain's buttons. More...

#include <vex_brain.h>

Public Member Functions

 button (const int id)
 
void pressed (void(*callback)(void))
 Sets the function to be called when the button is pressed.
 
void released (void(*callback)(void))
 Sets the function to be called when the button is released.
 
bool pressing (void)
 Sets the function to be called when the button is released.
 

Detailed Description

Use the button class to get values from the brain's buttons.

Definition at line 50 of file vex_brain.h.

Constructor & Destructor Documentation

◆ button() [1/2]

vex::brain::button::button ( )
inline

Definition at line 55 of file vex_brain.h.

◆ button() [2/2]

vex::brain::button::button ( const int id)
inline

Definition at line 56 of file vex_brain.h.

◆ ~button()

vex::brain::button::~button ( )
inline

Definition at line 57 of file vex_brain.h.

Member Function Documentation

◆ pressed()

void vex::brain::button::pressed ( void(* callback )(void))

Sets the function to be called when the button is pressed.

Parameters
callbackA reference to a function.

◆ pressing()

bool vex::brain::button::pressing ( void )

Sets the function to be called when the button is released.

Parameters
callbackA reference to a function.

◆ released()

void vex::brain::button::released ( void(* callback )(void))

Sets the function to be called when the button is released.

Parameters
callbackA reference to a function.

The documentation for this class was generated from the following file: