Go to Post But now we know what's inside Shaun's backpack! ...Don Rotolo's plastic egg. - MishraArtificer [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-09-2014, 05:49 PM
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
Reply


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 07:33 AM.

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