[wpilib] Make IterativeRobotBase::m_period private with getter

This commit is contained in:
Tyler Veness
2019-04-13 14:26:42 -07:00
committed by Peter Johnson
parent f00dfed7ac
commit 497b712f67
6 changed files with 16 additions and 18 deletions

View File

@@ -160,6 +160,11 @@ class IterativeRobotBase : public RobotBase {
*/
void SetNetworkTablesFlushEnabled(bool enabled);
/**
* Gets time period between calls to Periodic() functions.
*/
units::second_t GetPeriod() const;
/**
* Constructor for IterativeRobotBase.
*
@@ -186,12 +191,11 @@ class IterativeRobotBase : public RobotBase {
void LoopFunc();
units::second_t m_period;
private:
enum class Mode { kNone, kDisabled, kAutonomous, kTeleop, kTest };
Mode m_lastMode = Mode::kNone;
units::second_t m_period;
Watchdog m_watchdog;
bool m_ntFlushEnabled = false;

View File

@@ -42,11 +42,6 @@ class TimedRobot : public IterativeRobotBase {
*/
void EndCompetition() override;
/**
* Get the time period between calls to Periodic() functions.
*/
units::second_t GetPeriod() const;
/**
* Constructor for TimedRobot.
*