Go to Post you should see my scout sheet its the bomb diggity - Mirza95vx [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
  #3   Spotlight this post!  
Unread 16-01-2008, 19:02
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: printf causes programs to not run

Quote:
Originally Posted by psy_wombats View Post
The fast loop, I believe, can't support the printf function, simply because it is a very fast loop. The printf takes a lot of time (relaying info through your serial) so the print is being called way too fast for it to finish, and causes the program error.
I've done this successfully (when debugging shaft encoders), but wouldn't recommend it. It's very easy to crash things this way.

Quote:
Should be able to fix by calling only by a timer interrupt, or when a loop count is divisible by fifty, (to call every fiftieth loop or something), or maybe use the slow loop?
This is of course a much better solution.
 


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
Presence of function causes auton to fail??? Kyveck Programming 13 16-02-2006 14:48
printf could not find definition Alex829 Programming 7 27-06-2005 10:04
printf statements do not display in autonomous mode PVC Pirates Programming 3 22-02-2005 15:41
printf isn't printf-ing. Help! Meandmyself Programming 14 15-02-2004 16:27


All times are GMT -5. The time now is 15:14.

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