aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2019-11-17 10:09:42 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2019-11-29 15:58:59 +0100
commitdb1fee9698f4859eb2f2ec4c71321b305a267928 (patch)
treea7ad7fcb9c0cc73e24986017b9fe5ba556560f8c /src
parent23bb88ef6e2bdefd76e61afc4805e3fd92860ea4 (diff)
minor code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/bnetz/dialer.c1
-rw-r--r--src/imts/dialer.c1
-rw-r--r--src/libfsk/fsk.c9
3 files changed, 4 insertions, 7 deletions
diff --git a/src/bnetz/dialer.c b/src/bnetz/dialer.c
index 31ef86e..15289e0 100644
--- a/src/bnetz/dialer.c
+++ b/src/bnetz/dialer.c
@@ -69,7 +69,6 @@ wave_rec_t wave_tx_rec;
/* dummy functions */
int num_kanal = 1; /* only one channel used for debugging */
-void display_status_limit_scroll() {}
void *get_sender_by_empfangsfrequenz() { return NULL; }
void display_measurements_add() {}
void display_measurements_update() {}
diff --git a/src/imts/dialer.c b/src/imts/dialer.c
index a68ae05..c53a03f 100644
--- a/src/imts/dialer.c
+++ b/src/imts/dialer.c
@@ -63,7 +63,6 @@ wave_rec_t wave_tx_rec;
/* dummy functions */
int num_kanal = 1; /* only one channel used for debugging */
-void display_status_limit_scroll() {}
void *get_sender_by_empfangsfrequenz() { return NULL; }
void display_measurements_add() {}
void display_measurements_update() {}
diff --git a/src/libfsk/fsk.c b/src/libfsk/fsk.c
index 2c307c3..1a4de84 100644
--- a/src/libfsk/fsk.c
+++ b/src/libfsk/fsk.c
@@ -305,7 +305,7 @@ void fsk_demod_receive(fsk_demod_t *fsk, sample_t *sample, int length)
else
bit = fsk->high_bit;
#ifdef DEBUG_FILTER
- printf("|%s| %.3f\n", debug_amplitude(f / fabs(fsk->f0_deviation)), f / fabs(fsk->f0_deviation));
+ printf("|%s| %.3f\n", debug_amplitude(f / fabs(fsk->f0_deviation) / 2), f / fabs(fsk->f0_deviation));
#endif
@@ -330,7 +330,7 @@ void fsk_demod_receive(fsk_demod_t *fsk, sample_t *sample, int length)
* since we filter out the unwanted modulation product, the vector is only half of length */
level = sqrt(I[i] * I[i] + Q[i] * Q[i]) * 2.0;
#ifdef DEBUG_FILTER
- printf("prematurely bit change (level=%.3f)\n", level / fsk->level);
+ printf("prematurely bit change (level=%.3f)\n", level);
#endif
/* quality is 0.0, because a prematurely level change is caused by noise and has nothing to measure. */
fsk->receive_bit(fsk->inst, fsk->rx_bit, 0.0, level);
@@ -351,10 +351,9 @@ void fsk_demod_receive(fsk_demod_t *fsk, sample_t *sample, int length)
if (quality < 0)
quality = 0;
#ifdef DEBUG_FILTER
- printf("sample (level=%.3f, quality=%.3f)\n", level / fsk->level, quality);
+ printf("sample (level=%.3f, quality=%.3f)\n", level, quality);
#endif
- /* adjust the values, because this is best we can get from fm demodulator */
- fsk->receive_bit(fsk->inst, bit, quality / 0.95, level);
+ fsk->receive_bit(fsk->inst, bit, quality, level);
fsk->rx_bitpos -= 1.0;
fsk->rx_change = 0;
}