View Single Post
  #4   Spotlight this post!  
Unread 17-03-2005, 01:36
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Printf Oddity : Programming Challange

Quote:
Originally Posted by scitobor 617
I have a few questions.
1. Are any of the printf's in an interrupt handler?
2. Do u try to access any sensor variables during initialization?
3. Does the program work immediatly after download?
4. Does the contoroller have to be reset for the error to appear?
5. Does the Program State indicator flash red?
6. Do you get any warnings when you compile that do not halt the build?

-Scitobor
1. No
2. We store an arm pot offset during init. Is that a sensor variable?
3. Do you mean does the auto code run? No we have to use a dongle.
4. No
5. No
6. Only stupid "function calls w/o prototype" but those are in default code any way.

Quote:
Originally Posted by ForgottenSalad
What file(s) do you have the autonomous in/spread across, and what exactly did you change?

If it comes to it that you can't figure out what it's doing, I reccomend downloading a new default code file, then re-working your autonomous into it... I know, it's a lot of work to do, but maybe(?) it could be a problem with one of your files...

PS: Also, it could possibly be the compiler? Hate to ask a stupid question, but are you sure you're using the MCC18 compiler v2.4? I don't know if that could cause a problem anyway, but what you have there is strange, so it'd be best to try different things and see what works...


EDIT: I read through it again, I didn't see that you got it working in my first read through. I don't know... I suggest using a program (I think textpad does it - www.textpad.com) to compare each of your files... your custom code to a newly downloaded default... and see what doesn't line up... That'd be my best advice to you as of now. Otherwise, I'm just as confused as you are.
We make a separate .c .h file for autonomous. Many attempts were made to clean this file (not personally by me).

We are using the MCC18 compiler v2.4 but I don't trust it more than its predecessor. I once completely removed an abs function from the code and the old complier decided to apply it to random PWM outputs instead of deleting it.

Realize this is no longer a problem with our code, its a challenge. We simply remove the initialization printf and all others and we are ok (we still include stdio). DarkAlex just want some kind of explanation for this asinine problem that caused him way more frustration than its worth.
Warning: Don't think about this problem for too long, your head will explode!
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"