mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-26 04:17:50 +02:00
Added scroll to sliders
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include <config.h>
|
||||
#include <options.h>
|
||||
#include <libairspyhf/airspyhf.h>
|
||||
#include <gui/widgets/stepped_slider.h>
|
||||
|
||||
#define CONCAT(a, b) ((std::string(a) + b).c_str())
|
||||
|
||||
@ -225,7 +226,7 @@ private:
|
||||
if (_this->agcMode > 0) {
|
||||
airspyhf_set_hf_agc_threshold(_this->openDev, _this->agcMode - 1);
|
||||
}
|
||||
airspyhf_set_hf_att(_this->openDev, _this->atten / 6);
|
||||
airspyhf_set_hf_att(_this->openDev, _this->atten / 6.0f);
|
||||
airspyhf_set_hf_lna(_this->openDev, _this->hfLNA);
|
||||
|
||||
airspyhf_start(_this->openDev, callback, _this);
|
||||
@ -328,10 +329,9 @@ private:
|
||||
ImGui::Text("Attenuation");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||
if (ImGui::SliderInt(CONCAT("##_airspyhf_attn_", _this->name), &_this->atten, 0, 48, "%d dB")) {
|
||||
_this->atten = (_this->atten / 6) * 6;
|
||||
if (ImGui::SliderFloatWithSteps(CONCAT("##_airspyhf_attn_", _this->name), &_this->atten, 0, 48, 6, "%.0f dB")) {
|
||||
if (_this->running) {
|
||||
airspyhf_set_hf_att(_this->openDev, _this->atten / 6);
|
||||
airspyhf_set_hf_att(_this->openDev, _this->atten / 6.0f);
|
||||
}
|
||||
if (_this->selectedSerStr != "") {
|
||||
config.aquire();
|
||||
@ -361,7 +361,7 @@ private:
|
||||
int srId = 0;
|
||||
int agcMode = AGC_MODE_OFF;
|
||||
bool hfLNA = false;
|
||||
int atten = 0;
|
||||
float atten = 0.0f;
|
||||
std::string selectedSerStr = "";
|
||||
|
||||
std::vector<uint64_t> devList;
|
||||
|
Reference in New Issue
Block a user