Take longer to consider robot disabled in localizer
We were seeing 10-20ms network blips muck with the localizer due to it
assuming that the robot was disabled.
Change-Id: Ice5bbf455c8dc8d521cc2cac2ca96599571ab7d1
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/frc971/control_loops/drivetrain/localization/utils.cc b/frc971/control_loops/drivetrain/localization/utils.cc
index 14bc2ef..c1adb9a 100644
--- a/frc971/control_loops/drivetrain/localization/utils.cc
+++ b/frc971/control_loops/drivetrain/localization/utils.cc
@@ -21,7 +21,7 @@
// Determine if the robot is likely to be disabled currently.
const bool disabled =
(fetcher.get() == nullptr) ||
- (fetcher.context().monotonic_event_time + std::chrono::milliseconds(10) <
+ (fetcher.context().monotonic_event_time + std::chrono::milliseconds(500) <
now);
return disabled ? Eigen::Vector2d::Zero()
: Eigen::Vector2d{fetcher->left_voltage(),