From 300eeb330d78e2ef605d30644efbc4dd8bcdad61 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 27 Dec 2018 12:01:02 -0800 Subject: [PATCH] Suppress timeout message in C++ MotorSafety class (#1512) wpilibj's default constructor is already correct. --- wpilibc/src/main/native/cpp/MotorSafety.cpp | 2 ++ wpilibc/src/main/native/include/frc/MotorSafety.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wpilibc/src/main/native/cpp/MotorSafety.cpp b/wpilibc/src/main/native/cpp/MotorSafety.cpp index f9488ddc70..7bb1662e43 100644 --- a/wpilibc/src/main/native/cpp/MotorSafety.cpp +++ b/wpilibc/src/main/native/cpp/MotorSafety.cpp @@ -16,6 +16,8 @@ using namespace frc; +MotorSafety::MotorSafety() { m_watchdog.SuppressTimeoutMessage(true); } + MotorSafety::MotorSafety(MotorSafety&& rhs) : ErrorBase(std::move(rhs)), m_enabled(std::move(rhs.m_enabled)) { m_watchdog = Watchdog(rhs.m_watchdog.GetTimeout(), [this] { TimeoutFunc(); }); diff --git a/wpilibc/src/main/native/include/frc/MotorSafety.h b/wpilibc/src/main/native/include/frc/MotorSafety.h index 513af392f5..b86e28a39d 100644 --- a/wpilibc/src/main/native/include/frc/MotorSafety.h +++ b/wpilibc/src/main/native/include/frc/MotorSafety.h @@ -25,7 +25,7 @@ namespace frc { */ class MotorSafety : public ErrorBase { public: - MotorSafety() = default; + MotorSafety(); virtual ~MotorSafety() = default; MotorSafety(MotorSafety&& rhs);