Skip to content

Commit

Permalink
Fixed small bug in SSB tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzerth committed Feb 2, 2021
1 parent 2f93c7a commit 29e9db1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/src/gui/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
12 changes: 7 additions & 5 deletions hackrf_source/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -89,7 +91,7 @@ class HackRFSourceModule : public ModuleManager::Instance {

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';
}

Expand All @@ -114,7 +116,7 @@ class HackRFSourceModule : public ModuleManager::Instance {
spdlog::info("HackRFSourceModule '{0}': Menu Deselect!", _this->name);
}

#pragma optimize( "", off )


static void start(void* ctx) {
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
Expand Down Expand Up @@ -145,8 +147,6 @@ class HackRFSourceModule : public ModuleManager::Instance {
_this->running = true;
spdlog::info("HackRFSourceModule '{0}': Start!", _this->name);
}

#pragma optimize( "", on )

static void stop(void* ctx) {
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
Expand Down Expand Up @@ -272,4 +272,6 @@ MOD_EXPORT void _DELETE_INSTANCE_(ModuleManager::Instance* instance) {
MOD_EXPORT void _END_() {
// config.disableAutoSave();
// config.save();
}
}

#pragma optimize( "", on )

0 comments on commit 29e9db1

Please sign in to comment.