Make image viewer polling rate configurable.
This helps on sucky networks.
Change-Id: I07896619ec9c0118f4da3bbb0f91b6cd2f8d8dca
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/vision/viewer.cc b/y2023/vision/viewer.cc
index 08def5b..68495b1 100644
--- a/y2023/vision/viewer.cc
+++ b/y2023/vision/viewer.cc
@@ -14,6 +14,8 @@
DEFINE_string(capture, "",
"If set, capture a single image and save it to this filename.");
+DEFINE_int32(rate, 100, "Time in milliseconds to wait between images");
+
namespace frc971 {
namespace vision {
namespace {
@@ -78,7 +80,7 @@
event_loop.Exit();
};
},
- ::std::chrono::milliseconds(100));
+ ::std::chrono::milliseconds(FLAGS_rate));
event_loop.Run();