From 5cfd7f1dc2bb04a5d44a76344b5170ecb20c7704 Mon Sep 17 00:00:00 2001 From: Brumi-2021 <86470699+Brumi-2021@users.noreply.github.com> Date: Sat, 12 Aug 2023 17:57:16 +0200 Subject: [PATCH] Small error correction to PR 1367 (#1368) --- firmware/application/ui_record_view.cpp | 3 ++- firmware/common/oversample.hpp | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/application/ui_record_view.cpp b/firmware/application/ui_record_view.cpp index c4484ffc0..0805c5859 100644 --- a/firmware/application/ui_record_view.cpp +++ b/firmware/application/ui_record_view.cpp @@ -113,7 +113,8 @@ uint32_t RecordView::set_sampling_rate(uint32_t new_sampling_rate) { * They are ok as recorded spectrum indication, but they should not be used by Replay app. (the voice speed will be accelerated) * We keep original black background in all the correct IQ .C16 files BW's Options. */ - if ((actual_sampling_rate > 8'000'000) || (actual_sampling_rate <= 1'280'000)) { // yellow REC button means not ok for REC, BW >1Mhz , BW < 150khz + if ((actual_sampling_rate > 8'000'000) || (actual_sampling_rate <= 1'600'000)) { // yellow REC button means not ok for REC, BW >1Mhz , BW <= 100khz due to NG aliasing. + // to be updated or removed in the next PR's, according the achieved extended BW's with good quality bandwith REC limits . button_record.set_background(ui::Color::yellow()); } else { button_record.set_background(ui::Color::black()); diff --git a/firmware/common/oversample.hpp b/firmware/common/oversample.hpp index c2c8c6988..2be56df92 100644 --- a/firmware/common/oversample.hpp +++ b/firmware/common/oversample.hpp @@ -46,12 +46,11 @@ * The oversample rate is used to increase the sample rate to improve SNR and quality. * This is also used as the interpolation rate when replaying captures. */ inline OversampleRate get_oversample_rate(uint32_t sample_rate) { - if (sample_rate < 50'000) return OversampleRate::x128; // 25kk ,16k, 12k5 - if (sample_rate < 100'000) return OversampleRate::x64; // 50k - if (sample_rate < 150'000) return OversampleRate::x32; // 100k - if (sample_rate < 250'000) return OversampleRate::x16; // 150k only + if (sample_rate < 50'000) return OversampleRate::x128; // 25kk..12k5, prepared for future, OVS ok, but decim. :128 still not implemented. + if (sample_rate < 100'000) return OversampleRate::x64; // 50k, prepared for future, OVS ok, but decim. :64 still not implemented. + if (sample_rate < 250'000) return OversampleRate::x16; // Now tentatively applied to 150k..100k - but as soon as we got decim :32, (150k x16, and 100k x32) - return OversampleRate::x8; // 250k .. 1Mhz + return OversampleRate::x8; // 250k .. 1Mhz, that decim :8 , is already applied.(OVS and decim OK) } /* Gets the actual sample rate for a given sample rate.