From 337985b80be224dcf46b0f9550a0d3524a3392e3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 9 May 2022 12:02:36 +0200 Subject: tracker/trackhat: remove threshold slider --- tracker-trackhat/camera.cpp | 2 +- tracker-trackhat/dialog.cpp | 2 ++ tracker-trackhat/dialog.ui | 48 +----------------------------------------- tracker-trackhat/lang/nl_NL.ts | 4 ---- tracker-trackhat/lang/ru_RU.ts | 4 ---- tracker-trackhat/lang/stub.ts | 4 ---- tracker-trackhat/lang/zh_CN.ts | 4 ---- tracker-trackhat/settings.cpp | 2 +- tracker-trackhat/trackhat.hpp | 2 +- 9 files changed, 6 insertions(+), 66 deletions(-) diff --git a/tracker-trackhat/camera.cpp b/tracker-trackhat/camera.cpp index 94b81272..dd1f3d3a 100644 --- a/tracker-trackhat/camera.cpp +++ b/tracker-trackhat/camera.cpp @@ -54,7 +54,7 @@ trackhat_camera::trackhat_camera() s.set_raii_dtor_state(false); t.set_raii_dtor_state(false); - for (auto* slider : { &t.exposure, &t.threshold, }) + for (auto* slider : { &t.exposure, /*&t.threshold,*/ }) { QObject::connect(slider, options::value_::value_changed(), &sig, &trackhat_impl::setting_receiver::settings_changed, diff --git a/tracker-trackhat/dialog.cpp b/tracker-trackhat/dialog.cpp index 19563143..cfff03ba 100644 --- a/tracker-trackhat/dialog.cpp +++ b/tracker-trackhat/dialog.cpp @@ -45,6 +45,7 @@ trackhat_dialog::trackhat_dialog() // threshold +#if 0 tie_setting(t.threshold, ui.threshold_slider); ui.threshold_label->setValue((int)*t.threshold); @@ -52,6 +53,7 @@ trackhat_dialog::trackhat_dialog() connect(&t.threshold, value_::value_changed(), ui.threshold_label, [=] { ui.threshold_label->setValue((int)*t.threshold); }, Qt::QueuedConnection); +#endif // point filter diff --git a/tracker-trackhat/dialog.ui b/tracker-trackhat/dialog.ui index 3195cf24..30cf78db 100644 --- a/tracker-trackhat/dialog.ui +++ b/tracker-trackhat/dialog.ui @@ -7,7 +7,7 @@ 0 0 365 - 460 + 429 @@ -30,32 +30,6 @@ Camera - - - - - 0 - 0 - - - - 64 - - - 254 - - - Qt::Horizontal - - - - - - - Threshold - - - @@ -94,25 +68,6 @@ - - - - Qt::NoFocus - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - QAbstractSpinBox::NoButtons - - - 999 - - - @@ -553,7 +508,6 @@ exposure_slider - threshold_slider model_type min_point_size max_point_size diff --git a/tracker-trackhat/lang/nl_NL.ts b/tracker-trackhat/lang/nl_NL.ts index 9166a143..73e375fc 100644 --- a/tracker-trackhat/lang/nl_NL.ts +++ b/tracker-trackhat/lang/nl_NL.ts @@ -47,10 +47,6 @@ Camera - - Threshold - - Exposure diff --git a/tracker-trackhat/lang/ru_RU.ts b/tracker-trackhat/lang/ru_RU.ts index 3d587010..091c2101 100644 --- a/tracker-trackhat/lang/ru_RU.ts +++ b/tracker-trackhat/lang/ru_RU.ts @@ -47,10 +47,6 @@ Camera - - Threshold - - Exposure diff --git a/tracker-trackhat/lang/stub.ts b/tracker-trackhat/lang/stub.ts index d1a07ea6..548138a3 100644 --- a/tracker-trackhat/lang/stub.ts +++ b/tracker-trackhat/lang/stub.ts @@ -11,10 +11,6 @@ Camera - - Threshold - - Exposure diff --git a/tracker-trackhat/lang/zh_CN.ts b/tracker-trackhat/lang/zh_CN.ts index ca9ff5c6..cb881fa8 100644 --- a/tracker-trackhat/lang/zh_CN.ts +++ b/tracker-trackhat/lang/zh_CN.ts @@ -47,10 +47,6 @@ Camera - - Threshold - - Exposure diff --git a/tracker-trackhat/settings.cpp b/tracker-trackhat/settings.cpp index 0e47ddd0..ec46b1e9 100644 --- a/tracker-trackhat/settings.cpp +++ b/tracker-trackhat/settings.cpp @@ -91,7 +91,7 @@ bool trackhat_camera::init_regs() { auto exp = (uint8_t)t.effective_exposure(); auto exp2 = (uint8_t)(exp == 0xff ? 0xf0 : 0xff); - auto thres = (uint8_t)t.threshold; + auto thres = (uint8_t)0xfe; auto thres2 = (uint8_t)3; auto gain = (uint8_t)t.effective_gain(); diff --git a/tracker-trackhat/trackhat.hpp b/tracker-trackhat/trackhat.hpp index 1ae67e1c..6e228f9c 100644 --- a/tracker-trackhat/trackhat.hpp +++ b/tracker-trackhat/trackhat.hpp @@ -37,7 +37,7 @@ struct trackhat_settings : opts int effective_gain() const; trackhat_settings(); value exposure{b, "exposure", {min_exposure, min_exposure, max_exposure + max_gain - min_gain}}; - value threshold{b, "threshold", {0x97, 64, 0xfe}}; + //value threshold{b, "threshold", {0x97, 64, 0xfe}}; value model{b, "model", model_mini_clip_left}; value min_pt_size{b, "min-point-size", 10}; value max_pt_size{b, "max-point-size", 50}; -- cgit v1.2.3