|
Re: Problem with printf()
I'd like to thank everyone again for their help.
Here's how we solved it:
There was a lot of code not working in addition to the printf(). However, I discovered some printf()s that were actually working, in a different section of the code.
It turns out that we had to have the operator interface plugged in for that code to work. We scratched our heads for awhile about this and came to the conclusion (one of us finally remembered) that without a connection to the OI, the watchdog processor must set all PWMs & Relays to 127 & 0, respectively.
Upon further investigation and testing, we think that with no connection to the OI, the process_data_from_master_up() function never gets called from main.c
However, once a connection with the OI has been established and then lost, the RC keeps printing whatever it should have been printing before the connection to the OI was lost.
The reason we took so long to hook the OI up was that we were under the assumption that we had had this code working and printing before without an OI connection in the past. We now believe that perhaps we did have a connection to the OI at the time we were testing, but simply didn't remember that we hooked it up.
This thread has still yielded some good advice. I was not aware that putting commands before all vars were declared was incorrect, and I now have a couple things to try when my printf()s stop working in the future.
Again, thank you everyone for your help.
__________________
"Time is an illusion, lunchtime doubly so."
-Douglas Adams
“Why is it that I can walk into Wal-Mart and buy boxes of bullets and black powder, but I can’t buy potassium perchlorate to do science because it can also be used to make explosives?”
-Theodore Gray
|