aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-07-24 16:18:10 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-08-08 12:53:34 +0200
commit6c6402571758340c640bd2350599ff6a9e5ffeb6 (patch)
tree3492e67b9e9ec10d478aace75385c65003d96523 /src/test
parent92ce6d4a428bb72692800ef32b5b80e69fef032b (diff)
Move FFSK modem from NMT to common code, so it can be used by other networks
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_dms.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_dms.c b/src/test/test_dms.c
index a35a6f1..c71f87c 100644
--- a/src/test/test_dms.c
+++ b/src/test/test_dms.c
@@ -56,14 +56,12 @@ void dms_all_sent(nmt_t *nmt)
}
/* receive bits from DMS */
-int fsk_render_frame(nmt_t *nmt, const char *frame, int length, sample_t *sample)
+void test_dms_frame(const char *frame, int length)
{
printf("(getting %d bits from DMS layer)\n", length);
memcpy(current_bits, frame, length);
current_bit_count = length;
-
- return nmt->fsk_samples_per_bit * length;
}
nmt_t *alloc_nmt(void)
@@ -71,9 +69,11 @@ nmt_t *alloc_nmt(void)
nmt_t *nmt;
nmt = calloc(sizeof(*nmt), 1);
+ nmt->sender.samplerate = 40 * 1200;
dms_init_sender(nmt);
- nmt->fsk_samples_per_bit = 40;
- nmt->dms.frame_size = nmt->fsk_samples_per_bit * 127 + 10;
+ ffsk_global_init(1.0);
+ ffsk_init(&nmt->ffsk, nmt, NULL, 1, nmt->sender.samplerate);
+ nmt->dms.frame_size = nmt->ffsk.samples_per_bit * 127 + 10;
nmt->dms.frame_spl = calloc(nmt->dms.frame_size, sizeof(nmt->dms.frame_spl[0]));
dms_reset(nmt);