File tree Expand file tree Collapse file tree 10 files changed +12
-9
lines changed
wpilibNewCommands/src/main
java/edu/wpi/first/wpilibj2/command
native/include/frc2/command
wpilibcExamples/src/main/cpp
DriveDistanceOffboard/cpp
MecanumControllerCommand/cpp
SwerveControllerCommand/cpp Expand file tree Collapse file tree 10 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ public void initSendable(SendableBuilder builder) {
596
596
value -> {
597
597
if (value ) {
598
598
if (!isScheduled ()) {
599
- schedule ();
599
+ CommandScheduler . getInstance (). schedule (this );
600
600
}
601
601
} else {
602
602
if (isScheduled ()) {
Original file line number Diff line number Diff line change @@ -286,7 +286,10 @@ class CommandPtr final {
286
286
287
287
/* *
288
288
* Schedules this command.
289
+ *
290
+ * @deprecated Use CommandScheduler::GetInstance().Schedule() instead
289
291
*/
292
+ [[deprecated(" Use CommandScheduler::GetInstance().Schedule() instead." )]]
290
293
void Schedule () const &;
291
294
292
295
// Prevent calls on a temporary, as the returned pointer would be invalid
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
38
38
m_autonomousCommand = m_container.GetAutonomousCommand ();
39
39
40
40
if (m_autonomousCommand) {
41
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
41
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
42
42
}
43
43
}
44
44
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ void Robot::AutonomousInit() {
47
47
m_autonomousCommand = m_container.GetAutonomousCommand ();
48
48
49
49
if (m_autonomousCommand != nullptr ) {
50
- m_autonomousCommand-> Schedule ();
50
+ frc2::CommandScheduler::GetInstance (). Schedule (m_autonomousCommand );
51
51
}
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
38
38
m_autonomousCommand = m_container.GetAutonomousCommand ();
39
39
40
40
if (m_autonomousCommand) {
41
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
41
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
42
42
}
43
43
}
44
44
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ void Robot::AutonomousInit() {
26
26
m_autonomousCommand = m_robot.GetAutonomousCommand ();
27
27
28
28
if (m_autonomousCommand) {
29
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
29
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
30
30
}
31
31
}
32
32
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
38
38
m_autonomousCommand = m_container.GetAutonomousCommand ();
39
39
40
40
if (m_autonomousCommand) {
41
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
41
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
42
42
}
43
43
}
44
44
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ void Robot::AutonomousInit() {
22
22
m_autonomousCommand = m_container.GetAutonomousCommand ();
23
23
24
24
if (m_autonomousCommand) {
25
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
25
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
26
26
}
27
27
}
28
28
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ void Robot::AutonomousInit() {
37
37
m_autonomousCommand = m_container.GetAutonomousCommand ();
38
38
39
39
if (m_autonomousCommand) {
40
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
40
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
41
41
}
42
42
}
43
43
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ void Robot::AutonomousInit() {
22
22
m_autonomousCommand = m_container.GetAutonomousCommand ();
23
23
24
24
if (m_autonomousCommand) {
25
- frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand);
25
+ frc2::CommandScheduler::GetInstance ().Schedule (m_autonomousCommand. value () );
26
26
}
27
27
}
28
28
You can’t perform that action at this time.
0 commit comments