Go to Post I didn't say this! - Max Lobovsky [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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
  #1   Spotlight this post!  
Unread 08-02-2013, 20:12
Arrowhead Arrowhead is offline
Registered User
AKA: Daniel Brown
FRC #1369 (1369 Minotaur)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tampa, Florida
Posts: 49
Arrowhead is an unknown quantity at this point
Deadzone Programming

I looked around a bit but couldn't find any resources on this for c++
How do you program in a deadzone for a attack 3 joystick?
I wrote this code but it doesn't seem to be working.

Code:
	void driving(){
		double y;           //variable for forward/backward movement
		double x;           //variable for side to side movement
		double turn;        //variable for turning movement
		if(driverStick.GetY()>0.3||driverStick.GetY()<-0.3){
			y=driverStick.GetY();
		}
		if(driverStick.GetX()>0.3||driverStick.GetX()<-0.3){
			x=driverStick.GetX();
			}
		if(driverStick2.GetX()>0.3||driverStick2.GetX()<-0.3){
			turn=driverStick2.GetX();
			}
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 12:19.

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