|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Intermittent Code Error
Every once in a while, (0-1 times per match) our robot disables itself and the code error light comes on... requiring the drivers to push robot reset to clear the error and continue playing. This has happened on more than one RC, so it probably is a problem with the code.
Now... this happened at a regional and the IFI representative there informed me that his scanner picked up an "Invalid CONTROL or CURRENT_MODE byte" error. Looking at the code... the control and current_mode bytes are the last two bytes of txdata. However, I am not using them in the code at all... nor am I using the bytes immediately prior to them (essentially ruling out a runover memory leak). This problem is not dehabilitating... but it has been nagging me for a while. Does anyone have any ideas/theories as to why this may be happening? Thanks, Plloyd |
|
#2
|
|||||
|
|||||
|
Re: Intermittent Code Error
You should try re-installing your firmware, do you have version 10? (They should've checked to made sure at the regionals, but they might not have)
|
|
#3
|
||||
|
||||
|
Re: Intermittent Code Error
Hey Plloyd,
Can you describe when this actually happens in the game? We had a similar problem for a couple of practice matches in which we had blocked out our autonomous mode, so sometimes when the went from auton to user-controlled mode, the code error on the RC would light up and robot was disabled until reset was pressed. It turned out that while blocking out the auton mode we had blocked out the entire code including the getrxdata and putrxdata commands which lead to the error. As soon as they were put in the problem stopped. Hope this helps, if you could describe your problem and your code in more detail it would be great. Take it easy, Vivek. |
|
#4
|
||||||
|
||||||
|
Re: Intermittent Code Error
Did you make any changes to the serial communication portions of the default code? This can cause your controller to hang up.
|
|
#5
|
|||
|
|||
|
Re: Intermittent Code Error
Unfortunately, I have not been able to pinpoint a specific action which causes the code error (or makes it more likely to occur)... but for the most part the robot performs and operates perfectly.
I am using firmware version 10 and have not modified any of the write protected files in the default code (that includes the serial communication functions)... but I am using hall effect sensors (basically just kevin watson's encoder code), and a gyro (again, kevin watson's). Any help is appreciated. Thanks, -Plloyd |
|
#6
|
||||
|
||||
|
Re: Intermittent Code Error
This has happened to me. I suspect that it is as a result of the main loop taking too long to execute (because of the interrupts...). It is just a speculation, but it may be correct.
|
|
#7
|
||||
|
||||
|
Re: Intermittent Code Error
Quote:
-Kevin |
|
#8
|
||||
|
||||
|
Re: Intermittent Code Error
We had the same problem our first regional and it was more of a hassle than anything (we have a gyro that takes a few seconds to recal everytime the robot resets). The IFI Rep gave us the same feedback as you as to what it was showing. It was occuring at various points in the match too (auto, switch from auto to operator mode, during operator mode). In the end it ended up being what Joel was saying above and it was a problem with the interrupts and how many times per second they were being called (I'm not programmer, so my guys can correct me if I'm wrong).
We just modified that and we have not had an issue with it since (knock on wood). |
|
#9
|
|||
|
|||
|
Re: Intermittent Code Error
I believe we are running the gyro at 400Hz, and the hall effects can trigger up to 20 interrupts per cycle (total). Does that sound excessive?
I had also thought that the code may be taking too long to execute (since the code error light is supposed to indicate an infinite loop), but I dont think that we have had any code errors during autonomous mode... which has a lot more calculations to go through than our default routine. Does anyone have any ideas that could explain this? As for when this happens during the match, I honestly dont know. I will definitely be asking the drivers and coach more questions next time I see them. Thanks for all the responses... this has been really helpful. Thanks, Pete |
|
#10
|
|||||
|
|||||
|
Re: Intermittent Code Error
If you don't need the Hall Effects while running manual mode, your could turn the interrupts off in Default_Routine
Thanks, Eric |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| Error w/ FRC code | JamesBrown | Programming | 2 | 08-01-2005 16:17 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| C++ Code Error? | Adam Shapiro | Programming | 9 | 20-01-2003 13:24 |