![]() |
Broken 360 controller needs a dead zone
I have an xbox 360 controller that keeps leaning towards the right a little. I've made a program with the 360 controller and everything has been fine except that it leans right. Is there a vi for creating a dead zone or multiplying a range of values by zero?
|
Re: Broken 360 controller needs a dead zone
Creating a deadzone should be fairly easy. I would use a select VI. To feed the selector I would run the input through an absolute value then a "greater than" VI. For the True part of the Select VI you would have the unaltered input value and for the False you would feed 0.
EDIT: Alternative suggestion removed due to Chris' post below. |
Re: Broken 360 controller needs a dead zone
It's generally good practice to add dead zones to Xbox 360 controllers. They don't consistently return to any particular center point.
|
Re: Broken 360 controller needs a dead zone
Well yeah I guess it works fine with all my games except fallout 3 for some reason and minecraft on my computer. Those and my program are the only things it leans right on
|
Re: Broken 360 controller needs a dead zone
What I'd do is use the in range and coerce function, and then either return zero or the value with a select. Remember to do it for each axis.
|
Re: Broken 360 controller needs a dead zone
Quote:
Videogames like Fallout, Deadly Premonition, etc, didnīt manage the dead zone at all, so if your controller is slightly "broken"... well, s**t happens. Itīs a very common issue with the Xbox360 controller, if you are too rough playing (but there are FEW titles which donīt manage the dead zone, so chances that you never notice your controller is broken are high). New and well conserved controllers work fine, so if you are not able to manage the dead zone, you can always buy a new one... |
Re: Broken 360 controller needs a dead zone
I've noticed this on our 360 controllers, and for this reason I will encourage our team to use something like this as an FRC gamepad in the future.
|
Re: Broken 360 controller needs a dead zone
If drivers werenīt a problem, this would be nice:
![]() So beautiful... Itīs for a "mecha (giant robot of massive destruction) simulator" for the Xbox1, Steel Battalion. And back to the real world... if you dont like the 360īs just try Logitech gamepads, those are fine too. |
Re: Broken 360 controller needs a dead zone
360 controllers are notoriously bad when it comes to center-positions.
I've been on 3 teams the past 3 years, and with each team I've had to expend a lot of energy convincing students that XBOX controllers simply aren't as good as the Logitech Dual Action or F310 alternatives for FRC purposes. The values that XBOX controllers put out don't reliably return to center. You could add code to increase your deadband, but it takes away your useable resolution on your joystick. Most of your joystick movement in the middle will become useless. And if you compensate for it, you will ramp up from 0 to max over a very small distance, without much resolution. Driving an FRC robot is not like *most* video games: you don't jam your controls to full-blast in every direction if you actually expect to drive at a world class level. The difference between pushing a joystick forward 13% vs 14% is the difference between scoring/dropping a tube. Consider this when you take away all values between 0-30%, or increment by 5% because you are managing a huge deadband on your controller. I'd highly recommend one of the Logitech controllers mentioned. They tend to give nice clean numbers, and even recalibrate/center each time you plug/unplug them (which is why you should never touch the sticks while plugging them in!) The only drawback to the Logitech gamepads is that the stick motion has a circular profile. Great for drivers, because they feel really smooth whipping around the extents. But programmers need to compensate for the fact that they will never hit the "corners" of the XY-Cartesian plane. You may never hit full speed/power if you don't account for this. Or you could just tell your driver to drive tank-drive. That's a pretty good 5:00am solution to a joystick that uncontrollably drifts to the right. |
Re: Broken 360 controller needs a dead zone
Actually, the stick profile on the logitech dual actions is square... or so the new ones are. they are very nice...
what I have tried and like is modding old original xbox controllers. they run on usb, so all one must do is chop the plug, and follow standard usb colors (ignoring the yellow wire) to add a usb plug/pigtail. FYI irt is one of the many examples of how an original xbox is really a PC with a different case. anyway, I personally solder and tape my cable slices for this... as long as one keeps the cable length well under 16' (no more than 14') and does a good job of soldering, they are generally pretty reliable. there are 3rd party drivers to run these; linux has it by default, redcl0ud has the windows driver (XBCD), and the xbox HID project covers mac. What i like about the old xbox controllers: 1. 2 analog triggers. good for racing games and fine control stuff 2. technically analog buttons... they are pressure sensitive from what the xbcd utility showed me. 3. cheap. my favorite one i did was a $3 used intec micro unit i found at a thrift store... it works great and really works well. they do center properly... another reason to keep modding the old kind i guess. I have driven robots with the modded xbox controllers... they drive nice. For driving holomonic systems (kiwi, killough, mecanum, crap, etc.), i prefer the dual action layout. links: XBCD windows driver: http://www.redcl0ud.com/xbcd.html Xbox HID for Mac: http://xhd.sourceforge.net/ |
Re: Broken 360 controller needs a dead zone
Quote:
Quote:
|
Re: Broken 360 controller needs a dead zone
i was comparing the old xbox controllers to the logitech controllers as a way to get both auto center of the logitech and the button features of the 360.
the analog buttons are used to adjust sensitivity... they are read in windows as boolean buttons but xbcd can adjust the sesitivity. |
Re: Broken 360 controller needs a dead zone
I have also noticed that the xbox controllers that we used (knockoffs from best buy), auto-center themselves when initialized. We experienced this at competition when we turned turned on the driver station with the controller wire wrapped around the controller, holding one of the sticks off center. Then when tele-op started, the robot drove in a perpetual circle, really irritating as it turns out. I don't know if this solves any problems, but just some extra information.
|
Re: Broken 360 controller needs a dead zone
As far as I can tell, HID joysticks in general, tend to use an initial value as the "zero" offset. Initial value is defined as when the HID device is opened. In the future, if there is time, you should unplug and replug the joystick with the correct center. If the match has already started, it may also be useful to hit F1, as this will force a joystick enumeration even though the robot is enabled.
Greg McKaskle |
| All times are GMT -5. The time now is 09:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi