[wpilib] Deprecate getInstance() in favor of static functions (#3440)

Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
This commit is contained in:
Peter Johnson
2021-06-15 23:06:03 -07:00
committed by GitHub
parent 26ff9371d9
commit 362066a9b7
105 changed files with 1500 additions and 1539 deletions

View File

@@ -22,7 +22,7 @@ TEST(DriverStationTest, WaitForData) {
// 20ms waiting intervals * 50 = 1s
for (int i = 0; i < 50; i++) {
frc::DriverStation::GetInstance().WaitForData();
frc::DriverStation::WaitForData();
}
units::microsecond_t finalTime(frc::RobotController::GetFPGATime());

View File

@@ -40,12 +40,12 @@ class TestEnvironment : public testing::Environment {
// station returns that the robot is enabled, to ensure that tests will be
// able to run on the hardware.
HAL_ObserveUserProgramStarting();
frc::LiveWindow::GetInstance()->SetEnabled(false);
frc::LiveWindow::SetEnabled(false);
fmt::print("Started coms\n");
int enableCounter = 0;
while (!frc::DriverStation::GetInstance().IsEnabled()) {
while (!frc::DriverStation::IsEnabled()) {
if (enableCounter > 50) {
// Robot did not enable properly after 5 seconds.
// Force exit