Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
AlexandreRouma 021928bbda fix show/hide waterfall keybind not working with the Display menu hidden 2024-02-21 21:59:55 +01:00
AlexandreRouma 7c933d5103 fix typo mentioned in #174 2024-02-21 18:47:50 +01:00
6 zmienionych plików z 24 dodań i 12 usunięć

Wyświetl plik

@ -463,6 +463,8 @@ void MainWindow::draw() {
}
}
// Process menu keybinds
displaymenu::checkKeybinds();
// Left Column
lockWaterfallControls = false;

Wyświetl plik

@ -127,15 +127,24 @@ namespace displaymenu {
uiScaleId = uiScales.valueId(style::uiScale);
}
void setWaterfallShown(bool shown) {
showWaterfall = shown;
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
core::configManager.acquire();
core::configManager.conf["showWaterfall"] = showWaterfall;
core::configManager.release(true);
}
void checkKeybinds() {
if (ImGui::IsKeyPressed(ImGuiKey_Home, false)) {
setWaterfallShown(!showWaterfall);
}
}
void draw(void* ctx) {
float menuWidth = ImGui::GetContentRegionAvail().x;
bool homePressed = ImGui::IsKeyPressed(ImGuiKey_Home, false);
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || homePressed) {
if (homePressed) { showWaterfall = !showWaterfall; }
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
core::configManager.acquire();
core::configManager.conf["showWaterfall"] = showWaterfall;
core::configManager.release(true);
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall)) {
setWaterfallShown(showWaterfall);
}
if (ImGui::Checkbox("Full Waterfall Update##_sdrpp", &fullWaterfallUpdate)) {

Wyświetl plik

@ -2,5 +2,6 @@
namespace displaymenu {
void init();
void checkKeybinds();
void draw(void* ctx);
}

Wyświetl plik

@ -84,7 +84,7 @@ void SourceManager::tune(double freq) {
if (selectedHandler == NULL) {
return;
}
// TODO: No need to always retune the hardware in panadpter mode
// TODO: No need to always retune the hardware in Panadapter mode
selectedHandler->tuneHandler(((tuneMode == TuningMode::NORMAL) ? freq : ifFreq) + tuneOffset, selectedHandler->ctx);
onRetune.emit(freq);
currentFreq = freq;
@ -100,7 +100,7 @@ void SourceManager::setTuningMode(TuningMode mode) {
tune(currentFreq);
}
void SourceManager::setPanadpterIF(double freq) {
void SourceManager::setPanadapterIF(double freq) {
ifFreq = freq;
tune(currentFreq);
}

Wyświetl plik

@ -35,7 +35,7 @@ public:
void tune(double freq);
void setTuningOffset(double offset);
void setTuningMode(TuningMode mode);
void setPanadpterIF(double freq);
void setPanadapterIF(double freq);
std::vector<std::string> getSourceNames();

Wyświetl plik

@ -86,7 +86,7 @@ public:
}
// Switch source to panadapter mode
sigpath::sourceManager.setPanadpterIF(ifFreq);
sigpath::sourceManager.setPanadapterIF(ifFreq);
sigpath::sourceManager.setTuningMode(SourceManager::TuningMode::PANADAPTER);
sigpath::sourceManager.onRetune.bindHandler(&_retuneHandler);
@ -131,7 +131,7 @@ private:
ImGui::FillWidth();
if (ImGui::InputDouble(CONCAT("##_rigctl_if_freq_", _this->name), &_this->ifFreq, 100.0, 100000.0, "%.0f")) {
if (_this->running) {
sigpath::sourceManager.setPanadpterIF(_this->ifFreq);
sigpath::sourceManager.setPanadapterIF(_this->ifFreq);
}
config.acquire();
config.conf[_this->name]["ifFreq"] = _this->ifFreq;