Extract data from SPI data received from master processor. More...
Go to the source code of this file.
Enumerations | |
enum | tCtlIndex { Ch1 = 0, Ch2, Ch3, Ch4, Btn8D, Btn8L, Btn8U, Btn8R, Btn7D, Btn7L, Btn7U, Btn7R, Btn5D, Btn5U, Btn6D, Btn6U, AcclX, AcclY, AcclZ, Btn5, Btn6, Btn7, Btn8, BtnAny, Ch1Xmtr2 = 128, Ch2Xmtr2, Ch3Xmtr2, Ch4Xmtr2, Btn8DXmtr2, Btn8LXmtr2, Btn8UXmtr2, Btn8RXmtr2, Btn7DXmtr2, Btn7LXmtr2, Btn7UXmtr2, Btn7RXmtr2, Btn5DXmtr2, Btn5UXmtr2, Btn6DXmtr2, Btn6UXmtr2, AcclXXmtr2, AcclYXmtr2, AcclZXmtr2, Btn5Xmtr2, Btn6Xmtr2, Btn7Xmtr2, Btn8mXtr2, BtnAnyXmtr2 } |
controller button and analog control definitions More... | |
enum | tVexControlState { kFlagNoXmiters = 0, kFlagXmit1 = 0x01, kFlagXmit2 = 0x02, kFlagBit2 = 0x04, kFlagCompetitionSwitch = 0x08, kFlagResetSlave = 0x10, kFlagGameController = 0x20, kFlagAutonomousMode = 0x40, kFlagDisabled = 0x80 } |
Various competition and controller flags. More... | |
Functions | |
int16_t | vexControllerGet (tCtlIndex index) |
Get controller data. More... | |
int16_t | vexControllerCompetitionStateSet (uint16_t ctl, int16_t mask) |
Set competition state, a simulation of the competition modes. More... | |
uint16_t | vexControllerCompetitonState (void) |
Get competition state word (and controller status) More... | |
void | vexControllerReleaseWait (tCtlIndex index) |
Wait for button release. More... | |
Extract data from SPI data received from master processor.
enum tCtlIndex |
controller button and analog control definitions
These are the constants that are used in the call to vexControllerGet. They follow the format that ROBOTC uses in its call to vexRT[], however, there are a few additions to allow multiple buttons to be checked.
enum tVexControlState |
int16_t vexControllerGet | ( | tCtlIndex | index) |
Get controller data.
[in] | index | The required controller variable eg. Btn8U |
int16_t vexControllerCompetitionStateSet | ( | uint16_t | ctl, |
int16_t | mask | ||
) |
Set competition state, a simulation of the competition modes.
[in] | ctl | The control byte |
[in] | mask | bit to change |
uint16_t vexControllerCompetitonState | ( | void | ) |
Get competition state word (and controller status)
void vexControllerReleaseWait | ( | tCtlIndex | index) |
Wait for button release.