Go to Post In 2001 instead of staring at the field at the game I turned around and watched the people watch the field. All I could see was a mass of people from all corners of the world, eyes lit up, gears turning in their heads. That, to me, is FIRST in action. - Jessica Boucher [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 04-02-2005, 08:25
Jatheon4316's Avatar
Jatheon4316 Jatheon4316 is offline
Registered User
AKA: Jason
None #0500
Team Role: Programmer
 
Join Date: Jan 2005
Location: RI
Posts: 9
Jatheon4316 can only hope to improve
Send a message via AIM to Jatheon4316
Post Number Variables Gone Bezerk!

My team has run into a little difficulty....

Whenever we try to use floats, longs, doubles, or anything else besides integers...our robot does all kinds of weird things it shouldn't be doing...

As long as we use int's, our coding runs the way it should...however, it would be very nice if we didn't have to round everything of to an integer!

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  #2   Spotlight this post!  
Unread 04-02-2005, 08:45
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Number Variables Gone Bezerk!

Please read this thread.
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #3   Spotlight this post!  
Unread 04-02-2005, 12:48
prograid's Avatar
prograid prograid is offline
Registered User
AKA: Ben Cherian
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2004
Location: San Jose
Posts: 80
prograid will become famous soon enough
Re: Number Variables Gone Bezerk!

Quote:
Originally Posted by Mike Betts
Please read this thread.
That thread is about floatingpoint operations. I don't think it applies to longs and stuff.

In reply, to the first post, It may be possible that you are running out of memory because of using too many floats, longs, doubles, etc. Can you use chars? If not then something is really wrong, because your pwms are chars.
  #4   Spotlight this post!  
Unread 04-02-2005, 13:08
Jatheon4316's Avatar
Jatheon4316 Jatheon4316 is offline
Registered User
AKA: Jason
None #0500
Team Role: Programmer
 
Join Date: Jan 2005
Location: RI
Posts: 9
Jatheon4316 can only hope to improve
Send a message via AIM to Jatheon4316
Re: Number Variables Gone Bezerk!

When we tried to use ints (to print the joystick's x and y axis values onscreen) we had nothing but the default code and those few lines! ---Later though I realized that we were putting "%i" in the printf statements, only "%d"s are supported!

The other times we've had problems so far also have been with the default code and only a few extra variables...

Note: We're using the team robot from last year (2004) to test our coding on...could some kind of conflict (between 05 MPLAB+default code and the 2004 robot) be causing the trouble? The idea of doing trig functions and accurate autonomous navigation with only ints and chars is not very nice...
  #5   Spotlight this post!  
Unread 04-02-2005, 13:28
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Number Variables Gone Bezerk!

Quote:
Originally Posted by Jatheon4316
The idea of doing trig functions and accurate autonomous navigation with only ints and chars is not very nice...
One word: CORDIC.
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
Need help with Variables ? David Bryan Programming 5 23-02-2004 07:42
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
team number... Ken Leung Chit-Chat 39 28-09-2003 14:36
VB Program to monitor robot variables DanL Programming 7 15-02-2002 22:35
WASH scouting fields Mike Soukup Scouting 0 04-02-2002 02:39


All times are GMT -5. The time now is 19:17.

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