mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] IterativeRobotBase: Provide function to print watchdog epochs (#6581)
This commit is contained in:
@@ -232,3 +232,7 @@ void IterativeRobotBase::LoopFunc() {
|
||||
void IterativeRobotBase::PrintLoopOverrunMessage() {
|
||||
FRC_ReportError(err::Error, "Loop time of {:.6f}s overrun", m_period.value());
|
||||
}
|
||||
|
||||
void IterativeRobotBase::PrintWatchdogEpochs() {
|
||||
m_watchdog.PrintEpochs();
|
||||
}
|
||||
|
||||
@@ -230,6 +230,11 @@ class IterativeRobotBase : public RobotBase {
|
||||
*/
|
||||
units::second_t GetPeriod() const;
|
||||
|
||||
/**
|
||||
* Prints list of epochs added so far and their times.
|
||||
*/
|
||||
void PrintWatchdogEpochs();
|
||||
|
||||
/**
|
||||
* Constructor for IterativeRobotBase.
|
||||
*
|
||||
|
||||
@@ -408,6 +408,11 @@ public abstract class IterativeRobotBase extends RobotBase {
|
||||
}
|
||||
}
|
||||
|
||||
/** Prints list of epochs added so far and their times. */
|
||||
public void printWatchdogEpochs() {
|
||||
m_watchdog.printEpochs();
|
||||
}
|
||||
|
||||
private void printLoopOverrunMessage() {
|
||||
DriverStation.reportWarning("Loop time of " + m_period + "s overrun\n", false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user