EasyC deadzones?

We’ve been doing a lot today, sorry with all the questions. What we need is access to the deadzones for easyC- it’s too large for us. Where can we change this? I found the drive functions library, but I can’t make much sense of it. Please help.

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:

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

Actually, you would want to use an && there instead of an ||. :wink:

if (joyX >= 107 && joyX <= 137)
{
xValue = 127;
}

Yes you are correct!

The default drive functions shouldn’t have any deadband. If you using the code I made and posted in the FRC forum the deadband is in the globals.

hm…well, our joysticks don’t even respond until you push halfway there…one of our teachers mentioned linear regression? How can I fix that, without a smoothing algorithim. If I have to, I’ll make one.

You should make a quick program to look at the values being returned in the graphics display. Maybe something is wrong with the joysticks or OI? If you look at my code in FRC “Default Drive Code” I have a scaling in that file you can use for an example.