View Single Post
  #6   Spotlight this post!  
Unread 12-03-2012, 23:36
Gigakaiser Gigakaiser is offline
Registered User
AKA: Brandon Hjelstrom
FRC #0987 (High Rollers)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Las Vegas
Posts: 67
Gigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant future
Re: Joystick Trigger and Button C++ Programming

Actually, that would reverse your victors per button (for an intake?) - pressing button 6 would set your victor to +.7, whilie pressing button 7 would set your victor to -.7.

If you want each button to turn on a different victor, write this:
Code:
//pressing 6 will turn on intake, releasing 6 will stop intake
if(rightstick->GetRawButton(6) == 1)
{
     Intakevictor->Set(.7f);
}
else if(rightstick->GetRawButton(6) == 0)
{
     Intakevictor->Set(0.0f);
}

//you can use this code again for your shooter wheel if you change the button to seven and the victor to your shooter wheel victor.
__________________
FRC Team 987 - It's not enough
Reply With Quote