mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 04:08:36 -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_MINOR "1")
|
||||
SET(CUBICSDR_VERSION_PATCH "19")
|
||||
SET(CUBICSDR_VERSION_PATCH "20")
|
||||
SET(CUBICSDR_VERSION_REL "alpha")
|
||||
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
|
||||
if (dSelection != "" && dSelection != mgr->getLastDemodulatorType()) {
|
||||
mgr->setLastDemodulatorType(dSelection);
|
||||
mgr->setLastBandwidth(Modem::getModemDefaultSampleRate(dSelection));
|
||||
demodTuner->setHalfBand(dSelection=="USB" || dSelection=="LSB");
|
||||
}
|
||||
#endif
|
||||
|
@ -405,6 +405,7 @@ void SpectrumVisualProcessor::process() {
|
||||
double visualAccum = 0;
|
||||
double acc = 0, accCount = 0, i = 0;
|
||||
|
||||
|
||||
for (int x = 0, xMax = output->spectrum_points.size() / 2; x < xMax; x++) {
|
||||
visualAccum += visualRatio * double(SPECTRUM_VZM);
|
||||
// while (visualAccum >= 1.0) {
|
||||
@ -420,8 +421,8 @@ void SpectrumVisualProcessor::process() {
|
||||
if (idx < 0) {
|
||||
idx = 0;
|
||||
}
|
||||
if (idx > fftSizeInternal) {
|
||||
idx = fftSizeInternal;
|
||||
if (idx > fftSizeInternal-1) {
|
||||
idx = fftSizeInternal-1;
|
||||
}
|
||||
acc += fft_result_maa[idx];
|
||||
accCount += 1.0;
|
||||
|
Loading…
Reference in New Issue
Block a user