Hello,
I am trying to set up a set of selectable auto modes via a chooser on the SmartDashboard. I have all the code working, with the chooser sending a value to the robot, which selects the auto based on whatever value was chosen. However, I have found that if the dashboard is restarted after the first time the code was run, the Chooser will disappear from the dashboard, and only come back when you create a new dashboard layout- never from loading a saved layout.
Is there anything wrong with what I am doing here?
def robotInit(self):
self.chooser = wp.SendableChooser()
self.chooser.addDefault("None", 4)
self.chooser.addObject("Auto1", 1)
self.chooser.addObject("Auto2", 2)
self.chooser.addObject("Auto3", 3)
wp.SmartDashboard.putData("Choice", self.chooser)