This commit is contained in:
AlexandreRouma
2022-06-20 18:15:35 +02:00
parent ce1b0d0170
commit 53afaeda9e
17 changed files with 90 additions and 29 deletions

View File

@ -4,6 +4,7 @@
VFOManager::VFO::VFO(std::string name, int reference, double offset, double bandwidth, double sampleRate, double minBandwidth, double maxBandwidth, bool bandwidthLocked) {
this->name = name;
_bandwidth = bandwidth;
dspVFO = sigpath::iqFrontEnd.addVFO(name, sampleRate, bandwidth, offset);
wtfVFO = new ImGui::WaterfallVFO;
wtfVFO->setReference(reference);
@ -41,6 +42,8 @@ void VFOManager::VFO::setCenterOffset(double offset) {
}
void VFOManager::VFO::setBandwidth(double bandwidth, bool updateWaterfall) {
if (_bandwidth == bandwidth) { return; }
_bandwidth = bandwidth;
if (updateWaterfall) { wtfVFO->setBandwidth(bandwidth); }
dspVFO->setBandwidth(bandwidth);
}

View File

@ -35,6 +35,8 @@ public:
private:
std::string name;
double _bandwidth;
};
VFOManager::VFO* createVFO(std::string name, int reference, double offset, double bandwidth, double sampleRate, double minBandwidth, double maxBandwidth, bool bandwidthLocked);