bunch of stuff idk i'm tired

This commit is contained in:
Ryzerth
2021-04-22 05:38:25 +02:00
parent 72cbf741b3
commit a4c25280b3
10 changed files with 67 additions and 32 deletions

View File

@ -30,6 +30,10 @@ void VFOManager::VFO::setOffset(double offset) {
dspVFO->setOffset(wtfVFO->centerOffset);
}
double VFOManager::VFO::getOffset() {
return wtfVFO->generalOffset;
}
void VFOManager::VFO::setCenterOffset(double offset) {
wtfVFO->setCenterOffset(offset);
dspVFO->setOffset(offset);
@ -104,6 +108,13 @@ void VFOManager::setOffset(std::string name, double offset) {
vfos[name]->setOffset(offset);
}
double VFOManager::getOffset(std::string name) {
if (vfos.find(name) == vfos.end()) {
return 0;
}
return vfos[name]->getOffset();
}
void VFOManager::setCenterOffset(std::string name, double offset) {
if (vfos.find(name) == vfos.end()) {
return;

View File

@ -13,6 +13,7 @@ public:
~VFO();
void setOffset(double offset);
double getOffset();
void setCenterOffset(double offset);
void setBandwidth(double bandwidth, bool updateWaterfall = true);
void setSampleRate(double sampleRate, double bandwidth);
@ -37,6 +38,7 @@ public:
void deleteVFO(VFOManager::VFO* vfo);
void setOffset(std::string name, double offset);
double getOffset(std::string name);
void setCenterOffset(std::string name, double offset);
void setBandwidth(std::string name, double bandwidth, bool updateWaterfall = true);
void setSampleRate(std::string name, double sampleRate, double bandwidth);