When one of the commands in or program it afterwards returns to the command. How can we force a command to stop after being interrupted?
Is the first command a subsystem’s “default” command? In that case, another command that requires the subsystem will interrupt the default command, but then the default command will later be rescheduled after the subsystem is no longer required.
If we aren’t talking about default commands, then I’m not sure how an interrupted command would spontaneously restart.
The first command is not the default and it is also resuming at its previous location
If it helps we have used print statements to check and if the code is not interrupted it will finish as expected
Put an end(); statement under interrupted();
What would this look like?
The issue was fixed.
Solution:
Add reqires(____);