Go to Post I love science. :D - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2007, 17:11
chapmatr's Avatar
chapmatr chapmatr is offline
Zippidy bling-zap whippy-wog snizin
AKA: Travis (Lead Programmer)
FRC #1676 (Pascack Pioneers)
Team Role: Driver
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Hillsdale NJ
Posts: 19
chapmatr is an unknown quantity at this point
Send a message via AIM to chapmatr
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.
__________________
Did you know that 87% of all online statiscs are made up?
  #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;
}
  #3   Spotlight this post!  
Unread 24-01-2007, 23:08
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: EasyC deadzones?

Quote:
Originally Posted by TubaMorg View Post
Here is psuedo code:

Code:
if (joyX >= 107 || joyX <= 137)
{
xValue = 127;
}
Actually, you would want to use an && there instead of an ||.

Code:
if (joyX >= 107 && joyX <= 137)
{
xValue = 127;
}
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
  #4   Spotlight this post!  
Unread 25-01-2007, 09:33
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?

Yes you are correct!
  #5   Spotlight this post!  
Unread 25-01-2007, 10:08
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
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.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #6   Spotlight this post!  
Unread 25-01-2007, 14:23
chapmatr's Avatar
chapmatr chapmatr is offline
Zippidy bling-zap whippy-wog snizin
AKA: Travis (Lead Programmer)
FRC #1676 (Pascack Pioneers)
Team Role: Driver
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Hillsdale NJ
Posts: 19
chapmatr is an unknown quantity at this point
Send a message via AIM to chapmatr
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.
__________________
Did you know that 87% of all online statiscs are made up?
  #7   Spotlight this post!  
Unread 25-01-2007, 22:47
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
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.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
Closed Thread


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

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


All times are GMT -5. The time now is 23:54.

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