Configure ImageCallback to work with ftrace
We want to be able to stop a trace when we have a timing violation. Add
flags to support that.
Change-Id: I9a66c59576692ecceeb796dfba223207b7c1234b
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/vision/charuco_lib.h b/frc971/vision/charuco_lib.h
index 362bb7d..fdf25e1 100644
--- a/frc971/vision/charuco_lib.h
+++ b/frc971/vision/charuco_lib.h
@@ -56,10 +56,17 @@
&&handle_image_fn);
private:
+ void DisableTracing();
+
aos::EventLoop *event_loop_;
aos::Fetcher<aos::message_bridge::ServerStatistics> server_fetcher_;
const aos::Node *source_node_;
std::function<void(cv::Mat, aos::monotonic_clock::time_point)> handle_image_;
+ aos::TimerHandler *timer_fn_;
+
+ bool disabling_ = false;
+
+ aos::Ftrace ftrace_;
};
// Class which calls a callback each time an image arrives with the information