mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 21:58:37 -05:00
Fix off-by-one error and missing modem bw defaults
This commit is contained in:
parent
744db7ea98
commit
423b590d7c
@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.8)
|
|||||||
|
|
||||||
SET(CUBICSDR_VERSION_MAJOR "0")
|
SET(CUBICSDR_VERSION_MAJOR "0")
|
||||||
SET(CUBICSDR_VERSION_MINOR "1")
|
SET(CUBICSDR_VERSION_MINOR "1")
|
||||||
SET(CUBICSDR_VERSION_PATCH "19")
|
SET(CUBICSDR_VERSION_PATCH "20")
|
||||||
SET(CUBICSDR_VERSION_REL "alpha")
|
SET(CUBICSDR_VERSION_REL "alpha")
|
||||||
SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}-${CUBICSDR_VERSION_REL}")
|
SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}-${CUBICSDR_VERSION_REL}")
|
||||||
|
|
||||||
|
@ -984,6 +984,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
|||||||
// basic demodulators
|
// basic demodulators
|
||||||
if (dSelection != "" && dSelection != mgr->getLastDemodulatorType()) {
|
if (dSelection != "" && dSelection != mgr->getLastDemodulatorType()) {
|
||||||
mgr->setLastDemodulatorType(dSelection);
|
mgr->setLastDemodulatorType(dSelection);
|
||||||
|
mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelection));
|
||||||
demodTuner->setHalfBand(dSelection=="USB" || dSelection=="LSB");
|
demodTuner->setHalfBand(dSelection=="USB" || dSelection=="LSB");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -405,6 +405,7 @@ void SpectrumVisualProcessor::process() {
|
|||||||
double visualAccum = 0;
|
double visualAccum = 0;
|
||||||
double acc = 0, accCount = 0, i = 0;
|
double acc = 0, accCount = 0, i = 0;
|
||||||
|
|
||||||
|
|
||||||
for (int x = 0, xMax = output->spectrum_points.size() / 2; x < xMax; x++) {
|
for (int x = 0, xMax = output->spectrum_points.size() / 2; x < xMax; x++) {
|
||||||
visualAccum += visualRatio * double(SPECTRUM_VZM);
|
visualAccum += visualRatio * double(SPECTRUM_VZM);
|
||||||
// while (visualAccum >= 1.0) {
|
// while (visualAccum >= 1.0) {
|
||||||
@ -420,8 +421,8 @@ void SpectrumVisualProcessor::process() {
|
|||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
idx = 0;
|
idx = 0;
|
||||||
}
|
}
|
||||||
if (idx > fftSizeInternal) {
|
if (idx > fftSizeInternal-1) {
|
||||||
idx = fftSizeInternal;
|
idx = fftSizeInternal-1;
|
||||||
}
|
}
|
||||||
acc += fft_result_maa[idx];
|
acc += fft_result_maa[idx];
|
||||||
accCount += 1.0;
|
accCount += 1.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user