Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remaining necessary mods #22

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/fm-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
* Stereo sideband test (after activating compile switch DO_STEREO_SEPARATION_TEST)
* 1) Select "T|T" to hear the ortogonal demodulated sideband signal
* 2) Check different station with the IQ balance slider whether the signal get minimal at center "0" position
* 3) You can also see in the RDS IQ scope the remaing phase (Costas Loop is switched off)
* 3) You can also see in the RDS IQ scope (only for RDS 2) the remaing phase (Costas Loop is switched off)
*/
#define DO_STEREO_SEPARATION_TEST
// #define DO_STEREO_SEPARATION_TEST

#ifndef __FREEBSD__
#include <malloc.h>
Expand Down
2 changes: 1 addition & 1 deletion includes/scopes-qwt6/ls-scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Q_OBJECT
void mapSpectrum (std::complex<float> *in,
bool showFull,
double *const out,
int32_t ioZoomFactor);
int & ioZoomFactor);

int averageCount;
int displaySize;
Expand Down
4 changes: 2 additions & 2 deletions radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,8 @@ int16_t bl, br;
#else
bl = 100 - n;
br = 100 + n;
attValueL = currAttSliderValue * (float)bl / 100;
attValueR = currAttSliderValue * (float)br / 100;
attValueL = (float)bl / 100;
attValueR = (float)br / 100;
if (myFMprocessor != nullptr)
myFMprocessor -> setAttenuation (attValueL, attValueR);
#endif
Expand Down
1 change: 0 additions & 1 deletion radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ Q_OBJECT

uint8_t HFviewMode;
uint8_t inputMode;
int16_t currAttSliderValue;
float attValueL;
float attValueR;

Expand Down
9 changes: 4 additions & 5 deletions src/fm/fm-processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
this -> lfBuffer = lfBuffer;
this -> thresHold = thresHold;
this -> scanning = false;
this -> Lgain = 20;
this -> Rgain = 20;
this -> Lgain = 1;
this -> Rgain = 1;

this -> lowPassFrequency = 15000;
this -> newAudioFilter. store (false);
Expand Down Expand Up @@ -605,8 +605,7 @@ int iqCounter = 0;
spectrumBuffer_lf. push_back (std::complex<float> (0, 0));
break;
case ELfPlot::IF_FILTERED:
// TODO: somehow the IF level got much higher, reduce level here for the scope
spectrumBuffer_lf. push_back (v * 0.05f);
spectrumBuffer_lf. push_back (v);
break;
case ELfPlot::DEMODULATOR:
spectrumBuffer_lf. push_back (demod);
Expand Down Expand Up @@ -862,7 +861,7 @@ void fmProcessor::triggerFrequencyChange() {

void fmProcessor::restartPssAnalyzer () {
pilotDelayPSS = 0;
pPSS. reset (); // TODO shift this as it is called while RDS switch, too
pPSS. reset ();
}

void fmProcessor::resetRds () {
Expand Down
2 changes: 1 addition & 1 deletion src/rds/rds-decoder-2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ std::complex<float> r;
v = doMatchFiltering (v);
v = my_AGC. process_sample (v);
if (process_sample (v, r)) {
#ifdef DO_STEREO_SEPARATION_TEST
#ifndef DO_STEREO_SEPARATION_TEST
r = my_Costas. process_sample (r);
#endif
bool theBit = (real (r) >= 0);
Expand Down
8 changes: 4 additions & 4 deletions src/scopes-qwt6/ls-scope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ double Y_values [displaySize];
for (int i = 0; i < displaySize; i++) {
X_axis [i] =
(-(sampleRate / 2.0) + (2 * i * temp)) /
((double)Khz(1)); // two side spectrum
((double)Khz(1)) / zoomFactor; // two side spectrum
}
}
else {
for (int i = 0; i < displaySize; i++) {
X_axis [i] = (i * temp) / ((double)Khz (1)) /zoomFactor; // one-side spectrum
X_axis [i] = (i * temp) / ((double)Khz (1)) / zoomFactor; // one-side spectrum
}
}

Expand All @@ -130,10 +130,10 @@ double Y_values [displaySize];
void ls_scope::mapSpectrum (std::complex<float> *in,
bool showFull,
double *out,
int ioZoomFactor) {
int & ioZoomFactor) {
int16_t factor = spectrumSize / displaySize; // typ factor = 4 (whole divider)

// if (showFull)
if (!showFull)
factor /= 2;

if (factor / ioZoomFactor >= 1) {
Expand Down