diff --git a/radio/src/am_demod.h b/radio/src/am_demod.h index 1ef36d2..8d37015 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 bf94c73..ec9d260 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 f5fcbe1..fc37cd7 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 eaacfea..2015368 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 ff713d9..bc91751 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 20e252a..f82328e 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 dcf5f98..2728903 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 882053e..9f0c0ee 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;