diff --git a/dsd-fme2.png b/dsd-fme2.png index c5d7f13..06d0b15 100644 Binary files a/dsd-fme2.png and b/dsd-fme2.png differ diff --git a/src/p25p1_hdu.c b/src/p25p1_hdu.c index a2d68e5..fda4d53 100644 --- a/src/p25p1_hdu.c +++ b/src/p25p1_hdu.c @@ -215,6 +215,11 @@ correct_golay_dibits_6(char* corrected_hex_data, int hex_count, AnalogSignal* an void processHDU(dsd_opts* opts, dsd_state* state) { + + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; + uint8_t mi[73]; char mfid[9], algid[9], kid[17], tgid[17]; int i, j; diff --git a/src/p25p1_ldu1.c b/src/p25p1_ldu1.c index d1abd63..fe68887 100644 --- a/src/p25p1_ldu1.c +++ b/src/p25p1_ldu1.c @@ -26,6 +26,11 @@ void processLDU1 (dsd_opts* opts, dsd_state* state) { + + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; + // extracts IMBE frames from LDU frame int i; uint8_t lcformat[9], mfid[9], lcinfo[57]; diff --git a/src/p25p1_ldu2.c b/src/p25p1_ldu2.c index 8ba2f16..a3c999e 100644 --- a/src/p25p1_ldu2.c +++ b/src/p25p1_ldu2.c @@ -26,6 +26,11 @@ void processLDU2 (dsd_opts * opts, dsd_state * state) { + + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; + // extracts IMBE frames from LDU frame int i; uint8_t mi[73]; diff --git a/src/p25p1_mdpu.c b/src/p25p1_mdpu.c index 5c631bb..fd87520 100644 --- a/src/p25p1_mdpu.c +++ b/src/p25p1_mdpu.c @@ -32,6 +32,10 @@ void processMPDU(dsd_opts * opts, dsd_state * state) memset (state->s_r4, 0, sizeof(state->s_r4)); opts->slot_preference = 2; + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; + //reset some strings when returning from a call in case they didn't get zipped already sprintf (state->call_string[0], "%s", " "); //21 spaces sprintf (state->call_string[1], "%s", " "); //21 spaces diff --git a/src/p25p1_tdu.c b/src/p25p1_tdu.c index c1d3c62..d5b0833 100644 --- a/src/p25p1_tdu.c +++ b/src/p25p1_tdu.c @@ -9,6 +9,11 @@ void processTDU (dsd_opts* opts, dsd_state* state) { + + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; + AnalogSignal analog_signal_array[14]; int status_count; diff --git a/src/p25p1_tdulc.c b/src/p25p1_tdulc.c index c170a82..05b9f7f 100644 --- a/src/p25p1_tdulc.c +++ b/src/p25p1_tdulc.c @@ -215,6 +215,11 @@ read_zeros(dsd_opts* opts, dsd_state* state, AnalogSignal* analog_signal_array, void processTDULC (dsd_opts* opts, dsd_state* state) { + + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; + int i; uint8_t lcinfo[57], lcformat[9], mfid[9]; diff --git a/src/p25p1_tsbk.c b/src/p25p1_tsbk.c index 7877537..873793c 100644 --- a/src/p25p1_tsbk.c +++ b/src/p25p1_tsbk.c @@ -18,6 +18,9 @@ void processTSBK(dsd_opts * opts, dsd_state * state) memset (state->s_r4, 0, sizeof(state->s_r4)); opts->slot_preference = 2; + //push current slot to 0, just in case swapping p2 to p1 + //or stale slot value from p2 and then decoding a pdu + state->currentslot = 0; //reset some strings when returning from a call in case they didn't get zipped already sprintf (state->call_string[0], "%s", " "); //21 spaces