|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Inverting Joysticks?
The electrical guys and i have wired the robot and everything. All the wiring is pretty neat and tidy, but we have a problem.... we have 2 right handed transmissions and need to invert one of our joysticks.
I was just wondering what i would do in the code to invert the joysticks. Any and all help or ideas would be greatly appreciated. **we dont wanna rewire anything, we would like to change the code |
|
#2
|
|||
|
|||
|
Re: Inverting Joysticks?
It is very easy to just swap the wires on the motor side of the victor. If you want to do it in the program, replace all your pwm values with
Code:
254-whateveryoucurrentlyhave |
|
#3
|
||||
|
||||
|
Re: Inverting Joysticks?
we only need it switched for one joystick.....will doing 254 - whatever really invert, or is there a command to invert it?
|
|
#4
|
||||||
|
||||||
|
Re: Inverting Joysticks?
joystickvar = 254 - joystickvar;
That's all you need. |
|
#5
|
|||
|
|||
|
Re: Inverting Joysticks?
Quote:
Quote:
|
|
#6
|
|||
|
|||
|
Re: Inverting Joysticks?
Wow I didn't think of it being as easy as 254-p1_y.......
I came up with 127-(p1_y-127) which essentially does the same thing... I think to much... |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2004-2005 Joysticks | kjohnson | Control System | 3 | 11-04-2005 23:39 |
| Pressure sensative Joysticks | Validius | General Forum | 1 | 15-03-2005 13:59 |
| number of joysticks | Waste | General Forum | 21 | 27-01-2005 15:04 |
| Sophisticated Joysticks | WebWader125 | Control System | 3 | 03-12-2004 15:33 |
| AVB joysticks..and other analogue joysticks | tml240 | Kit & Additional Hardware | 6 | 07-02-2004 12:45 |