|
Toggle Button For reverse
I have a command-based program with a DriveTrain subsystem that has this method:
void DriveTrain:: DriveDirectional(float x, float y){
robotDrive41->ArcadeDrive(y, x); //Call the ArcadeDrive Method using the Y
//Axis as the speed and the x axis as the Turn.
}
How would I implement a command to have a toggle button (i.e. the joystick button) to set the robot in reverse (press button once, in reverse, press button again, back to moving forward)?
Last edited by 414cnewq : 01-23-2016 at 01:33 PM.
|