From 57a160f1b3e5e29abdbaf4f32dc5f26a612596ce Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 19 Jun 2021 20:45:56 -0700 Subject: [PATCH] [wpilibc] Fix LiveWindow deprecation warning in RobotBase skeleton template (#3454) --- .../src/main/cpp/templates/robotbaseskeleton/cpp/Robot.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wpilibcExamples/src/main/cpp/templates/robotbaseskeleton/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/templates/robotbaseskeleton/cpp/Robot.cpp index 9e1de6fff9..12307ecb1f 100644 --- a/wpilibcExamples/src/main/cpp/templates/robotbaseskeleton/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/templates/robotbaseskeleton/cpp/Robot.cpp @@ -21,8 +21,6 @@ void Robot::Teleop() {} void Robot::Test() {} void Robot::StartCompetition() { - auto& lw = *frc::LiveWindow::GetInstance(); - RobotInit(); // Tell the DS that the robot is ready to be enabled @@ -44,7 +42,7 @@ void Robot::StartCompetition() { frc::DriverStation::WaitForData(); } } else if (IsTest()) { - lw.SetEnabled(true); + frc::LiveWindow::SetEnabled(true); frc::Shuffleboard::EnableActuatorWidgets(); frc::DriverStation::InTest(true); Test(); @@ -52,7 +50,7 @@ void Robot::StartCompetition() { while (IsTest() && IsEnabled()) { frc::DriverStation::WaitForData(); } - lw.SetEnabled(false); + frc::LiveWindow::SetEnabled(false); frc::Shuffleboard::DisableActuatorWidgets(); } else { frc::DriverStation::InOperatorControl(true);