Go to Post Math is FUN! - Cynette [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 01-03-2006, 09:39
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
decoder issue

I have a problem to solve tiil nexr sunday.

We are planing to use the decoder sensor.
when I run a program with it {with a working motor ofcourse} the output is running numbers.
Each whole loop of the Small 21 tooth Sprocket is a value of 136321 or close.

What does those numbers?
can anyone give as an exmaple some numbers he go?


tnx!
  #2   Spotlight this post!  
Unread 01-03-2006, 10:36
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: decoder issue

Quote:
Originally Posted by TEAM1949
I have a problem to solve tiil nexr sunday.

We are planing to use the decoder sensor.
when I run a program with it {with a working motor ofcourse} the output is running numbers.
Each whole loop of the Small 21 tooth Sprocket is a value of 136321 or close.

What does those numbers?
can anyone give as an exmaple some numbers he go?


tnx!
Hmmm, this question is a little hard to decode By "decoder" are you talking about the gear tooth sensor? Since you are posting in the EasyC section I am assuming you are using the EasyC GearToothTest example. Output from the GetGTSensor is a 'long', but the print output is wrong because of overflow (this from another post).

On another note, I assume you are waiting for the fix-it windows to work on this right?
  #3   Spotlight this post!  
Unread 03-03-2006, 07:09
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
Re: decoder issue

ammmm yeah I forgot to mention that its the gear tooth sensor

but still I didnt understand what are does running numbers ?

Its important till tomorrow so....
  #4   Spotlight this post!  
Unread 03-03-2006, 19:05
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: decoder issue

Well, again I am assuming your are using the test program, try casting it as a long so that it looks like this:

Code:
PrintToScreen ( "Gear tooth count = %ld\n" , (long)geartooth ) ;
That should fix the output so that it makes since to you. I believe you are just having overflow because a long can't be stuffed into an int.
  #5   Spotlight this post!  
Unread 04-03-2006, 07:02
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
Re: decoder issue

Yeah I done that and it works.
Buy mu question from the begining was what are those numbers at all??
  #6   Spotlight this post!  
Unread 04-03-2006, 13:29
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: decoder issue

Generally, whenever you overflow a variable, it is hard to predict what will happen. In some cases it wraps around, in other cases it flows into unassigned memory addresses. The main thing is that when you get strange output, one of the things to look at is to make sure your variable is cast correctly (which you did).
  #7   Spotlight this post!  
Unread 04-03-2006, 14:37
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
Re: decoder issue

And how to be sure I did it right?
would you give an example please?
  #8   Spotlight this post!  
Unread 04-03-2006, 16:56
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: decoder issue

well all I can say is that if it is counting right, then you have done it right!
  #9   Spotlight this post!  
Unread 06-03-2006, 08:31
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
Re: decoder issue

You mean counting right or counting at all?
  #10   Spotlight this post!  
Unread 06-03-2006, 08:38
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: decoder issue

Based on the output it looks like you were using %d to print a long instead of %ld.
  #11   Spotlight this post!  
Unread 07-03-2006, 14:34
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
Re: decoder issue

Nope, sir!

I was using the %ld as it should be.
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
Heroes of Engineering Comic: Dean is the December Issue Vince Dean Kamen's Inventions 5 01-12-2005 12:00
**FIRST EMAIL**/FIRST Newsletter, 2005 Issue #3 Rich Wong FIRST E-Mail Blast Archive 1 04-10-2005 10:24
FIRST Newsletter - 2004, issue #3 Andy Baker FIRST E-Mail Blast Archive 0 22-09-2004 14:17
**FIRST EMAIL**/FIRST Newsletter, 2004 Issue #2 miketwalker FIRST E-Mail Blast Archive 1 04-06-2004 13:31
Dashboard Decoder Release Version 1.0 Now Available! archiver 2000 1 23-06-2002 22:50


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

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