Pocsag UX Revamp (#1408)

* Set bandwidth_filter in pogsac

* WIP pocsag UI revamp

* Settings UI, better console, UI Revamp

* Add baud rate to error messages

* Reset last_addr in error cases

* Show malformed messages as different color vs hiding

* Use light grey to indicate low quality decode

---------

Co-authored-by: kallanreed <kallanreed@noreply.github.com>
This commit is contained in:
Kyle Reed
2023-08-25 14:45:02 -07:00
committed by GitHub
parent f4496d8f45
commit 9af1308e29
5 changed files with 247 additions and 115 deletions

View File

@@ -28,7 +28,7 @@
#include <cstdint>
#include <cstddef>
#include <algorithm> // std::max
#include <algorithm>
#include <cmath>
void POCSAGProcessor::execute(const buffer_c8_t& buffer) {
@@ -41,7 +41,7 @@ void POCSAGProcessor::execute(const buffer_c8_t& buffer) {
const auto decim_1_out = decim_1.execute(decim_0_out, dst_buffer);
const auto channel_out = channel_filter.execute(decim_1_out, dst_buffer);
auto audio = demod.execute(channel_out, audio_buffer);
smooth.Process(audio.p, audio.count); // Smooth the data to make decoding more accurate
smooth.Process(audio.p, audio.count); // Smooth the data to make decoding more accurate
audio_output.write(audio);
processDemodulatedSamples(audio.p, 16);
@@ -90,10 +90,13 @@ void POCSAGProcessor::configure() {
decim_0.configure(taps_11k0_decim_0.taps, 33554432);
decim_1.configure(taps_11k0_decim_1.taps, 131072);
channel_filter.configure(taps_11k0_channel.taps, 2);
demod.configure(demod_input_fs, 4500);
demod.configure(demod_input_fs, 4'500); // FSK +/- 4k5Hz.
// Smoothing should be roughly sample rate over max baud
// 24k / 3.2k is 7.5
smooth.SetSize(8);
// TODO: support squelch?
// audio_output.configure(message.audio_hpf_config, message.audio_deemph_config, (float)message.squelch_level / 100.0);
audio_output.configure(false);
// Set up the frame extraction, limits of baud

View File

@@ -48,7 +48,7 @@ using namespace std;
template <class ValType, class CalcType>
class SmoothVals {
protected:
ValType* m_lastVals; // Previoius N values
ValType* m_lastVals; // Previous N values
int m_size; // The size N
CalcType m_sumVal; // Running sum of lastVals
int m_pos; // Current position in last vals ring buffer