mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 13:15:40 -05:00
NXDN Trunking Tweak - Snap Back to CC on Disc;
This commit is contained in:
@@ -98,6 +98,36 @@ void NXDN_Elements_Content_decode(dsd_opts * opts, dsd_state * state,
|
|||||||
//DISC
|
//DISC
|
||||||
case 0x11:
|
case 0x11:
|
||||||
//NXDN_decode_VCALL(opts, state, ElementsContent);
|
//NXDN_decode_VCALL(opts, state, ElementsContent);
|
||||||
|
|
||||||
|
//tune back to CC here - save about 1-2 seconds
|
||||||
|
if (opts->p25_trunk == 1 && state->p25_cc_freq != 0 && opts->p25_is_tuned == 1)
|
||||||
|
{
|
||||||
|
//rigctl
|
||||||
|
if (opts->use_rigctl == 1)
|
||||||
|
{
|
||||||
|
//extra safeguards due to sync issues with NXDN
|
||||||
|
memset (state->nxdn_sacch_frame_segment, 1, sizeof(state->nxdn_sacch_frame_segment));
|
||||||
|
memset (state->nxdn_sacch_frame_segcrc, 1, sizeof(state->nxdn_sacch_frame_segcrc));
|
||||||
|
// state->lastsynctype = -1;
|
||||||
|
// state->last_cc_sync_time = time(NULL);
|
||||||
|
opts->p25_is_tuned = 0;
|
||||||
|
if (opts->setmod_bw != 0 ) SetModulation(opts->rigctl_sockfd, opts->setmod_bw);
|
||||||
|
SetFreq(opts->rigctl_sockfd, state->p25_cc_freq);
|
||||||
|
|
||||||
|
}
|
||||||
|
//rtl_udp
|
||||||
|
else if (opts->audio_in_type == 3)
|
||||||
|
{
|
||||||
|
//extra safeguards due to sync issues with NXDN
|
||||||
|
memset (state->nxdn_sacch_frame_segment, 1, sizeof(state->nxdn_sacch_frame_segment));
|
||||||
|
memset (state->nxdn_sacch_frame_segcrc, 1, sizeof(state->nxdn_sacch_frame_segcrc));
|
||||||
|
// state->lastsynctype = -1;
|
||||||
|
// state->last_cc_sync_time = time(NULL);
|
||||||
|
opts->p25_is_tuned = 0;
|
||||||
|
rtl_udp_tune (opts, state, state->p25_cc_freq);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//Idle
|
//Idle
|
||||||
@@ -670,8 +700,8 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
|||||||
//check the rkey array for a scrambler key value
|
//check the rkey array for a scrambler key value
|
||||||
//check by keyid first, then by tgt id
|
//check by keyid first, then by tgt id
|
||||||
//TGT ID and Key ID could clash though if csv or system has both with different keys
|
//TGT ID and Key ID could clash though if csv or system has both with different keys
|
||||||
// if (state->rkey_array[KeyID] != 0) state->R = state->rkey_array[KeyID];
|
if (state->rkey_array[KeyID] != 0) state->R = state->rkey_array[KeyID];
|
||||||
if (state->rkey_array[DestinationID] != 0) state->R = state->rkey_array[DestinationID];
|
else if (state->rkey_array[DestinationID] != 0) state->R = state->rkey_array[DestinationID];
|
||||||
|
|
||||||
if (state->M == 1)
|
if (state->M == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user