Go to Post Once you go hex you'll never go back. - sdcantrell56 [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 29-01-2005, 19:06
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: printf problem

Ok so I am having the SAME problem. I can't see if my float calculations are working or not. Did you see the README in the IFI released camera code:

Code:
www.InnovationFirst.com

1/8/2004
-   Removed printf_lib.c and printf_lib.h - now using <stdio.h>, compiler needs -nw=2066 to suppress warnings
-   Added user_camera.c and user_camera.h - to remove code from build -> remove the _USE_CMU_CAMERA macro
-   Replaced file named PicSerialDrv with user_serialdrv
-   Note:  when using a 'printf' use a '\r' rather than a '\n' with the new compiler (v2.4)

So I am not using print_f.lib. I am using stdio.h. I am doing the same thing as
miketwalker but I don't get anything to the screen while trying to use floats.

Has anyone else got any input? I am using MPLAB, not CBOT, and the new 2.4 version complier....

I spent all day wondering if our float calculations are actually working.

Is float supported in this PIC?

Can I even do a calculation like this?

If WHEELBASE = 485.35 mm?

Code:
pos_mm_theta = (pos_mm_Left_Encoder_Count - pos_mm_Right_Encoder_Count)/WHEELBASE;
posx_mm = pos_mm_distance * sin(pos_mm_theta);
posy_mm = pos_mm_distance * cos(pos_mm_theta);



Quote:
Originally Posted by Astronouth7303
If you're using the new compiler, I believe the printf() included in that works with floats (check the documentation in .\mcc18\doc).
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
 


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
Programming Problem: Extremely Frustrating chantilly_team Programming 19 12-02-2005 23:00
printf problem cbolin Programming 4 09-11-2004 02:44
Anyone with a replacement Printf? Larry Barello Programming 5 19-03-2004 02:20
The problem with scouting... archiver 2001 10 23-06-2002 23:49
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44


All times are GMT -5. The time now is 12:26.

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