View Single Post
  #2   Spotlight this post!  
Unread 24-01-2007, 23:02
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: EasyC deadzones?

I really think you would benefit from taking a little time to run through some of the tutorials available in the Help menu. Try it! Really!

Deadzones are something you program. In general, your joystick position arrives at your program as a raw number. Your program performs certain actions based on that number, as in drive in a certain direction at a certain speed. Some of the EasyC drive libraries are there to make that task simpler. To establish dead zones, you simply make sure that if the raw number from your joy stick is between a certain range (say 107 to 137) then your program treats it as 127 (neutral). Here is psuedo code:

Code:
if (joyX >= 107 || joyX <= 137)
{
xValue = 127;
}