kopia lustrzana https://github.com/AlexandreRouma/SDRPlusPlus
Porównaj commity
2 Commity
a987c112a3
...
021928bbda
Autor | SHA1 | Data |
---|---|---|
AlexandreRouma | 021928bbda | |
AlexandreRouma | 7c933d5103 |
|
@ -463,6 +463,8 @@ void MainWindow::draw() {
|
|||
}
|
||||
}
|
||||
|
||||
// Process menu keybinds
|
||||
displaymenu::checkKeybinds();
|
||||
|
||||
// Left Column
|
||||
lockWaterfallControls = false;
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
namespace displaymenu {
|
||||
void init();
|
||||
void checkKeybinds();
|
||||
void draw(void* ctx);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue