![]() |
"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. |
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. |
Re: "Code Error" with RegisterRepeatingTimer
Quote:
Quote:
Quote:
Thank you. |
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? |
Re: "Code Error" with RegisterRepeatingTimer
Quote:
|
| All times are GMT -5. The time now is 14:08. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi