mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Deprecate getInstance() in favor of static functions (#3440)
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user