mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
committed by
Peter Johnson
parent
761bc3ef85
commit
7112add67f
@@ -27,8 +27,8 @@ IterativeRobotBase::IterativeRobotBase(double period)
|
||||
: IterativeRobotBase(units::second_t(period)) {}
|
||||
|
||||
IterativeRobotBase::IterativeRobotBase(units::second_t period)
|
||||
: m_period(period.to<double>()),
|
||||
m_watchdog(period.to<double>(), [this] { PrintLoopOverrunMessage(); }) {}
|
||||
: m_period(period),
|
||||
m_watchdog(period, [this] { PrintLoopOverrunMessage(); }) {}
|
||||
|
||||
void IterativeRobotBase::RobotInit() {
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Override me!\n";
|
||||
@@ -174,7 +174,8 @@ void IterativeRobotBase::PrintLoopOverrunMessage() {
|
||||
wpi::SmallString<128> str;
|
||||
wpi::raw_svector_ostream buf(str);
|
||||
|
||||
buf << "Loop time of " << wpi::format("%.6f", m_period) << "s overrun\n";
|
||||
buf << "Loop time of " << wpi::format("%.6f", m_period.to<double>())
|
||||
<< "s overrun\n";
|
||||
|
||||
DriverStation::ReportWarning(str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user