Made the file source set the frequency of the waterfall

This commit is contained in:
Ryzerth
2021-07-21 04:08:28 +02:00
parent 5f1a94c267
commit fb32b4d55a
7 changed files with 67 additions and 6 deletions

View File

@ -4,6 +4,7 @@
#include <string>
namespace tuner {
void centerTuning(std::string vfoName, double freq) {
if (vfoName != "") {
if (gui::waterfall.vfos.find(vfoName) == gui::waterfall.vfos.end()) { return; }
@ -110,6 +111,12 @@ namespace tuner {
}
}
void iqTuning(double freq) {
gui::waterfall.setCenterFrequency(freq);
gui::waterfall.centerFreqMoved = true;
sigpath::sourceManager.tune(freq);
}
void tune(int mode, std::string vfoName, double freq) {
switch (mode) {
case TUNER_MODE_CENTER:
@ -124,6 +131,9 @@ namespace tuner {
case TUNER_MODE_UPPER_HALF:
normalTuning(vfoName, freq);
break;
case TUNER_MODE_IQ_ONLY:
iqTuning(freq);
break;
}
}
}