Go to Post Tell the truth - that's really a small barbecue grill on that robot isn't it. - Tom Line [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 09-02-2014, 17:49
MichaelB MichaelB is offline
Registered User
FRC #3573 (The Ohms)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2011
Location: Conyers
Posts: 8
MichaelB is an unknown quantity at this point
Re: Negative Joystick Values Don't Control Mecanum Wheels

Quote:
Originally Posted by Ether View Post


What does this code do?
Code:
x = x > RobotMap.joystickTolerance ? x : 0;
y = y > RobotMap.joystickTolerance ? y : 0;
twist = twist > RobotMap.joystickTolerance ? twist : 0;

That was me trying to set up a dead zone in the middle of the joysticks. Of course, now that you pointed it up I see the problem with my code. That bit makes the value 0 if the joystick is less that the tolerance (0.2), instead of the absolute value of the joystick less than the tolerance. Thanks!
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi