How would I find the state of the center power button with PROS? I need to have the program do something when that button is hit.
You can’t (at least not in the current version of PROS).
typedef enum {
E_CONTROLLER_DIGITAL_L1 = 6,
E_CONTROLLER_DIGITAL_L2,
E_CONTROLLER_DIGITAL_R1,
E_CONTROLLER_DIGITAL_R2,
E_CONTROLLER_DIGITAL_UP,
E_CONTROLLER_DIGITAL_DOWN,
E_CONTROLLER_DIGITAL_LEFT,
E_CONTROLLER_DIGITAL_RIGHT,
E_CONTROLLER_DIGITAL_X,
E_CONTROLLER_DIGITAL_B,
E_CONTROLLER_DIGITAL_Y,
E_CONTROLLER_DIGITAL_A
} controller_digital_e_t;
I should add, if you looked at the PROS source code you could probably figure out an unofficial way to do it, but I’m not going to post that here because, well, it’s unofficial…
also, the controller button has meaning to vexos, a long press will stop the current program, a double quick press emulates the brain button (you can change back and forth between user screen and program running screen) so, although it is technically available to user code, we have never encouraged its use.
11 Likes