From 3086b7852e7f1bf1af3394fdf1d98b67eba0cda5 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Thu, 20 Oct 2022 11:38:50 -0400 Subject: [PATCH] MSData Bug Fix; Disable DMR Data Superframe Debug; --- src/dmr_data.c | 7 +++++++ src/dmr_sync.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/dmr_data.c b/src/dmr_data.c index be25fb6..d725043 100644 --- a/src/dmr_data.c +++ b/src/dmr_data.c @@ -87,6 +87,13 @@ processDMRdata (dsd_opts * opts, dsd_state * state) state->currentslot = cachdata[1]; + //minor bugfix for MSData when MSData has accumulated data blocks + //(i.e. data header and 1/2 rate data), force all data into slot 0 + if (state->dmr_ms_mode == 1) + { + state->currentslot = 0; + } + if (state->currentslot == 0 && state->dmr_ms_mode == 0) { state->slot1light[0] = '['; diff --git a/src/dmr_sync.c b/src/dmr_sync.c index f8a9686..3807120 100644 --- a/src/dmr_sync.c +++ b/src/dmr_sync.c @@ -301,7 +301,7 @@ void Process34Data(dsd_opts * opts, dsd_state * state, unsigned char tdibits[98] fprintf (stderr,"%s", KNRM); //change back to normal } //Full Super Frame - Debug Output - if (opts->payload == 1 && state->data_block_counter[state->currentslot] == state->data_header_blocks[state->currentslot]) + if (opts->payload == 2 && state->data_block_counter[state->currentslot] == state->data_header_blocks[state->currentslot]) { fprintf (stderr, "%s",KGRN); fprintf (stderr, "\n Rate 3/4 Superframe - Slot [%d]\n ",slot+1); @@ -772,7 +772,7 @@ void Process1Data(dsd_opts * opts, dsd_state * state, uint8_t info[196], uint8_t } //Full Super Frame - Debug Output - if (opts->payload == 1 && state->data_block_counter[state->currentslot] == state->data_header_blocks[state->currentslot]) + if (opts->payload == 2 && state->data_block_counter[state->currentslot] == state->data_header_blocks[state->currentslot]) { fprintf (stderr, "%s",KGRN); fprintf (stderr, "\n Rate 1 Superframe - Slot [%d]\n ",slot+1); @@ -1457,7 +1457,7 @@ void Process12Data(dsd_opts * opts, dsd_state * state, uint8_t info[196], uint8_ fprintf (stderr,"%s", KNRM); } //Full Super Frame - Debug Output - if (opts->payload == 1 && state->data_block_counter[state->currentslot] == state->data_header_blocks[state->currentslot]) + if (opts->payload == 2 && state->data_block_counter[state->currentslot] == state->data_header_blocks[state->currentslot]) { fprintf (stderr, "%s",KGRN); fprintf (stderr, "\n Rate 1/2 Superframe - Slot [%d]\n ",slot+1);