From 80f3dd0b91c8646c243a59db1f17ae4d4cfffcc9 Mon Sep 17 00:00:00 2001 From: Reece Holmdahl <3149587+reecelikesramen@users.noreply.github.com> Date: Fri, 11 Apr 2025 00:03:50 -0500 Subject: [PATCH] Fix isFinished in sequentialcommandgroup.py - isFinished is false after command is finished See allwpilib#7901 [here](https://github.com/wpilibsuite/allwpilib/pull/7901) --- commands2/sequentialcommandgroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands2/sequentialcommandgroup.py b/commands2/sequentialcommandgroup.py index e7ecbf78..256b0796 100644 --- a/commands2/sequentialcommandgroup.py +++ b/commands2/sequentialcommandgroup.py @@ -86,7 +86,7 @@ def end(self, interrupted: bool): self._currentCommandIndex = -1 def isFinished(self) -> bool: - return self._currentCommandIndex == len(self._commands) + return self._currentCommandIndex == len(self._commands) or self._currentCommandIndex == -1 def runsWhenDisabled(self) -> bool: return self._runsWhenDisabled