From 01b6eccf4c5bc4f8b48306b2ac06017114bc3950 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Sat, 28 Oct 2023 01:10:32 -0400 Subject: [PATCH] NXDN - Misc Tweaks (Ncurses, DISC) and 96Filter; --- src/dsd_ncurses.c | 10 +++++----- src/dsd_symbol.c | 2 +- src/nxdn_element.c | 12 ++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index 8ba3956..e279f40 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -2040,10 +2040,10 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) call_matrix[k][5] = call_matrix[k+1][5]; } call_matrix[9][0] = lls; - call_matrix[9][1] = rn; + call_matrix[9][1] = tgn; //was rn, switch to tgn so it'll show tg in call history call_matrix[9][2] = src; call_matrix[9][3] = 0; - call_matrix[9][4] = tgn; + call_matrix[9][4] = rn; //was tgn, switched with rn call_matrix[9][5] = time(NULL); //open wav file if enabled and both rd and tg are not 0 @@ -3483,9 +3483,9 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) if (lls == 28 || lls == 29) { - if (idas == 0) printw ("RAN [%02lld] ", call_matrix[9-j][1]); - if (idas == 1) printw ("Area [%02lld] ", call_matrix[9-j][1]); - printw ("TG [%5lld] ", call_matrix[9-j][4]); + if (idas == 0) printw ("RAN [%02lld] ", call_matrix[9-j][4]); + if (idas == 1) printw ("Area [%02lld] ", call_matrix[9-j][4]); + printw ("TG [%5lld] ", call_matrix[9-j][1]); printw ("RID [%5lld] ", call_matrix[9-j][2]); } //dPMR diff --git a/src/dsd_symbol.c b/src/dsd_symbol.c index ddfdf3d..dd42556 100644 --- a/src/dsd_symbol.c +++ b/src/dsd_symbol.c @@ -386,7 +386,7 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync) { //sample = dmr_filter(sample); //work on filter later } - else // the 12.5KHz NXDN filter is the same as the DMR filter...hopefully + else if (opts->frame_nxdn96 == 0) //disable NXDN96 filter, allow internal RTL or SDR++ Low Pass Filter instead { sample = dmr_filter(sample); } diff --git a/src/nxdn_element.c b/src/nxdn_element.c index a5b55ca..ea70dfd 100644 --- a/src/nxdn_element.c +++ b/src/nxdn_element.c @@ -158,6 +158,12 @@ void NXDN_Elements_Content_decode(dsd_opts * opts, dsd_state * state, 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); + + state->nxdn_last_rid = 0; + state->nxdn_last_tg = 0; + if (state->M == 0) + state->nxdn_cipher_type = 0; + sprintf (state->nxdn_call_type, "%s", ""); } //rtl @@ -170,6 +176,12 @@ void NXDN_Elements_Content_decode(dsd_opts * opts, dsd_state * state, memset(state->active_channel, 0, sizeof(state->active_channel)); opts->p25_is_tuned = 0; rtl_dev_tune (opts, state->p25_cc_freq); + + state->nxdn_last_rid = 0; + state->nxdn_last_tg = 0; + if (state->M == 0) + state->nxdn_cipher_type = 0; + sprintf (state->nxdn_call_type, "%s", ""); #endif }