mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[wpilibc] Return reference from GetInstance (#3247)
Improves consistency across all classes. Affects Preferences, LiveWindow, and CameraServer. Old commands Scheduler::GetInstance() was not updated as this is already deprecated.
This commit is contained in:
@@ -158,7 +158,7 @@ bool ReadConfig() {
|
|||||||
void StartCamera(const CameraConfig& config) {
|
void StartCamera(const CameraConfig& config) {
|
||||||
wpi::outs() << "Starting camera '" << config.name << "' on " << config.path
|
wpi::outs() << "Starting camera '" << config.name << "' on " << config.path
|
||||||
<< '\n';
|
<< '\n';
|
||||||
auto camera = frc::CameraServer::GetInstance()->StartAutomaticCapture(
|
auto camera = frc::CameraServer::GetInstance().StartAutomaticCapture(
|
||||||
config.name, config.path);
|
config.name, config.path);
|
||||||
|
|
||||||
camera.SetConfigJson(config.config);
|
camera.SetConfigJson(config.config);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ struct CameraServer::Impl {
|
|||||||
std::vector<std::string> m_addresses;
|
std::vector<std::string> m_addresses;
|
||||||
};
|
};
|
||||||
|
|
||||||
CameraServer* CameraServer::GetInstance() {
|
CameraServer& CameraServer::GetInstance() {
|
||||||
struct Creator {
|
struct Creator {
|
||||||
static void* call() { return new CameraServer{}; }
|
static void* call() { return new CameraServer{}; }
|
||||||
};
|
};
|
||||||
@@ -53,7 +53,7 @@ CameraServer* CameraServer::GetInstance() {
|
|||||||
static void call(void* ptr) { delete static_cast<CameraServer*>(ptr); }
|
static void call(void* ptr) { delete static_cast<CameraServer*>(ptr); }
|
||||||
};
|
};
|
||||||
static wpi::ManagedStatic<CameraServer, Creator, Deleter> instance;
|
static wpi::ManagedStatic<CameraServer, Creator, Deleter> instance;
|
||||||
return &(*instance);
|
return *instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
static wpi::StringRef MakeSourceValue(CS_Source source,
|
static wpi::StringRef MakeSourceValue(CS_Source source,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class CameraServer {
|
|||||||
/**
|
/**
|
||||||
* Get the CameraServer instance.
|
* Get the CameraServer instance.
|
||||||
*/
|
*/
|
||||||
static CameraServer* GetInstance();
|
static CameraServer& GetInstance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start automatically capturing images to send to the dashboard.
|
* Start automatically capturing images to send to the dashboard.
|
||||||
|
|||||||
@@ -71,19 +71,19 @@ CommandScheduler::CommandScheduler()
|
|||||||
HAL_Report(HALUsageReporting::kResourceType_Command,
|
HAL_Report(HALUsageReporting::kResourceType_Command,
|
||||||
HALUsageReporting::kCommand2_Scheduler);
|
HALUsageReporting::kCommand2_Scheduler);
|
||||||
frc::SendableRegistry::GetInstance().AddLW(this, "Scheduler");
|
frc::SendableRegistry::GetInstance().AddLW(this, "Scheduler");
|
||||||
auto scheduler = frc::LiveWindow::GetInstance();
|
auto& scheduler = frc::LiveWindow::GetInstance();
|
||||||
scheduler->enabled = [this] {
|
scheduler.enabled = [this] {
|
||||||
this->Disable();
|
Disable();
|
||||||
this->CancelAll();
|
CancelAll();
|
||||||
};
|
};
|
||||||
scheduler->disabled = [this] { this->Enable(); };
|
scheduler.disabled = [this] { Enable(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandScheduler::~CommandScheduler() {
|
CommandScheduler::~CommandScheduler() {
|
||||||
frc::SendableRegistry::GetInstance().Remove(this);
|
frc::SendableRegistry::GetInstance().Remove(this);
|
||||||
auto scheduler = frc::LiveWindow::GetInstance();
|
auto& scheduler = frc::LiveWindow::GetInstance();
|
||||||
scheduler->enabled = nullptr;
|
scheduler.enabled = nullptr;
|
||||||
scheduler->disabled = nullptr;
|
scheduler.disabled = nullptr;
|
||||||
|
|
||||||
std::unique_ptr<Impl>().swap(m_impl);
|
std::unique_ptr<Impl>().swap(m_impl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,19 +203,19 @@ Scheduler::Scheduler() : m_impl(new Impl) {
|
|||||||
HAL_Report(HALUsageReporting::kResourceType_Command,
|
HAL_Report(HALUsageReporting::kResourceType_Command,
|
||||||
HALUsageReporting::kCommand_Scheduler);
|
HALUsageReporting::kCommand_Scheduler);
|
||||||
SendableRegistry::GetInstance().AddLW(this, "Scheduler");
|
SendableRegistry::GetInstance().AddLW(this, "Scheduler");
|
||||||
auto scheduler = frc::LiveWindow::GetInstance();
|
auto& scheduler = frc::LiveWindow::GetInstance();
|
||||||
scheduler->enabled = [this] {
|
scheduler.enabled = [this] {
|
||||||
this->SetEnabled(false);
|
SetEnabled(false);
|
||||||
this->RemoveAll();
|
RemoveAll();
|
||||||
};
|
};
|
||||||
scheduler->disabled = [this] { this->SetEnabled(true); };
|
scheduler.disabled = [this] { SetEnabled(true); };
|
||||||
}
|
}
|
||||||
|
|
||||||
Scheduler::~Scheduler() {
|
Scheduler::~Scheduler() {
|
||||||
SendableRegistry::GetInstance().Remove(this);
|
SendableRegistry::GetInstance().Remove(this);
|
||||||
auto scheduler = frc::LiveWindow::GetInstance();
|
auto& scheduler = frc::LiveWindow::GetInstance();
|
||||||
scheduler->enabled = nullptr;
|
scheduler.enabled = nullptr;
|
||||||
scheduler->disabled = nullptr;
|
scheduler.disabled = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scheduler::Impl::Remove(Command* command) {
|
void Scheduler::Impl::Remove(Command* command) {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ void IterativeRobotBase::LoopFunc() {
|
|||||||
// Call DisabledInit() if we are now just entering disabled mode from
|
// Call DisabledInit() if we are now just entering disabled mode from
|
||||||
// either a different mode or from power-on.
|
// either a different mode or from power-on.
|
||||||
if (m_lastMode != Mode::kDisabled) {
|
if (m_lastMode != Mode::kDisabled) {
|
||||||
LiveWindow::GetInstance()->SetEnabled(false);
|
LiveWindow::GetInstance().SetEnabled(false);
|
||||||
Shuffleboard::DisableActuatorWidgets();
|
Shuffleboard::DisableActuatorWidgets();
|
||||||
DisabledInit();
|
DisabledInit();
|
||||||
m_watchdog.AddEpoch("DisabledInit()");
|
m_watchdog.AddEpoch("DisabledInit()");
|
||||||
@@ -122,7 +122,7 @@ void IterativeRobotBase::LoopFunc() {
|
|||||||
// Call AutonomousInit() if we are now just entering autonomous mode from
|
// Call AutonomousInit() if we are now just entering autonomous mode from
|
||||||
// either a different mode or from power-on.
|
// either a different mode or from power-on.
|
||||||
if (m_lastMode != Mode::kAutonomous) {
|
if (m_lastMode != Mode::kAutonomous) {
|
||||||
LiveWindow::GetInstance()->SetEnabled(false);
|
LiveWindow::GetInstance().SetEnabled(false);
|
||||||
Shuffleboard::DisableActuatorWidgets();
|
Shuffleboard::DisableActuatorWidgets();
|
||||||
AutonomousInit();
|
AutonomousInit();
|
||||||
m_watchdog.AddEpoch("AutonomousInit()");
|
m_watchdog.AddEpoch("AutonomousInit()");
|
||||||
@@ -136,7 +136,7 @@ void IterativeRobotBase::LoopFunc() {
|
|||||||
// Call TeleopInit() if we are now just entering teleop mode from
|
// Call TeleopInit() if we are now just entering teleop mode from
|
||||||
// either a different mode or from power-on.
|
// either a different mode or from power-on.
|
||||||
if (m_lastMode != Mode::kTeleop) {
|
if (m_lastMode != Mode::kTeleop) {
|
||||||
LiveWindow::GetInstance()->SetEnabled(false);
|
LiveWindow::GetInstance().SetEnabled(false);
|
||||||
Shuffleboard::DisableActuatorWidgets();
|
Shuffleboard::DisableActuatorWidgets();
|
||||||
TeleopInit();
|
TeleopInit();
|
||||||
m_watchdog.AddEpoch("TeleopInit()");
|
m_watchdog.AddEpoch("TeleopInit()");
|
||||||
@@ -150,7 +150,7 @@ void IterativeRobotBase::LoopFunc() {
|
|||||||
// Call TestInit() if we are now just entering test mode from
|
// Call TestInit() if we are now just entering test mode from
|
||||||
// either a different mode or from power-on.
|
// either a different mode or from power-on.
|
||||||
if (m_lastMode != Mode::kTest) {
|
if (m_lastMode != Mode::kTest) {
|
||||||
LiveWindow::GetInstance()->SetEnabled(true);
|
LiveWindow::GetInstance().SetEnabled(true);
|
||||||
Shuffleboard::EnableActuatorWidgets();
|
Shuffleboard::EnableActuatorWidgets();
|
||||||
TestInit();
|
TestInit();
|
||||||
m_watchdog.AddEpoch("TestInit()");
|
m_watchdog.AddEpoch("TestInit()");
|
||||||
@@ -167,7 +167,7 @@ void IterativeRobotBase::LoopFunc() {
|
|||||||
|
|
||||||
SmartDashboard::UpdateValues();
|
SmartDashboard::UpdateValues();
|
||||||
m_watchdog.AddEpoch("SmartDashboard::UpdateValues()");
|
m_watchdog.AddEpoch("SmartDashboard::UpdateValues()");
|
||||||
LiveWindow::GetInstance()->UpdateValues();
|
LiveWindow::GetInstance().UpdateValues();
|
||||||
m_watchdog.AddEpoch("LiveWindow::UpdateValues()");
|
m_watchdog.AddEpoch("LiveWindow::UpdateValues()");
|
||||||
Shuffleboard::Update();
|
Shuffleboard::Update();
|
||||||
m_watchdog.AddEpoch("Shuffleboard::Update()");
|
m_watchdog.AddEpoch("Shuffleboard::Update()");
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ using namespace frc;
|
|||||||
// The Preferences table name
|
// The Preferences table name
|
||||||
static wpi::StringRef kTableName{"Preferences"};
|
static wpi::StringRef kTableName{"Preferences"};
|
||||||
|
|
||||||
Preferences* Preferences::GetInstance() {
|
Preferences& Preferences::GetInstance() {
|
||||||
static Preferences instance;
|
static Preferences instance;
|
||||||
return &instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> Preferences::GetKeys() {
|
std::vector<std::string> Preferences::GetKeys() {
|
||||||
@@ -143,3 +143,5 @@ Preferences::Preferences()
|
|||||||
NT_NOTIFY_NEW | NT_NOTIFY_IMMEDIATE);
|
NT_NOTIFY_NEW | NT_NOTIFY_IMMEDIATE);
|
||||||
HAL_Report(HALUsageReporting::kResourceType_Preferences, 0);
|
HAL_Report(HALUsageReporting::kResourceType_Preferences, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Preferences::~Preferences() = default;
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ std::shared_ptr<LiveWindow::Impl::Component> LiveWindow::Impl::GetOrAdd(
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
LiveWindow* LiveWindow::GetInstance() {
|
LiveWindow& LiveWindow::GetInstance() {
|
||||||
static LiveWindow instance;
|
static LiveWindow instance;
|
||||||
return &instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiveWindow::EnableTelemetry(Sendable* sendable) {
|
void LiveWindow::EnableTelemetry(Sendable* sendable) {
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
|
|||||||
->GetEntry("LW Enabled")
|
->GetEntry("LW Enabled")
|
||||||
.SetBoolean(false);
|
.SetBoolean(false);
|
||||||
|
|
||||||
LiveWindow::GetInstance()->SetEnabled(false);
|
LiveWindow::GetInstance().SetEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
RobotBase::RobotBase(RobotBase&&) noexcept
|
RobotBase::RobotBase(RobotBase&&) noexcept
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ class Preferences : public ErrorBase {
|
|||||||
/**
|
/**
|
||||||
* Get the one and only {@link Preferences} object.
|
* Get the one and only {@link Preferences} object.
|
||||||
*
|
*
|
||||||
* @return pointer to the {@link Preferences}
|
* @return reference to the {@link Preferences}
|
||||||
*/
|
*/
|
||||||
static Preferences* GetInstance();
|
static Preferences& GetInstance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a vector of all the keys.
|
* Returns a vector of all the keys.
|
||||||
@@ -226,7 +226,7 @@ class Preferences : public ErrorBase {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
Preferences();
|
Preferences();
|
||||||
~Preferences() override = default;
|
~Preferences() override;
|
||||||
|
|
||||||
Preferences(Preferences&&) = default;
|
Preferences(Preferences&&) = default;
|
||||||
Preferences& operator=(Preferences&&) = default;
|
Preferences& operator=(Preferences&&) = default;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class LiveWindow {
|
|||||||
* This is a singleton to guarantee that there is only a single instance
|
* This is a singleton to guarantee that there is only a single instance
|
||||||
* regardless of how many times GetInstance is called.
|
* regardless of how many times GetInstance is called.
|
||||||
*/
|
*/
|
||||||
static LiveWindow* GetInstance();
|
static LiveWindow& GetInstance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable telemetry for a single component.
|
* Enable telemetry for a single component.
|
||||||
@@ -69,6 +69,7 @@ class LiveWindow {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
LiveWindow();
|
LiveWindow();
|
||||||
|
~LiveWindow() = default;
|
||||||
|
|
||||||
struct Impl;
|
struct Impl;
|
||||||
std::unique_ptr<Impl> m_impl;
|
std::unique_ptr<Impl> m_impl;
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ class Robot : public frc::TimedRobot {
|
|||||||
static void VisionThread() {
|
static void VisionThread() {
|
||||||
// Get the Axis camera from CameraServer
|
// Get the Axis camera from CameraServer
|
||||||
cs::AxisCamera camera =
|
cs::AxisCamera camera =
|
||||||
frc::CameraServer::GetInstance()->AddAxisCamera("axis-camera.local");
|
frc::CameraServer::GetInstance().AddAxisCamera("axis-camera.local");
|
||||||
// Set the resolution
|
// Set the resolution
|
||||||
camera.SetResolution(640, 480);
|
camera.SetResolution(640, 480);
|
||||||
|
|
||||||
// Get a CvSink. This will capture Mats from the Camera
|
// Get a CvSink. This will capture Mats from the Camera
|
||||||
cs::CvSink cvSink = frc::CameraServer::GetInstance()->GetVideo();
|
cs::CvSink cvSink = frc::CameraServer::GetInstance().GetVideo();
|
||||||
// Setup a CvSource. This will send images back to the Dashboard
|
// Setup a CvSource. This will send images back to the Dashboard
|
||||||
cs::CvSource outputStream =
|
cs::CvSource outputStream =
|
||||||
frc::CameraServer::GetInstance()->PutVideo("Rectangle", 640, 480);
|
frc::CameraServer::GetInstance().PutVideo("Rectangle", 640, 480);
|
||||||
|
|
||||||
// Mats are very memory expensive. Lets reuse this Mat.
|
// Mats are very memory expensive. Lets reuse this Mat.
|
||||||
cv::Mat mat;
|
cv::Mat mat;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Robot : public frc::TimedRobot {
|
|||||||
frc::DifferentialDrive m_robotDrive{m_left, m_right};
|
frc::DifferentialDrive m_robotDrive{m_left, m_right};
|
||||||
|
|
||||||
frc::Joystick m_stick{0};
|
frc::Joystick m_stick{0};
|
||||||
frc::LiveWindow& m_lw = *frc::LiveWindow::GetInstance();
|
frc::LiveWindow& m_lw = frc::LiveWindow::GetInstance();
|
||||||
frc::Timer m_timer;
|
frc::Timer m_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ class Robot : public frc::TimedRobot {
|
|||||||
static void VisionThread() {
|
static void VisionThread() {
|
||||||
// Get the USB camera from CameraServer
|
// Get the USB camera from CameraServer
|
||||||
cs::UsbCamera camera =
|
cs::UsbCamera camera =
|
||||||
frc::CameraServer::GetInstance()->StartAutomaticCapture();
|
frc::CameraServer::GetInstance().StartAutomaticCapture();
|
||||||
// Set the resolution
|
// Set the resolution
|
||||||
camera.SetResolution(640, 480);
|
camera.SetResolution(640, 480);
|
||||||
|
|
||||||
// Get a CvSink. This will capture Mats from the Camera
|
// Get a CvSink. This will capture Mats from the Camera
|
||||||
cs::CvSink cvSink = frc::CameraServer::GetInstance()->GetVideo();
|
cs::CvSink cvSink = frc::CameraServer::GetInstance().GetVideo();
|
||||||
// Setup a CvSource. This will send images back to the Dashboard
|
// Setup a CvSource. This will send images back to the Dashboard
|
||||||
cs::CvSource outputStream =
|
cs::CvSource outputStream =
|
||||||
frc::CameraServer::GetInstance()->PutVideo("Rectangle", 640, 480);
|
frc::CameraServer::GetInstance().PutVideo("Rectangle", 640, 480);
|
||||||
|
|
||||||
// Mats are very memory expensive. Lets reuse this Mat.
|
// Mats are very memory expensive. Lets reuse this Mat.
|
||||||
cv::Mat mat;
|
cv::Mat mat;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Robot : public frc::TimedRobot {
|
|||||||
public:
|
public:
|
||||||
void RobotInit() override {
|
void RobotInit() override {
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
frc::CameraServer::GetInstance()->StartAutomaticCapture();
|
frc::CameraServer::GetInstance().StartAutomaticCapture();
|
||||||
#else
|
#else
|
||||||
wpi::errs() << "Vision only available on Linux.\n";
|
wpi::errs() << "Vision only available on Linux.\n";
|
||||||
wpi::errs().flush();
|
wpi::errs().flush();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ void Robot::Teleop() {}
|
|||||||
void Robot::Test() {}
|
void Robot::Test() {}
|
||||||
|
|
||||||
void Robot::StartCompetition() {
|
void Robot::StartCompetition() {
|
||||||
auto& lw = *frc::LiveWindow::GetInstance();
|
auto& lw = frc::LiveWindow::GetInstance();
|
||||||
|
|
||||||
RobotInit();
|
RobotInit();
|
||||||
|
|
||||||
|
|||||||
@@ -44,14 +44,14 @@ TEST(PreferencesTest, ReadPreferencesFromFile) {
|
|||||||
preferencesFile.close();
|
preferencesFile.close();
|
||||||
inst.StartServer();
|
inst.StartServer();
|
||||||
|
|
||||||
Preferences* preferences = Preferences::GetInstance();
|
Preferences& preferences = Preferences::GetInstance();
|
||||||
EXPECT_EQ("Hello, preferences file",
|
EXPECT_EQ("Hello, preferences file",
|
||||||
preferences->GetString("testFileGetString"));
|
preferences.GetString("testFileGetString"));
|
||||||
EXPECT_EQ(1, preferences->GetInt("testFileGetInt"));
|
EXPECT_EQ(1, preferences.GetInt("testFileGetInt"));
|
||||||
EXPECT_FLOAT_EQ(0.5, preferences->GetDouble("testFileGetDouble"));
|
EXPECT_FLOAT_EQ(0.5, preferences.GetDouble("testFileGetDouble"));
|
||||||
EXPECT_FLOAT_EQ(0.25f, preferences->GetFloat("testFileGetFloat"));
|
EXPECT_FLOAT_EQ(0.25f, preferences.GetFloat("testFileGetFloat"));
|
||||||
EXPECT_TRUE(preferences->GetBoolean("testFileGetBoolean"));
|
EXPECT_TRUE(preferences.GetBoolean("testFileGetBoolean"));
|
||||||
EXPECT_EQ(1000000000000000000ll, preferences->GetLong("testFileGetLong"));
|
EXPECT_EQ(1000000000000000000ll, preferences.GetLong("testFileGetLong"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,22 +61,22 @@ TEST(PreferencesTest, ReadPreferencesFromFile) {
|
|||||||
TEST(PreferencesTest, WritePreferencesToFile) {
|
TEST(PreferencesTest, WritePreferencesToFile) {
|
||||||
auto inst = nt::NetworkTableInstance::GetDefault();
|
auto inst = nt::NetworkTableInstance::GetDefault();
|
||||||
inst.StartServer();
|
inst.StartServer();
|
||||||
Preferences* preferences = Preferences::GetInstance();
|
Preferences& preferences = Preferences::GetInstance();
|
||||||
preferences->Remove("testFileGetString");
|
preferences.Remove("testFileGetString");
|
||||||
preferences->Remove("testFileGetInt");
|
preferences.Remove("testFileGetInt");
|
||||||
preferences->Remove("testFileGetDouble");
|
preferences.Remove("testFileGetDouble");
|
||||||
preferences->Remove("testFileGetFloat");
|
preferences.Remove("testFileGetFloat");
|
||||||
preferences->Remove("testFileGetBoolean");
|
preferences.Remove("testFileGetBoolean");
|
||||||
preferences->Remove("testFileGetLong");
|
preferences.Remove("testFileGetLong");
|
||||||
|
|
||||||
Wait(kSaveTime);
|
Wait(kSaveTime);
|
||||||
|
|
||||||
preferences->PutString("testFilePutString", "Hello, preferences file");
|
preferences.PutString("testFilePutString", "Hello, preferences file");
|
||||||
preferences->PutInt("testFilePutInt", 1);
|
preferences.PutInt("testFilePutInt", 1);
|
||||||
preferences->PutDouble("testFilePutDouble", 0.5);
|
preferences.PutDouble("testFilePutDouble", 0.5);
|
||||||
preferences->PutFloat("testFilePutFloat", 0.25f);
|
preferences.PutFloat("testFilePutFloat", 0.25f);
|
||||||
preferences->PutBoolean("testFilePutBoolean", true);
|
preferences.PutBoolean("testFilePutBoolean", true);
|
||||||
preferences->PutLong("testFilePutLong", 1000000000000000000ll);
|
preferences.PutLong("testFilePutLong", 1000000000000000000ll);
|
||||||
|
|
||||||
Wait(kSaveTime);
|
Wait(kSaveTime);
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class TestEnvironment : public testing::Environment {
|
|||||||
station returns that the robot is enabled, to ensure that tests
|
station returns that the robot is enabled, to ensure that tests
|
||||||
will be able to run on the hardware. */
|
will be able to run on the hardware. */
|
||||||
HAL_ObserveUserProgramStarting();
|
HAL_ObserveUserProgramStarting();
|
||||||
LiveWindow::GetInstance()->SetEnabled(false);
|
LiveWindow::GetInstance().SetEnabled(false);
|
||||||
|
|
||||||
wpi::outs() << "Started coms\n";
|
wpi::outs() << "Started coms\n";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user