Go to Post Super Bowl, P-Diddy, Diet Pepsi. Super Bowl of Smarts, Dave Lavery, Diet Coke. - Gary Dillard [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 05-02-2005, 12:23
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Cannot access "double" values

We are having problems with using double or float values.
We have installed the new compiler(version 2.40). But still cannot use doubles in it. When we tried to write : double x = 0.75; it gives us compile error. Also we cannot print float or doubles through printf(). We dont know what to do.
Any help is appreciated.

Team 612
  #2   Spotlight this post!  
Unread 05-02-2005, 12:44
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Cannot access "double" values

Could you give us the actual error when you try to compile? Also, I don't think that this printf function supports floating-point variables. I have never been able to print floating point variables (without scaling them and casting them as integers), and I seem to remember someone else saying it couldn't be done.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #3   Spotlight this post!  
Unread 05-02-2005, 15:10
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cannot access "double" values

I can use
double f=9.9;
without any trouble.

This Microchip implementation of printf doesn't support the printing of floats, but you can easily print them on
your own.

Code:
#define ACCURACY 1000 //How many decimal places are important to you
 
void PrintFloat(float value)
{
	long i, i2; // Don't need to be longs if you only need a few significant digits
 
	/* Separate the whole number from the fraction and print each of them */
 
	i = (long) value;
	i2 = (long) ((value-i)*ACCURACY); // You can get fancy and round by adding .5
 
	printf(" %d.%03d \r", (int)i, (int)i2); //e.g., "234.078"
}
(Been there, did this a few days ago on http://www.chiefdelphi.com/forums/sh...489#post328489)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 05-02-2005 at 22:21. Reason: Loose use of the term "printf" caused confusion
  #4   Spotlight this post!  
Unread 05-02-2005, 18:01
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Cannot access "double" values

Unless I'm mistaken, u can print floats like this:
Quote:
float x;
x=5.999;
printf("%f", x);
This has worked for me on my desktop, but i haven't tested it on the robot yet. I'm going to be testing it on monday, I'll post my results then.

Dan
Team 375
  #5   Spotlight this post!  
Unread 05-02-2005, 19:32
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Cannot access "double" values

Quote:
Originally Posted by dhoizner
This has worked for me on my desktop, but i haven't tested it on the robot yet.
Yes, with a normal C compiler, it's no problem. However, %f doesn't work in the C18 compiler. I don't know the reasoning, but the general consensus (and my own experience) indicates that it doesn't.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #6   Spotlight this post!  
Unread 05-02-2005, 19:56
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: Cannot access "double" values

OK, let's be clear here. "printf" is not a C function. C does not define any I/O. It is written by you.

Now, IFI, Keven Watson and others have been gracious in providing you with a couple of examples as to how to accomplish this. You have the source code for whichever printf you are trying to use. If you feel the (IMHO: insane, stupid and ignorant) need to use a float or double, change printf to suit your own needs.

Mike

Post Script: Sorry for the rant but this stuff is getting really tiresome...
__________________
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...
  #7   Spotlight this post!  
Unread 05-02-2005, 21:20
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Cannot access "double" values

Quote:
Originally Posted by Mike Betts
OK, let's be clear here. "printf" is not a C function. C does not define any I/O. It is written by you.

Now, IFI, Keven Watson and others have been gracious in providing you with a couple of examples as to how to accomplish this. You have the source code for whichever printf you are trying to use. If you feel the (IMHO: insane, stupid and ignorant) need to use a float or double, change printf to suit your own needs.

Mike

Post Script: Sorry for the rant but this stuff is getting really tiresome...
With all due respect, take a breath, Mike. The original poster observed a problem, that:
Quote:
Originally Posted by chantilly_team
we cannot print float or doubles through printf()
Mark McLeod and I confirmed that you can't do this with the I/O libraries provided with the C18 compiler. Mark went so far as to suggest a simple solution for being able to output floating-point numbers. Nobody was complaining. Nobody wanted to argue what abilities are inherent to C, or what actually comes from libraries. Nobody wanted to rehash the "INTEGERS FOREVER WOOO!!!1" discussion. The question has been answered... there's no need to rant. If people asking questions has become tiresome for you, maybe you need a break from CD or something. Making newbies feel dumb is pointless.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #8   Spotlight this post!  
Unread 05-02-2005, 22:31
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: Cannot access "double" values

Quote:
Originally Posted by jgannon
With all due respect, take a breath, Mike. The original poster observed a problem, that:

Mark McLeod and I confirmed that you can't do this with the I/O libraries provided with the C18 compiler. Mark went so far as to suggest a simple solution for being able to output floating-point numbers. Nobody was complaining. Nobody wanted to argue what abilities are inherent to C, or what actually comes from libraries. Nobody wanted to rehash the "INTEGERS FOREVER WOOO!!!1" discussion. The question has been answered... there's no need to rant. If people asking questions has become tiresome for you, maybe you need a break from CD or something. Making newbies feel dumb is pointless.
Joey,

You are correct, of course. However, I must inquire: If someone does not read the information presented, should we help at all?

But I must point out that printf is not a "library" function or inherent to C. It is defined (in the default code V2.4) in printf_lib.c (maybe a poor choice of file names) and supports %d, %x, %X, %u, %l and %b formats. All are integer formats (and, IMHO, for a reason, but I'll avoid the "INTEGERS FOREVER WOOO!!!1" rehash).

My issue is that people are not even looking at the code they are given.

I can understand (begrudgilngly) questioning libraries where you have no view of the source code. But to complain about source code that YOU have control over...

I would ask you... How many threads have started with "The printf routine does not ..." or "the default code will not..." or My camera does not..."?

Too many people are looking for "plug and play" code... They need to realize that, in the real world, it just does not exist. In the real world, we have no IFI or Kevin Watson to give us exquisite examples of embedded programming... What we have are spec sheets, manuals and application notes... And with this, we manage to send robots to distant planets and the bottom of the ocean...

I'm sorry... I'm tired and... Maybe you are right.... Maybe I should not be posting in this state... Still, I hope that "the light" is going on in at least one mind out there...

Regards,

Mike
__________________
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...
  #9   Spotlight this post!  
Unread 05-02-2005, 22:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cannot access "double" values

There is some additional confusion here in that printf in the new 2.4 version of the compiler is now an available library function. It's provided in the mcc18 clib.lib. It's recommended by FIRST that programmers remove the old printf_lib files from their projects to take advantage of the more efficient implementation (fewer calories/less filling of program space).

That said, I have to agree with Mike that it's always a good idea to read the available documentation on any software/compiler/development environment/etc. You are only handicapping yourself by not doing so. There are always implementation oddities/quirks/limitations that programmers must make themselves aware of. How long did you beat your head against the wall trying to figure out why your code wasn't working? In the case of the new C18 printf that's to be found in the manual that came with the compiler describing the C18 libraries.

New programmers have a particular challenge with the somewhat overabundence of software implementations available this year. We have three different default versions for the FRC released by FIRST this year. While that's great for the intermediate programmers and certainly helps to stretch their programming "muscle," it can make it more difficult for a newbie to sort through the documentation/headers/code for each of these versions to decide what to use/combine and what to ignore/disgard. It'll be much easier after all this has had time to settle a little bit and we all get through this somewhat transitional stage in the evolution of FIRST software.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 05-02-2005 at 23:36.
  #10   Spotlight this post!  
Unread 05-02-2005, 23:05
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: Cannot access "double" values

Quote:
Originally Posted by Mark McLeod
...How long did you beat your head against the wall trying to figure out why your code wasn't working? In the case of the new C18 printf that's to be found in the manual that came with the compiler describing the C18 libraries.
I hardly have a dent... I'm using a slightly modified version of Kevin's original "serial_ports.c" and not the C18 libraries.

For embedded applications, I've written my own printf since I ported Unix V to a 68020 back in '86.

I guess I'm a control freak...

Regards,
__________________
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...
  #11   Spotlight this post!  
Unread 05-02-2005, 23:09
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: Cannot access "double" values

Quote:
Originally Posted by Mark McLeod
...It's recommended by FIRST that programmers remove the old printf_lib files from their projects to take advantage of the more efficient implementation (fewer calories/less filling of program space)...
Mark,

I'd be very interested where you read/heard that...

Mike
__________________
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...
  #12   Spotlight this post!  
Unread 05-02-2005, 23:20
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Cannot access "double" values

Quote:
Originally Posted by Mike Betts
However, I must inquire: If someone does not read the information presented, should we help at all?
If you've read through the FIRST Q&A, you've seen that maybe 90% of the questions are answered either in the manual or in another previously-asked question. Nonetheless, somebody at FIRST takes the time to sit down and answer them all, to make sure that everyone understands that which they desire to know. Would it be better if everybody read the whole manual, and looked through all the source code? Of course. But, as long as we're here, oughtn't we help those who don't? We could try to teach them a lesson ("READ THE MANUAL OMG NOOB"), or we can give them a solution. Mark McLeod's post in this thread is an excellent example; he provided a solution. I won't hesitate to remind people to "search before your post", but at the same time, it doesn't hurt to explain why their compiler can't find adc.h, or why they can't compile code that they're keeping on their desktop.
Quote:
Originally Posted by Mike Betts
[printf] is defined (in the default code V2.4) in printf_lib.c (maybe a poor choice of file names) and supports %d, %x, %X, %u, %l and %b formats. All are integer formats
This is an excellent piece of information for this thread... though it isn't a solution, it explains why chantilly_team is encountering this problem.
Quote:
Originally Posted by Mike Betts
My issue is that people are not even looking at the code they are given.

I can understand (begrudgilngly) questioning libraries where you have no view of the source code. But to complain about source code that YOU have control over...
I see no complaints from chantilly_team with regard to IFI's implementation of printf... am I missing something? It looks like just a question to me. "IFI wrote crappy CMU camera code" is a complaint. Don't like it? Rewrite it yourself. "I can't get the IFI-provided camera code to lock onto a tetra. How can I make it work?" is a question. Since these resources are available, let's help people learn how to use them in the ways that they want (a la Mark McLeod's post).
Quote:
Originally Posted by Mike Betts
Too many people are looking for "plug and play" code... They need to realize that, in the real world, it just does not exist. In the real world, we have no IFI or Kevin Watson to give us exquisite examples of embedded programming... What we have are spec sheets, manuals and application notes... And with this, we manage to send robots to distant planets and the bottom of the ocean...
Amen. Nonetheless, guiding people in the right direction can't hurt. I'm sure that someone at NASA has pointed out something that Dave Lavery overlooked in a spec sheet or manual.
Quote:
Originally Posted by Mike Betts
I'm sorry... I'm tired and... Maybe you are right.... Maybe I should not be posting in this state...
Build season wears us all down, but when we get to Atlanta, everything regenerates, because we've been inspired.

Just the observations of a FIRSTer who has asked no shortage of stupid questions, but still ended up having my life changed by this program.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #13   Spotlight this post!  
Unread 05-02-2005, 23:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Cannot access "double" values

Quote:
Originally Posted by Mike Betts
Mark,

I'd be very interested where you read/heard that...

Mike
In the morning I promise I'll look up the reference and pass it along. It's past my bedtime. (need a sleepy emoticon)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #14   Spotlight this post!  
Unread 06-02-2005, 12:16
chantilly_team chantilly_team is offline
Registered User
#0612
 
Join Date: Oct 2004
Location: Virginia
Posts: 28
chantilly_team is an unknown quantity at this point
Re: Cannot access "double" values

ok, We got the problem solved. We can now use double and float values. But they have to be declared on the top, that is, they should be global varibles and they dont work in the sub-routines. (thats what we discovered). We can now use tan functions and inverse tan functions. But the process is very very time-consuming and slow. We fear that the processor might just get crashed in real time. So instead we are converting everything into a pre-made table and use the table to get the tan and inverse tan values. That is a lot faster and we would recommend using it that way. Thanks for your help though.

Team 612.
  #15   Spotlight this post!  
Unread 06-02-2005, 13:39
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Cannot access "double" values

Quote:
Originally Posted by chantilly_team
We can now use tan functions and inverse tan functions. But the process is very very time-consuming and slow. We fear that the processor might just get crashed in real time.
This is what Mike was hinting at, of why it's not a particularly good idea to use floating-point variables on embedded systems.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
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
Acceleration Sensor Connected, but values are odd.... Leav Electrical 7 04-02-2005 15:28
trentonDrive.c: our joystick/wheel drive code gnormhurst Programming 16 03-02-2005 14:40
Good book to learn MS Access from? Elgin Clock Math and Science 2 05-10-2004 20:20
A testimony to my unique FIRST experience: Ken Leung General Forum 22 14-04-2004 20:45
Access Database help... kacz100 Scouting 12 18-03-2004 19:18


All times are GMT -5. The time now is 00:03.

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