mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilib] Add option to flush NetworkTables every iterative loop
This functionality is disabled by default, but can be enabled by the user program by calling setNetworkTablesFlushEnabled.
This commit is contained in:
@@ -155,6 +155,14 @@ class IterativeRobotBase : public RobotBase {
|
||||
*/
|
||||
virtual void TestPeriodic();
|
||||
|
||||
/**
|
||||
* Enables or disables flushing NetworkTables every loop iteration.
|
||||
* By default, this is disabled.
|
||||
*
|
||||
* @param enabled True to enable, false to disable
|
||||
*/
|
||||
void SetNetworkTablesFlushEnabled(bool enabled);
|
||||
|
||||
/**
|
||||
* Constructor for IterativeRobotBase.
|
||||
*
|
||||
@@ -188,6 +196,7 @@ class IterativeRobotBase : public RobotBase {
|
||||
|
||||
Mode m_lastMode = Mode::kNone;
|
||||
Watchdog m_watchdog;
|
||||
bool m_ntFlushEnabled = false;
|
||||
|
||||
void PrintLoopOverrunMessage();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user