diff --git a/src/dsd_main.c b/src/dsd_main.c index 5531ef3..1d2616b 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -220,6 +220,15 @@ if(opts->frame_m17 == 1) //&& opts->audio_in_type == 5 opts->slot1_on = 1; opts->slot2_on = 1; } + //if P25p1 SNDCP channel (or revert) and going to a P25 TDMA CC + else if (state->p25_cc_is_tdma == 1) + { + state->samplesPerSymbol = 8; + state->symbolCenter = 3; + //re-enable both slots (in case of late entry voice, MAC_SIGNAL can turn them back off) + opts->slot1_on = 1; + opts->slot2_on = 1; + } } //zero out vc frequencies? state->p25_vc_freq[0] = 0; diff --git a/src/p25_lcw.c b/src/p25_lcw.c index 79ffdb0..8fd2867 100644 --- a/src/p25_lcw.c +++ b/src/p25_lcw.c @@ -309,6 +309,12 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir //Will we need to check for a symbolrate change here, can a P25p2 TDMA-CC system //revert back to a phase 1 traffic channel or carry a phase 1 traffic channel? + if (state->p25_cc_is_tdma == 1) + { + state->samplesPerSymbol = 8; + state->symbolCenter = 3; + opts->frame_p25p1 = 0; //turn it back off + } //clear heuristics from current traffic channel if (opts->frame_p25p1 == 1 && opts->use_heuristics == 1) diff --git a/src/p25p2_vpdu.c b/src/p25p2_vpdu.c index 8753665..c24b4af 100644 --- a/src/p25p2_vpdu.c +++ b/src/p25p2_vpdu.c @@ -1509,6 +1509,19 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon } } + //because SNDCP data channels are Phase 1 channels, we will want to check to see if we need + //to enable p1 frames and switch sample rate in reverse if on a TDMA-CC system + //in the future, we may consider needing to do this if an SU causes the sytem to revert to P1 on a channel? + else if (state->p25_chan_tdma[channelt >> 12] == 0 && state->p25_cc_is_tdma == 1) + { + state->samplesPerSymbol = 10; + state->symbolCenter = 4; + opts->frame_p25p1 = 1; //enable, just in case it isn't already + + //enable voice on slot 1 (just in case they start talking too, but probably won't) + opts->slot1_on = 1; + } + } //rigctl