A team I mentor ran into a situation today with none of their OpModes showing up in the selector list on the Driver Station. Through the process of elimination (and the help of logcat), I was able to isolate the cause: there's a 256 character maximum size for the names of all of the OpMode's that are displayed in the drop-down list on the driver station. The specific output in logcat was:
If you find that you have a lot of OpModes and suddenly your DS doesn't display any of them but you have no other errors anywhere, check to make sure your names aren't too long and/or shorten some names by removing underscores or spaces you might have in their names.
I hope this saves someone some troubleshooting time!
-- Gordon.
Code:
10-24 17:13:50.761 I/FIRST (19575): Processing Command: CMD_REQUEST_OP_MODE_LIST 10-24 17:13:50.761 E/RobotCore(19575): Event loop threw an exception while processing a command 10-24 17:13:50.761 E/RobotCore(19575): java.lang.IllegalArgumentException: command extra data length is too long (MAX: 256) 10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.robocol.Command.<init>(SourceFile:90) 10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.ftccommon.FtcEventLoop.b(SourceFile:183) 10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.ftccommon.FtcEventLoop.processCommand(SourceFile:161) 10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.eventloop.EventLoopManager.d(SourceFile:652) 10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.eventloop.EventLoopManager.d(SourceFile:60) 10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.eventloop.EventLoopManager$c.run(SourceFile:171) 10-24 17:13:50.771 E/RobotCore(19575): java.lang.Thread.run(Thread.java:841)
I hope this saves someone some troubleshooting time!
-- Gordon.
Comment