Code to reset task

For the past tournament we went to, our robot had a few motors stall during the match. We turned on and off the joysticks and that worked fine but took up half the match.
Is there any code that can be used to reset the user control task during the competition?

When your motors stall it’s normally nothing to do with programming. Instead it is to do with a PTC component that prevents damage to your motors/cortex by limiting the maximum current to the motor. The motors will cut out if excess stress is put on them. Long term try and reduce the stress on the motors but if the motors cut out in a match just stop powering them wait 5 seconds and then power them again.

If @Download Complete 's analysis is correct (and I agree with his assessment), then it wasn’t turning the joysticks on & off that did the trick to get your robot going. It was the TIME it took for you to do that. During that time the motors had a chance to cool down & return to functionality.

See my comment & explanation from just now in this other motor overload thread.