|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Need Help Limiting Max Joystick Input
I'd like to limit the maximum power that our joystick outputs at 100% push down to say 50% output or so. I've attached a pic of our code as I apparently do things a little bit differently than others do as far as coding my joysticks. Any help would be appreciated. Thanks!
|
|
#2
|
||||
|
||||
|
Re: Need Help Limiting Max Joystick Input
Quote:
http://www.chiefdelphi.com/forums/sh...d.php?t=134474 Last edited by Ether : 13-02-2015 at 11:42. Reason: added link to answer |
|
#3
|
|||
|
|||
|
Re: Need Help Limiting Max Joystick Input
Last minute change of drive system from 6 super grips to 4 mechs. Too much power/speed now so want to tame it a little bit.
|
|
#4
|
|||
|
|||
|
Re: Need Help Limiting Max Joystick Input
Fastest way is to just multiply each of the axes going into the drive by some constant between 0 and 1. If you wan to halve it, multiply each by 0.5
|
|
#5
|
||||
|
||||
|
Re: Need Help Limiting Max Joystick Input
Quote:
http://www.chiefdelphi.com/forums/sh...2&postcount=25 http://www.chiefdelphi.com/forums/sh...4&postcount=19 http://www.chiefdelphi.com/forum/sho...30#post1426530 |
|
#6
|
|||||
|
|||||
|
Re: Need Help Limiting Max Joystick Input
That looks like code from last year. The 2015 Joystick functions return the axes and buttons as arrays, not as bundles.
|
|
#7
|
|||
|
|||
|
Just use the multiply block and multiply the joystick input by a decimal before sending it to the drive block.
|
|
#8
|
||||
|
||||
|
Re: Need Help Limiting Max Joystick Input
I believe this should work. Use the controls on the front end of the teleop.vi to establish desired top speeds then hard code them.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|