Skip to content

Commit 29e9db1

Browse files
author
Ryzerth
committed
Fixed small bug in SSB tuning
1 parent 2f93c7a commit 29e9db1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

core/src/gui/main_window.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void setVFO(double freq) {
299299
if (vfoBottom < bottom) {
300300
gui::waterfall.setViewOffset((BW / 2.0) - (viewBW / 2.0));
301301
double newVFOOffset = (BW / 2.0) - (vfoBW / 2.0) - (viewBW / 10.0);
302-
sigpath::vfoManager.setCenterOffset(gui::waterfall.selectedVFO, newVFOOffset);
302+
sigpath::vfoManager.setOffset(gui::waterfall.selectedVFO, newVFOOffset);
303303
gui::waterfall.setCenterFrequency(freq - newVFOOffset);
304304
sigpath::sourceManager.tune(freq - newVFOOffset);
305305
return;
@@ -309,7 +309,7 @@ void setVFO(double freq) {
309309
if (vfoTop > top) {
310310
gui::waterfall.setViewOffset((viewBW / 2.0) - (BW / 2.0));
311311
double newVFOOffset = (vfoBW / 2.0) - (BW / 2.0) + (viewBW / 10.0);
312-
sigpath::vfoManager.setCenterOffset(gui::waterfall.selectedVFO, newVFOOffset);
312+
sigpath::vfoManager.setOffset(gui::waterfall.selectedVFO, newVFOOffset);
313313
gui::waterfall.setCenterFrequency(freq - newVFOOffset);
314314
sigpath::sourceManager.tune(freq - newVFOOffset);
315315
return;

hackrf_source/src/main.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <config.h>
99
#include <libhackrf/hackrf.h>
1010

11+
#pragma optimize( "", off )
12+
1113
#define CONCAT(a, b) ((std::string(a) + b).c_str())
1214

1315
SDRPP_MOD_INFO {
@@ -89,7 +91,7 @@ class HackRFSourceModule : public ModuleManager::Instance {
8991

9092
for (int i = 0; i < _devList->devicecount; i++) {
9193
devList.push_back(_devList->serial_numbers[i]);
92-
devListTxt += _devList->serial_numbers[i];
94+
devListTxt += (char*)(_devList->serial_numbers[i] + 16);
9395
devListTxt += '\0';
9496
}
9597

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

117-
#pragma optimize( "", off )
119+
118120

119121
static void start(void* ctx) {
120122
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
@@ -145,8 +147,6 @@ class HackRFSourceModule : public ModuleManager::Instance {
145147
_this->running = true;
146148
spdlog::info("HackRFSourceModule '{0}': Start!", _this->name);
147149
}
148-
149-
#pragma optimize( "", on )
150150

151151
static void stop(void* ctx) {
152152
HackRFSourceModule* _this = (HackRFSourceModule*)ctx;
@@ -272,4 +272,6 @@ MOD_EXPORT void _DELETE_INSTANCE_(ModuleManager::Instance* instance) {
272272
MOD_EXPORT void _END_() {
273273
// config.disableAutoSave();
274274
// config.save();
275-
}
275+
}
276+
277+
#pragma optimize( "", on )

0 commit comments

Comments
 (0)