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

Bugfix Third Party Filtering #433

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Increase max AFSK filter size.
  • Loading branch information
wb2osz authored and F4FXL committed Jan 1, 2023
commit d05ac40c8c56308a21180d19ecedf2add107002e
13 changes: 11 additions & 2 deletions src/fsk_demod_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#ifndef FSK_DEMOD_STATE_H

#include <stdint.h> // int64_t

#include "rpack.h"

#include "audio.h" // for enum modem_t
Expand Down Expand Up @@ -43,8 +45,9 @@ typedef struct cic_s {
} cic_t;


#define MAX_FILTER_SIZE 404 /* 401 is needed for profile A, 300 baud & 44100. Revisit someday. */

#define MAX_FILTER_SIZE 480 /* 401 is needed for profile A, 300 baud & 44100. Revisit someday. */
// Size comes out to 417 for 1200 bps with 48000 sample rate
// v1.7 - Was 404. Bump up to 480.

struct demodulator_state_s
{
Expand Down Expand Up @@ -216,6 +219,12 @@ struct demodulator_state_s
signed int prev_d_c_pll; // Previous value of above, before
// incrementing, to detect overflows.

int pll_symbol_count; // Number symbols during time nudge_total is accumulated.
int64_t pll_nudge_total; // Sum of DPLL nudge amounts.
// Both of these are cleared at start of frame.
// At end of frame, we can see if incoming
// baud rate is a little off.

int prev_demod_data; // Previous data bit detected.
// Used to look for transitions.
float prev_demod_out_f;
Expand Down