[wpilib] Add method to enable/disable LiveWindow in test mode (#4678)

This commit is contained in:
Starlight220
2022-12-01 23:28:06 +02:00
committed by GitHub
parent eae68fc165
commit 1f1461e254
5 changed files with 146 additions and 12 deletions

View File

@@ -201,6 +201,19 @@ class IterativeRobotBase : public RobotBase {
*/
void SetNetworkTablesFlushEnabled(bool enabled);
/**
* Sets whether LiveWindow operation is enabled during test mode.
*
* @param testLW True to enable, false to disable. Defaults to true.
* @throws if called in test mode.
*/
void EnableLiveWindowInTest(bool testLW);
/**
* Whether LiveWindow operation is enabled during test mode.
*/
bool IsLiveWindowEnabledInTest();
/**
* Gets time period between calls to Periodic() functions.
*/
@@ -228,6 +241,7 @@ class IterativeRobotBase : public RobotBase {
units::second_t m_period;
Watchdog m_watchdog;
bool m_ntFlushEnabled = true;
bool m_lwEnabledInTest = true;
void PrintLoopOverrunMessage();
};