As demonstrated in 2022, some groups might want to run motors in a more complex way, which doesn't allow to add a stop call when to a specific action.
One option is to allow a special interruption callable to be added to ActionGroup. This callable will run on the end of said group if wasInterrupted is true.
So, for example:
new SomeAction()
.andThen(new AnotherAction())
.alongWith(new ActionAction)
.whenInterrupted(()-> someSystem.stop())
.start();
Open a branch from development and work on it.
Remember that there are several ActionGroup types:
As demonstrated in 2022, some groups might want to run motors in a more complex way, which doesn't allow to add a
stop
call when to a specific action.One option is to allow a special interruption callable to be added to
ActionGroup
. This callable will run on theend
of said group ifwasInterrupted
istrue
.So, for example:
Open a branch from
development
and work on it.Remember that there are several
ActionGroup
types:SequentialActionGroup
ParallelActionGroup
ParallelRaceGroup