From c5cf88ce575b4fb35628e30b3a5f2e246f060c8d Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 6 Jan 2017 12:22:51 +0100 Subject: Prepare for SDR: Add bandwidth and deviation info to sender instance --- src/amps/dsp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/amps/dsp.c') diff --git a/src/amps/dsp.c b/src/amps/dsp.c index 776ec3b..4b7e08b 100644 --- a/src/amps/dsp.c +++ b/src/amps/dsp.c @@ -99,6 +99,7 @@ #define PI M_PI +#define BANDWIDTH 20000.0 /* maximum bandwidth */ #define FSK_DEVIATION 32767.0 /* +-8 KHz */ #define SAT_DEVIATION 8192.0 /* +-2 KHz */ #define COMPANDOR_0DB 45000 /* works quite well */ @@ -191,6 +192,10 @@ int dsp_init_sender(amps_t *amps, int high_pass, int tolerant) PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Init DSP for transceiver.\n"); + /* set deviation and modulation parameters */ + amps->sender.bandwidth = BANDWIDTH; + amps->sender.sample_deviation = 8000.0 / (double)FSK_DEVIATION; + if (amps->sender.samplerate < 96000) { PDEBUG(DDSP, DEBUG_ERROR, "Sample rate must be at least 96000 Hz to process FSK and SAT signals.\n"); return -EINVAL; -- cgit v1.2.3