|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||
|
|||
|
Re: [FTC]: Java in RobotC for TeleOp
The problem is the button commands you are using. "joystick.joy1_Buttons" doesn't work like Joy1Btn, where it outputs the actual button number. Instead, it outputs numbers to the power of 2, like this:
button 1 = 1 button 2 = 2 button 3 = 4 button 4 = 8 button 5 = 16 button 6 = 32 etc... This is useful to allow for commands where multiple buttons are pressed at once, but can be a pain otherwise. In your script, button 3 should activate case 4, with button 4 activating case 8. Case 3 currently displays when 1 and 2 are pressed togethor, and case 4 displays when button 3 is pressed. Last edited by rzoeller : 31-01-2010 at 18:27. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: Buttons RobotC | JohnFogarty | FIRST Tech Challenge | 2 | 25-11-2009 19:13 |
| [FTC]: Programming Clarification [RobotC] | basicxman | FIRST Tech Challenge | 3 | 11-02-2009 20:21 |
| [FTC]: [FTC]: RobotC Template Problem (causing an FMS issue) and Potential Servo Prob | PackersFan | FIRST Tech Challenge | 11 | 26-01-2009 21:25 |
| [FTC]: RobotC Template | gdo | FIRST Tech Challenge | 14 | 10-11-2008 06:26 |