View Single Post
  #2   Spotlight this post!  
Unread 01-30-2016, 04:12 PM
Guy997's Avatar
Guy997 Guy997 is offline
Le Programmer
AKA: Sam Schwartz
FRC #1339 (Angelbots)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Denver
Posts: 14
Guy997 is an unknown quantity at this point
Re: Using joystick buttons with Command based programming

Instead of putting

Code:
joystickButtonA.whenPressed(new shiftDriveSpeed());
in init, make a function public OI in OI.

Code:
public OI(){
joystickButtonA.whenPressed(new shiftDriveSpeed());
}
Also, in shiftDriveSpeed, return true on isFinished or else it'll constantly shift.
__________________
I think the PDP needs more metal shavings but y'know, that's just me...

Reply With Quote