[commands] Deprecate Command.schedule() (#7072)

It's only syntactic sugar over the CommandScheduler's schedule method and creates a footgun because it’s too obvious to try to use in incorrect places.

Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
This commit is contained in:
Gold856
2025-07-02 16:46:59 -04:00
committed by GitHub
parent a3ce880334
commit 26771e38fb
42 changed files with 77 additions and 66 deletions

View File

@@ -26,7 +26,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_robot.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}