mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
TimedRobot.cpp: Fix deprecation warning (#1846)
For both TimedRobot and IterativeRobotBase, use delegating constructors to reduce code duplication.
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
using namespace frc;
|
||||
|
||||
IterativeRobotBase::IterativeRobotBase(double period)
|
||||
: m_period(period),
|
||||
m_watchdog(period, [this] { PrintLoopOverrunMessage(); }) {}
|
||||
: IterativeRobotBase(units::second_t(period)) {}
|
||||
|
||||
IterativeRobotBase::IterativeRobotBase(units::second_t period)
|
||||
: m_period(period.to<double>()),
|
||||
|
||||
Reference in New Issue
Block a user