Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   printf statements do not display in autonomous mode (http://www.chiefdelphi.com/forums/showthread.php?t=35189)

PVC Pirates 21-02-2005 22:56

printf statements do not display in autonomous mode
 
When I try to use a printf statement in the autonomous code, nothing displays on the console on the computer that is connected to the RC. I don't know why the printf statements don't work, but the autonomous code doesn't entirely work correctly either. Is it possible that the two problems are related? Even if they are unrelated, I need the printf statements to help me fix the problem.

Any insight into this problem would be appreciated.

neilsonster 21-02-2005 23:04

Re: printf statements do not display in autonomous mode
 
Quote:

Originally Posted by PVC Pirates
When I try to use a printf statement in the autonomous code, nothing displays on the console on the computer that is connected to the RC. I don't know why the printf statements don't work, but the autonomous code doesn't entirely work correctly either. Is it possible that the two problems are related? Even if they are unrelated, I need the printf statements to help me fix the problem.

Any insight into this problem would be appreciated.


Well this might be obvious but have you #included printf_lib.h in user_routines_fast? and are you giving the commands in the while (autonomous_mode) (or whatever it is) loop? I'm not sure what else could be wrong.. sorry :/.

probizzle 22-02-2005 00:41

Re: printf statements do not display in autonomous mode
 
Make sure Initialize_Serial_Comms or Serial_Driver_Initialized is called before any printfs...

dunno if that's the error

Mark McLeod 22-02-2005 15:41

Re: printf statements do not display in autonomous mode
 
If you are using the printf that came with the new compiler you will need:
Code:

#include <stdio.h>
in every file you want to use printfs, such as user_routines_fast.c, or else you will neither compile error, nor any printout.


All times are GMT -5. The time now is 01:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi