Suppress Watchdog's generic timeout message in MotorSafety (#1486)

This commit is contained in:
Tyler Veness
2018-12-14 10:53:33 -08:00
committed by Peter Johnson
parent 0c3b488e18
commit 41596608cc
5 changed files with 45 additions and 5 deletions

View File

@@ -19,12 +19,14 @@ using namespace frc;
MotorSafety::MotorSafety(MotorSafety&& rhs)
: ErrorBase(std::move(rhs)), m_enabled(std::move(rhs.m_enabled)) {
m_watchdog = Watchdog(rhs.m_watchdog.GetTimeout(), [this] { TimeoutFunc(); });
m_watchdog.SuppressTimeoutMessage(true);
}
MotorSafety& MotorSafety::operator=(MotorSafety&& rhs) {
ErrorBase::operator=(std::move(rhs));
m_watchdog = Watchdog(rhs.m_watchdog.GetTimeout(), [this] { TimeoutFunc(); });
m_watchdog.SuppressTimeoutMessage(true);
m_enabled = std::move(rhs.m_enabled);
return *this;