diff --git a/src/p25p1_tsbk.c b/src/p25p1_tsbk.c index de851b0..3af09b1 100644 --- a/src/p25p1_tsbk.c +++ b/src/p25p1_tsbk.c @@ -126,6 +126,13 @@ void processTSBK(dsd_opts * opts, dsd_state * state) state->p25_cc_freq = process_channel_to_freq(opts, state, channel); state->p25_cc_is_tdma = 0; //flag off for CC tuning purposes when system is qpsk + //place the cc freq into the list at index 0 if 0 is empty, or not the same, + //so we can hunt for rotating CCs without user LCN list + if (state->trunk_lcn_freq[0] == 0 || state->trunk_lcn_freq[0] != state->p25_cc_freq) + { + state->trunk_lcn_freq[0] = state->p25_cc_freq; + } + //only set IF these values aren't already hard set by the user if (state->p2_hardset == 0) { diff --git a/src/p25p2_vpdu.c b/src/p25p2_vpdu.c index 3730e1f..e7e060e 100644 --- a/src/p25p2_vpdu.c +++ b/src/p25p2_vpdu.c @@ -1052,16 +1052,26 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon int sysclass1 = MAC[6+len_a]; int channel2 = (MAC[7+len_a] << 8) | MAC[8+len_a]; int sysclass2 = MAC[9+len_a]; + long int freq1 = 0; + long int freq2 = 0; if (1 == 1) //state->p2_is_lcch == 1 { fprintf (stderr, "\n Secondary Control Channel Broadcast - Implicit\n"); fprintf (stderr, " RFSS[%03d] SITE ID [%03X] CHAN1 [%04X] SSC [%02X] CHAN2 [%04X] SSC [%02X]", rfssid, siteid, channel1, sysclass1, channel2, sysclass2); - process_channel_to_freq (opts, state, channel1); - process_channel_to_freq (opts, state, channel2); + freq1 = process_channel_to_freq (opts, state, channel1); + freq2 = process_channel_to_freq (opts, state, channel2); } + //place the cc freq into the list at index 0 if 0 is empty so we can hunt for rotating CCs without user LCN list + if (state->trunk_lcn_freq[1] == 0) + { + state->trunk_lcn_freq[1] = freq1; + state->trunk_lcn_freq[2] = freq2; + state->lcn_freq_count = 3; //increment to three + } + } //MFID90 Group Regroup Voice Channel User - Abbreviated @@ -1220,6 +1230,13 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon state->p2_cc = lcolorcode; } + //place the cc freq into the list at index 0 if 0 is empty, or not the same, + //so we can hunt for rotating CCs without user LCN list + if (state->trunk_lcn_freq[0] == 0 || state->trunk_lcn_freq[0] != state->p25_cc_freq) + { + state->trunk_lcn_freq[0] = state->p25_cc_freq; + } + } //network status broadcast, extended if (MAC[1+len_a] == 0xFB)