[wpilib] Moved Watchdog output to reportWarning() (#2413)

This commit is contained in:
Starlight220
2020-05-21 06:57:06 +03:00
committed by GitHub
parent cf7088a462
commit 27f9a21a2c
2 changed files with 12 additions and 5 deletions

View File

@@ -227,7 +227,9 @@ public class Watchdog implements Closeable, Comparable<Watchdog> {
if (now - watchdog.m_lastTimeoutPrintTime > kMinPrintPeriod) {
watchdog.m_lastTimeoutPrintTime = now;
if (!watchdog.m_suppressTimeoutMessage) {
System.out.format("Watchdog not fed within %.6fs\n", watchdog.m_timeout / 1.0e6);
DriverStation.reportWarning(
String.format("Watchdog not fed within %.6fs\n", watchdog.m_timeout / 1.0e6),
false);
}
}