New features + waterfall code cleanup

This commit is contained in:
Ryzerth
2021-04-17 22:37:50 +02:00
parent d1e553f05a
commit d91934955b
18 changed files with 263 additions and 84 deletions

View File

@@ -87,6 +87,7 @@ public:
_vfo->setSampleRate(bbSampRate, bw);
_vfo->setSnapInterval(snapInterval);
_vfo->setReference(ImGui::WaterfallVFO::REF_CENTER);
_vfo->setBandwidthLimits(bwMin, bwMax, false);
}
void setVFO(VFOManager::VFO* vfo) {
@@ -133,6 +134,14 @@ public:
_config->aquire();
_config->conf[uiPrefix]["CW"]["bandwidth"] = bw;
_config->release(true);
}if (running) {
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->conf[uiPrefix]["CW"]["bandwidth"] = bw;
_config->release(true);
}
}
ImGui::Text("Snap Interval");
@@ -158,9 +167,9 @@ public:
}
private:
void setBandwidth(float bandWidth) {
void setBandwidth(float bandWidth, bool updateWaterfall = true) {
bw = bandWidth;
_vfo->setBandwidth(bw);
_vfo->setBandwidth(bw, updateWaterfall);
}
void setSnapInterval(float snapInt) {