View Full Version : printf statements do not display in autonomous mode
PVC Pirates
21-02-2005, 22:56
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
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
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
If you are using the printf that came with the new compiler you will need:
#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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.