diff --git a/radio/src/am_demod.h b/radio/src/am_demod.h index 1ef36d21..8d370154 100644 --- a/radio/src/am_demod.h +++ b/radio/src/am_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class AMDemodulator : public Demodulator { public: @@ -139,7 +140,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["AM"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/cw_demod.h b/radio/src/cw_demod.h index bf94c73f..ec9d2603 100644 --- a/radio/src/cw_demod.h +++ b/radio/src/cw_demod.h @@ -10,6 +10,7 @@ #include #include #include +#include class CWDemodulator : public Demodulator { public: @@ -147,7 +148,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_cw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_cw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["CW"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/dsb_demod.h b/radio/src/dsb_demod.h index f5fcbe1a..fc37cd77 100644 --- a/radio/src/dsb_demod.h +++ b/radio/src/dsb_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class DSBDemodulator : public Demodulator { public: @@ -139,7 +140,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_dsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_dsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["DSB"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/fm_demod.h b/radio/src/fm_demod.h index eaacfeab..2015368f 100644 --- a/radio/src/fm_demod.h +++ b/radio/src/fm_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class FMDemodulator : public Demodulator { public: @@ -135,7 +136,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_fm_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_fm_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["FM"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/lsb_demod.h b/radio/src/lsb_demod.h index ff713d97..bc917513 100644 --- a/radio/src/lsb_demod.h +++ b/radio/src/lsb_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class LSBDemodulator : public Demodulator { public: @@ -139,7 +140,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_lsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_lsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["LSB"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/raw_demod.h b/radio/src/raw_demod.h index 20e252a7..f82328e5 100644 --- a/radio/src/raw_demod.h +++ b/radio/src/raw_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class RAWDemodulator : public Demodulator { public: @@ -102,7 +103,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_raw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_raw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["RAW"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/usb_demod.h b/radio/src/usb_demod.h index dcf5f980..2728903d 100644 --- a/radio/src/usb_demod.h +++ b/radio/src/usb_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class USBDemodulator : public Demodulator { public: @@ -139,7 +140,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_usb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_usb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["USB"]["squelchLevel"] = squelchLevel; diff --git a/radio/src/wfm_demod.h b/radio/src/wfm_demod.h index 882053e9..9f0c0ee2 100644 --- a/radio/src/wfm_demod.h +++ b/radio/src/wfm_demod.h @@ -7,6 +7,7 @@ #include #include #include +#include class WFMDemodulator : public Demodulator { public: @@ -159,7 +160,7 @@ public: ImGui::Text("Squelch"); ImGui::SameLine(); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { + if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB") || ImGui::AllowScrollwheel(squelchLevel, 20, -100, 0)) { squelch.setLevel(squelchLevel); _config->aquire(); _config->conf[uiPrefix]["WFM"]["squelchLevel"] = squelchLevel;