From 76b6aa46bd3ac82fbb9b1a1a693f639257341ddf Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Sun, 26 Nov 2023 12:01:07 -0500 Subject: [PATCH] DMR/P25 - 34 Point[0] fix; crc_valid array size; --- include/dsd.h | 2 +- src/dmr_34.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/dsd.h b/include/dsd.h index 82c1f94..3a8a5fa 100644 --- a/include/dsd.h +++ b/include/dsd.h @@ -601,7 +601,7 @@ typedef struct uint8_t dmr_pdu_sf[2][24*128]; //unified pdu 'superframe' //[slot][byte] -- increased capacity to 127(+1) full rate blocks uint8_t cap_plus_csbk_bits[2][12*8*8]; //CSBK Cap+ FL initial and appended block bit storage, by slot uint8_t cap_plus_block_num[2]; //received block number storage -- per timeslot - uint8_t data_block_crc_valid[2][25]; //flag each individual block as good crc on confirmed data + uint8_t data_block_crc_valid[2][127]; //flag each individual block as good crc on confirmed data char dmr_embedded_signalling[2][7][48]; //embedded signalling 2 slots by 6 vc by 48 bits (replacing TS1SuperFrame.TimeSlotRawVoiceFrame.Sync structure) char dmr_cach_fragment[4][17]; //unsure of size, will need to check/verify diff --git a/src/dmr_34.c b/src/dmr_34.c index 596eec7..d1f3601 100644 --- a/src/dmr_34.c +++ b/src/dmr_34.c @@ -1,9 +1,9 @@ /*------------------------------------------------------------------------------- * dmr_34.c - * DMR 3/4 Rate Simple Trellis Decoder + * DMR (and P25) 3/4 Rate Simple Trellis Decoder * * LWVMOBILE - * 2023-10 DSD-FME Florida Man Edition + * 2023-12 DSD-FME Florida Man Edition *-----------------------------------------------------------------------------*/ #include "dsd.h" @@ -41,7 +41,7 @@ uint8_t fix_34(uint8_t * p, uint8_t state, int position) uint8_t temp_s, tri, t; //status of surviving paths -- debug - int s[8]; UNUSED(s); UNUSED(survivors); + int s[8]; memset (s, 0, 8*sizeof(int)); //assign all potentially correct points to temporary storage @@ -111,7 +111,7 @@ uint8_t fix_34(uint8_t * p, uint8_t state, int position) } //debug - // fprintf (stderr, "START: %d; BEST_P: %d; BEST_V: %d; Survivors: %d; Point: %d", position, best_p, best_v, survivors, temp_p[best_v]); + // fprintf (stderr, "START: %d; BEST_P: %d; BEST_V: %d; Survivors: %d; Point: %d; ", position, best_p, best_v, survivors, temp_p[best_v]); return temp_p[best_v]; //return the point value of the best path's starting point value } @@ -180,7 +180,7 @@ uint32_t dmr_34(uint8_t * input, uint8_t treturn[18]) // point[i] ^= 7; //lucky number 7 (0111) //fallback //decrement one and resume decoding - if (i != 0) i--; + i--; }