Added cangrabber auto.
Change-Id: I67c2b363df5fc3e431acf0cfd56c9537bb89804b
diff --git a/frc971/wpilib/loop_output_handler.h b/frc971/wpilib/loop_output_handler.h
index fe32763..d7b6283 100644
--- a/frc971/wpilib/loop_output_handler.h
+++ b/frc971/wpilib/loop_output_handler.h
@@ -20,7 +20,8 @@
// loops writing values until Quit() is called.
class LoopOutputHandler {
public:
- LoopOutputHandler();
+ LoopOutputHandler(
+ const ::aos::time::Time &timeout = ::aos::time::Time::InSeconds(0.10));
void Quit() { run_ = false; }
@@ -52,7 +53,7 @@
// LoopOutputHandler whenever the timerfd expires.
class Watchdog {
public:
- Watchdog(LoopOutputHandler *handler);
+ Watchdog(LoopOutputHandler *handler, const ::aos::time::Time &timeout);
void operator()();
@@ -63,14 +64,13 @@
private:
LoopOutputHandler *const handler_;
+ const ::aos::time::Time timeout_;
+
::aos::ScopedFD timerfd_;
::std::atomic<bool> run_{true};
};
- static constexpr ::aos::time::Time kStopTimeout =
- ::aos::time::Time::InSeconds(0.02);
-
Watchdog watchdog_;
::std::atomic<bool> run_{true};