changeset 472:d80ccb3c3970

gsmefr-dlcap-sync: use DHF datum in the library
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 14 May 2024 07:30:48 +0000
parents b5f8ea41362b
children 2d46abdfbe91
files efrtest/Makefile efrtest/dlcap-sync.c
diffstat 2 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/efrtest/Makefile	Tue May 14 07:25:06 2024 +0000
+++ b/efrtest/Makefile	Tue May 14 07:30:48 2024 +0000
@@ -34,7 +34,7 @@
 	${CC} ${CFLAGS} -o $@ $^
 
 gsmefr-dlcap-sync:	dlcap-sync.o sync-from-pcma.o sync-from-pcmu.o tidsp.o \
-			${LIBTEST}
+			${LIBTEST} ${LIBEFR}
 	${CC} ${CFLAGS} -o $@ $^
 
 gsmefr-encode:	encode.o ${LIBTEST} ${LIBEFR}
--- a/efrtest/dlcap-sync.c	Tue May 14 07:25:06 2024 +0000
+++ b/efrtest/dlcap-sync.c	Tue May 14 07:30:48 2024 +0000
@@ -12,11 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
-
-static const uint8_t efr_dhf[31] = {
-0xC0,0x85,0xEB,0x49,0x0F,0xAA,0xD6,0x03,0xE3,0xA1,0x86,0x07,0xB0,0xC4,0x2C,0x08,
-0x04,0x80,0x55,0x80,0x00,0x00,0x00,0x00,0x03,0x6B,0x00,0x00,0x00,0x00,0x00,
-};
+#include "../libgsmefr/gsm_efr.h"
 
 static const uint8_t mr122_dhf[31] = {
 0xC0,0x85,0x4D,0xB9,0x6A,0xAA,0xD6,0x00,0x00,0x00,0x00,0x01,0xB5,0x87,0xF6,0x68,
@@ -95,7 +91,7 @@
 			continue;
 		}
 		efr_tidsp_to_std(tidsp_bytes, efr_bytes);
-		if (!bcmp(efr_bytes, efr_dhf, 31)) {
+		if (!bcmp(efr_bytes, EFR_decoder_homing_frame, 31)) {
 			dhf_state = 1;
 			continue;
 		}