Make max image age a parameter in code
Remove the flag and put it in the constructor for ImageCallback, so that
intrinsics calibration can define a much shorter age. This shorter age
is needed so that the watcher doesn't get too far behind and we aren't
able to quit the application.
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I9400f1c42d93285cc30065513e766ec7c6f34186
diff --git a/y2020/vision/calibration.cc b/y2020/vision/calibration.cc
index 6145452..d5ed54f 100644
--- a/y2020/vision/calibration.cc
+++ b/y2020/vision/calibration.cc
@@ -53,7 +53,8 @@
[this](cv::Mat rgb_image,
const aos::monotonic_clock::time_point eof) {
charuco_extractor_.HandleImage(rgb_image, eof);
- }) {
+ },
+ std::chrono::milliseconds(5)) {
CHECK(pi_number_) << ": Invalid pi number " << pi
<< ", failed to parse pi number";
std::regex re{"^[0-9][0-9]-[0-9][0-9]"};