Skip to content

Commit

Permalink
Suppress timeout message in C++ MotorSafety class (#1512)
Browse files Browse the repository at this point in the history
wpilibj's default constructor is already correct.
  • Loading branch information
calcmogul authored and PeterJohnson committed Dec 27, 2018
1 parent d817001 commit 300eeb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions wpilibc/src/main/native/cpp/MotorSafety.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); });
Expand Down
2 changes: 1 addition & 1 deletion wpilibc/src/main/native/include/frc/MotorSafety.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace frc {
*/
class MotorSafety : public ErrorBase {
public:
MotorSafety() = default;
MotorSafety();
virtual ~MotorSafety() = default;

MotorSafety(MotorSafety&& rhs);
Expand Down

0 comments on commit 300eeb3

Please sign in to comment.