control loop timeout code now uses robot_state->outputs_enabled
The outputs_enabled flag falls low as soon as the robot disables the
outputs. They will stay at the last value that was commanded before
it disables for 100 ms, but we can conservatively tell the robot that
they are disabled at that point (since they practically are).
Change-Id: I47f883591dbe2e3696d3958a0ce4281232a5f1e1
diff --git a/frc971/wpilib/loop_output_handler.h b/frc971/wpilib/loop_output_handler.h
index 972d7ef..144093d 100644
--- a/frc971/wpilib/loop_output_handler.h
+++ b/frc971/wpilib/loop_output_handler.h
@@ -2,6 +2,7 @@
#define FRC971_WPILIB_LOOP_OUTPUT_HANDLER_H_
#include <atomic>
+#include <chrono>
#include "aos/common/scoped_fd.h"
#include "aos/common/time.h"
@@ -76,10 +77,10 @@
::std::atomic<bool> run_{true};
::aos::util::SimpleLogInterval no_joystick_state_ =
- ::aos::util::SimpleLogInterval(::aos::time::Time::InSeconds(0.5), INFO,
+ ::aos::util::SimpleLogInterval(::std::chrono::milliseconds(500), INFO,
"no joystick state -> not outputting");
::aos::util::SimpleLogInterval fake_joystick_state_ =
- ::aos::util::SimpleLogInterval(::aos::time::Time::InSeconds(0.5), DEBUG,
+ ::aos::util::SimpleLogInterval(::std::chrono::milliseconds(500), DEBUG,
"fake joystick state -> not outputting");
};