Working on alternate ideas while doing the whole reprogramming the robot in C++.
The robot works fine until I press the kick/fire button, upon which the cRIO “crashes”. Nothing happens, DS says “Watchdog Not Fed”. Using NetConsole, I could see that the cRIO clearly crashed, but now it’s not saying anything for some reason.
I reimaged the cRIO to see if that would fix it, but nope. Though it now says the evil errors:
data access
Exception current instruction address: 0x0215bf40
Machine Status Register: 0x0000b02
Data Access Register: 0x05000060
Condition Register: 0x42000242
Data storage interrupt Register: 0x40000000
Task: 0xe63170 "FRC_RobotTask"
0xe63170 (FRC_RobotTask): task 0xe96170 has had a failure and has been stopped.
0xe63170 (FRC_RobotTask): fatal kernel task-level exception!
If I comment out line #71 in Kicker.cpp and then push the fire/arm button, the robot stops doing what it does, the DS indicates “Watchdog Not Fed” and nothing else is printed from NetConsole (not even disabled printf’s).
I want to say it has something to do with the rollerEncoder because I’m not getting any data from it. Dad hasn’t hooked up the scope yet to tell for sure though.
Can you put printfs every few lines to narrow down the location of the crash?
Oh and we have dead encoders on our bot and nothing went wrong when we tried to use them. Unless you’re encoders are somehow causing NULLs, you should be fine
Also, when looking at your code, I noticed that you call Kicker::Act in autonomous, which looks at joystick buttons. The DS will send whatever data was on the DS at the beginning of Autonomous, so if one of the control buttons are pressed when auton enables your kicker code will follow it
In my experience, the most common source of those symptoms (crash, “Watchdog Not Fed” message) is when your code tries to dereference a null pointer. I’d suggest doing a quick check to make sure you’re creating all the objects you are using.