|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Robot deletes robot code after disabling it
Hey there again!
I am running a command based robot. When I enable it for teleop mode, everything works perfectly. If I disable the robot, and then attempt to re-enable it, the roborio stops comms with the driver station and deletes the code off the roborio. i have to either reset the robot code from the DS every time I disable it before re-enabling it, or let it crash and reboot the roborio and reupload the code. Any reason for this? Thanks! -Eric |
|
#2
|
||||
|
||||
|
Re: Robot deletes robot code after disabling it
Are you sure it's actually deleting the code, or rather crashing? If the code crashes fatally, the "robot code" status light on the DS will be red. For example, if you have a method that causes your code to not boot up again afterwards, it would appear that the code has deleted itself. We've had some issues where the console in the DS doesn't actually show the crash errors, so try going into the RIO log through eclipse and seeing if they have any error messages, or SSHing into the RIO to see if the executable is located there as well.
|
|
#3
|
|||
|
|||
|
Re: Robot deletes robot code after disabling it
Quote:
*PS: I've noticed that it's only when re-enabling a mode that has already started. If I start teleop, then disable it, then run autonomous, it will not crash until I enable either one again. |
|
#4
|
||||||
|
||||||
|
Re: Robot deletes robot code after disabling it
This would be easier to debug if you posted your code. I suspect you are initializing hardware in telopInit and autonomousInit or in a default command for a subsystem, which would cause it to be overallocated the second time you enter that mode and crash.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|