|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
"Code Error" with RegisterRepeatingTimer
We have tried using the sample code provided here (replacing the IFI Vex headers with FRC controller headers).
However, this code triggers a code error on our RC. Basically, the printf("_____________________\r\r"); line executes several times, then is interrupted for 3-5 seconds, then repeats, and IR input does nothing at all. After a few repetitions, the CODE ERROR light comes on. (This is all in autonomous mode). After commenting out EVERYTHING inside the CheckIR function (leaving only void CheckIR(void) { } ), and commenting out the IR processing code (but leaving printf("_____________________\r\r"); inside the while loop) ), this problem still happens. We are using the latest version of WPILib on a 2008 RC. Also, there are no compile-time warnings or errors. |
|
#2
|
|||
|
|||
|
Re: "Code Error" with RegisterRepeatingTimer
You don't want to be printing from within the CheckIR function. Since that is an interrupt service routine, there might be problems doing long operations like that. I could imagine printing causing the code error to occur. Otherwise, I'm not sure what is going on without more information.
Also, there were a few problems with the whole program that some people were able to find and correct so be sure to read all the comments in the thread. |
|
#3
|
|||
|
|||
|
Re: "Code Error" with RegisterRepeatingTimer
Quote:
Quote:
Quote:
Thank you. |
|
#4
|
|||
|
|||
|
Re: "Code Error" with RegisterRepeatingTimer
I have partially resolved this problem. It only happens when "Code Model" under "Memory Model" under MPLAB C18 compiler options is set to "Large Code Model (>64K)".
Is this expected behavior? |
|
#5
|
|||
|
|||
|
Re: "Code Error" with RegisterRepeatingTimer
This sounds very familiar. We were having repeated problems (I don't recall the specifics now) using the Camera-related functions in WPILIB. After lots of frustration, we tried switching the memory model from large to small. Doing so suddenly resolved the problems we were having!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Congratulations is spelled with a "T" and not a "D"!! | Elgin Clock | Thanks and/or Congrats | 55 | 03-09-2007 01:24 PM |
| Screenshot of "code not understood" or similar error needed! | Elgin Clock | Programming | 3 | 02-17-2006 10:06 PM |
| Code Errors With "Bells and Whistles" | Ryan O | Programming | 2 | 01-31-2006 07:29 PM |
| Code error on RC after downloading "bells and whistles" version of Kevins camera code | DanDon | Programming | 6 | 01-10-2006 06:07 PM |
| How "bad" are motors with "bad" stickers? | cooknl | Kit & Additional Hardware | 20 | 01-12-2005 10:33 AM |