mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[commands] Test no-op behavior of scheduling a scheduled command (#4806)
This commit is contained in:
@@ -119,9 +119,8 @@ void CommandScheduler::Schedule(Command* command) {
|
||||
|
||||
RequireUngrouped(command);
|
||||
|
||||
if (m_impl->disabled ||
|
||||
(frc::RobotState::IsDisabled() && !command->RunsWhenDisabled()) ||
|
||||
m_impl->scheduledCommands.contains(command)) {
|
||||
if (m_impl->disabled || m_impl->scheduledCommands.contains(command) ||
|
||||
(frc::RobotState::IsDisabled() && !command->RunsWhenDisabled())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user