aboutsummaryrefslogtreecommitdiffstats
path: root/src/amps
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-06 12:22:51 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:00:47 +0100
commitc5cf88ce575b4fb35628e30b3a5f2e246f060c8d (patch)
tree7ec799cd074fa6740a50fa2b4c226570408cd4aa /src/amps
parent9ff8c3bb25422e100801f90c17b9c21118920cfd (diff)
Prepare for SDR: Add bandwidth and deviation info to sender instance
Diffstat (limited to 'src/amps')
-rw-r--r--src/amps/dsp.c5
1 files changed, 5 insertions, 0 deletions
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;