aboutsummaryrefslogtreecommitdiffstats
path: root/src/nmt/dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nmt/dsp.c')
-rw-r--r--src/nmt/dsp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nmt/dsp.c b/src/nmt/dsp.c
index 6086d62..b95191b 100644
--- a/src/nmt/dsp.c
+++ b/src/nmt/dsp.c
@@ -152,6 +152,9 @@ int dsp_init_sender(nmt_t *nmt, double deviation_factor)
/* dtmf */
dtmf_init(&nmt->dtmf, 8000);
+ nmt->dmp_frame_level = display_measurements_add(&nmt->sender, "Frame Level", "%.1f %% (last)", DISPLAY_MEAS_LAST, DISPLAY_MEAS_LEFT, 0.0, 150.0, 100.0);
+ nmt->dmp_frame_quality = display_measurements_add(&nmt->sender, "Frame Quality", "%.1f %% (last)", DISPLAY_MEAS_LAST, DISPLAY_MEAS_LEFT, 0.0, 100.0, 100.0);
+
return 0;
}
@@ -242,6 +245,10 @@ static void fsk_receive_bit(void *inst, int bit, double quality, double level)
}
level /= 140.0; quality /= 140.0;
+ /* update measurements */
+ display_measurements_update(nmt->dmp_frame_level, level * 100.0, 0.0);
+ display_measurements_update(nmt->dmp_frame_quality, quality * 100.0, 0.0);
+
/* send telegramm */
frames_elapsed = (nmt->rx_bits_count_current - nmt->rx_bits_count_last + 83) / 166; /* round to nearest frame */
/* convert level so that received level at TX_PEAK_FSK results in 1.0 (100%) */