Use Joystick in Test Mode

In Java after enabling test mode it doesn’t seem like any of the joystick controls work like teleop. How do we enable them?

Upon entering test mode, live window is activated which allows direct control of motors through Shuffleboard/Smart Dashboard. Because of that, all active commands are canceled and the scheduler is disabled. However, there isn’t anything that I’m aware of that stops joysticks.

1 Like

I confirmed that in test mode we can move other motors via shuffleboard but we cannot move any of our Drive or other motors using the exact same controls as in telop seconds before!

Here is our code

As Joe stated, in test mode all active commands are canceled and the scheduler is disabled. Thus default commands such as those you might have for teleop driving are also cancelled and do not run in test mode.

Note you can easily test functionality in teleop mode too by adding commands there.

Similar to the Everybot our climber winds up in one direction and after the match in the pit needs to be reset (wound in the other direction). My goal was to still make the climber only go in the one direction during teleop but make it so that in the pit they could just switch to test mode and use the controller to drive it backwards. I want there to be no possibility that they accidentally leave something on and would drive it backwards during teleop.

Is there a better way to do this if not in test mode? Ideas? So even if I add those default commands to like test init or something they won’t work because the scheduler is disabled?

There’s some different options here. You could put a setting on the dashboard that only activates the command when the dashboard setting is activated. Or you could put the command on a joystick that’s only plugged in in the pits, although that might generate joystick unplugged warnings.

You could also create a command and put it on the dashboard but not bind it to any button. You could click the command in the dashboard to run it.

I think what he wants here is a test mode for non-match operation so he can drive the climbing mechanism in reverse without risking someone not swapping it back.

I ended up making a button in shuffleboard that could toggle it but automatically setting that back at the beginning of teleop

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.