diff options
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 8 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 1 |
2 files changed, 3 insertions, 6 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 756278cd..c3c8170c 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -457,7 +457,6 @@ extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDial TrackerControls::TrackerControls() { tracker = nullptr; - calibrating = false; calib_timer.setInterval(100); ui.setupUi(this); setAttribute(Qt::WA_NativeWindow, true); @@ -487,19 +486,18 @@ TrackerControls::TrackerControls() void TrackerControls::toggleCalibrate() { - if (!calibrating) + if (!calib_timer.isActive()) { calibrator.reset(); calib_timer.start(); } else { cleanupCalib(); } - calibrating = !calibrating; } void TrackerControls::cleanupCalib() { - if (calibrating) + if (calib_timer.isActive()) { calib_timer.stop(); auto pos = calibrator.get_estimate() * .1; @@ -511,7 +509,7 @@ void TrackerControls::cleanupCalib() void TrackerControls::update_tracker_calibration() { - if (calibrating && tracker) + if (calib_timer.isActive() && tracker) { cv::Matx33f r; cv::Vec3f t; diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index f1fcc326..f2207aef 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -91,7 +91,6 @@ private: Tracker* tracker; settings s; TranslationCalibrator calibrator; - bool calibrating; QTimer calib_timer; private slots: void doOK(); |