Fixed small bug in SSB tuning

pull/66/head
Ryzerth 2021-02-02 21:49:35 +01:00
rodzic 2f93c7ae58
commit 29e9db184f
2 zmienionych plików z 9 dodań i 7 usunięć

Wyświetl plik

@ -299,7 +299,7 @@ void setVFO(double freq) {
if (vfoBottom < bottom) {
gui::waterfall.setViewOffset((BW / 2.0) - (viewBW / 2.0));
double newVFOOffset = (BW / 2.0) - (vfoBW / 2.0) - (viewBW / 10.0);
sigpath::vfoManager.setCenterOffset(gui::waterfall.selectedVFO, newVFOOffset);
sigpath::vfoManager.setOffset(gui::waterfall.selectedVFO, newVFOOffset);
gui::waterfall.setCenterFrequency(freq - newVFOOffset);
sigpath::sourceManager.tune(freq - newVFOOffset);
return;
@ -309,7 +309,7 @@ void setVFO(double freq) {
if (vfoTop > top) {
gui::waterfall.setViewOffset((viewBW / 2.0) - (BW / 2.0));
double newVFOOffset = (vfoBW / 2.0) - (BW / 2.0) + (viewBW / 10.0);
sigpath::vfoManager.setCenterOffset(gui::waterfall.selectedVFO, newVFOOffset);
sigpath::vfoManager.setOffset(gui::waterfall.selectedVFO, newVFOOffset);
gui::waterfall.setCenterFrequency(freq - newVFOOffset);
sigpath::sourceManager.tune(freq - newVFOOffset);
return;

Wyświetl plik

@ -8,6 +8,8 @@
#include <config.h>
#include <libhackrf/hackrf.h>
#pragma optimize( "", off )
#define CONCAT(a, b) ((std::string(a) + b).c_str())
SDRPP_MOD_INFO {
@ -89,7 +91,7 @@ public:
for (int i = 0; i < _devList->devicecount; i++) {
devList.push_back(_devList->serial_numbers[i]);
devListTxt += _devList->serial_numbers[i];
devListTxt += (char*)(_devList->serial_numbers[i] + 16);
devListTxt += '\0';
}
@ -114,7 +116,7 @@ private:
spdlog::info("HackRFSourceModule '{0}': Menu Deselect!", _this->name);
}
#pragma optimize( "", off )
static void start(void* ctx) {
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
@ -145,8 +147,6 @@ private:
_this->running = true;
spdlog::info("HackRFSourceModule '{0}': Start!", _this->name);
}
#pragma optimize( "", on )
static void stop(void* ctx) {
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
@ -272,4 +272,6 @@ MOD_EXPORT void _DELETE_INSTANCE_(ModuleManager::Instance* instance) {
MOD_EXPORT void _END_() {
// config.disableAutoSave();
// config.save();
}
}
#pragma optimize( "", on )