View Single Post
  #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