diff options
author | Felix Erckenbrecht <dg1yfe@stus-disco.de> | 2022-03-24 22:28:08 +0100 |
---|---|---|
committer | Felix Erckenbrecht <dg1yfe@stus-disco.de> | 2022-03-24 22:28:08 +0100 |
commit | ff19a05e83ec67ec736eb5033fb5cdc900ffe3f0 (patch) | |
tree | 9e720b70bb4e67356f8fdbce6817eb4aa26e19fd | |
parent | e6c818a7d7b9e55d1c7c45dade8df4f28d3f1ea0 (diff) | |
download | osmo-fl2k-ff19a05e83ec67ec736eb5033fb5cdc900ffe3f0.tar.gz osmo-fl2k-ff19a05e83ec67ec736eb5033fb5cdc900ffe3f0.tar.bz2 osmo-fl2k-ff19a05e83ec67ec736eb5033fb5cdc900ffe3f0.zip |
Bugfix: Dont modulate twice
-rw-r--r-- | src/fl2k_iq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fl2k_iq.c b/src/fl2k_iq.c index e0f2bc7..db8d7bf 100644 --- a/src/fl2k_iq.c +++ b/src/fl2k_iq.c @@ -267,11 +267,10 @@ static inline void dds_complex(dds_t *dds, int8_t * i, int8_t * q) // get current carrier phase, add phase mod, calculate table index pi_i = (dds->phase - dds->phase_delta) >> TRIG_TABLE_SHIFT; pi_q = (dds->phase + dds->phase_delta) >> TRIG_TABLE_SHIFT; + // advance dds generator dds->phase += dds->phase_step; - - // add some extra phase modulation - dds->phase += dds->phase_delta; + // wrap around properly dds->phase &= 0xffffffff; //amp = 255; @@ -284,6 +283,7 @@ static inline void dds_complex(dds_t *dds, int8_t * i, int8_t * q) *i = (int8_t) (amp_i >> 24); // 0..31 >> 24 => 0..8 *q = (int8_t) (amp_q >> 24); // 0..31 >> 24 => 0..8 + /* advance modulation signal by interpolated input from baseband */ dds->amplitude += dds->ampslope; dds->phase_delta += dds->phase_slope; return; |