View Full Version : Need Help Limiting Max Joystick Input
random.hero
13-02-2015, 11:25
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!
I'd like to limit the maximum power that our joystick outputs at 100% push down to say 50% output or so.
It seems there are quite a few teams wanting to limit motor voltage at the 11th hour. Bad choice of gearing maybe?
http://www.chiefdelphi.com/forums/showthread.php?t=134474
random.hero
13-02-2015, 11:41
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.
RobotMonkey
13-02-2015, 12:52
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
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
Just so that rookie teams contemplating doing this do so with eyes wide open:
http://www.chiefdelphi.com/forums/showpost.php?p=1432292&postcount=25
http://www.chiefdelphi.com/forums/showpost.php?p=1432224&postcount=19
http://www.chiefdelphi.com/forum/showthread.php?p=1426530#post1426530
Alan Anderson
13-02-2015, 15:06
That looks like code from last year. The 2015 Joystick functions return the axes and buttons as arrays, not as bundles.
Just use the multiply block and multiply the joystick input by a decimal before sending it to the drive block.
netmizor
15-02-2015, 23:06
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.
http://www.svrtc.org/images/SpeedControl.PNG
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.