|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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.
|
|
#2
|
|||
|
|||
|
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;
}
|
|
#3
|
|||||
|
|||||
|
Re: EasyC deadzones?
Quote:
![]() Code:
if (joyX >= 107 && joyX <= 137)
{
xValue = 127;
}
|
|
#4
|
|||
|
|||
|
Re: EasyC deadzones?
Yes you are correct!
|
|
#5
|
||||
|
||||
|
Re: EasyC deadzones?
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.
|
|
#6
|
||||
|
||||
|
Re: EasyC deadzones?
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.
|
|
#7
|
||||
|
||||
|
Re: EasyC deadzones?
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| installing easyC | MarkH | Programming | 2 | 26-03-2006 07:33 |
| easyC upgrade! | Brandon Martus | Announcements | 0 | 07-03-2006 14:44 |
| easyC trouble | Erics626 | Programming | 10 | 02-02-2006 08:10 |
| Kickoff easyC workshop integrated into EasyC help file | Dan Larochelle | Programming | 0 | 11-01-2006 06:12 |