View Single Post
  #1   Spotlight this post!  
Unread 01-23-2016, 01:23 PM
414cnewq 414cnewq is offline
Registered User
FRC #3844 (Kentucky Wildbots)
Team Role: Alumni
 
Join Date: Jul 2014
Rookie Year: 2014
Location: KY
Posts: 86
414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of
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.
Reply With Quote