NCurses Compiler Warning and Call Alert Fix;

This commit is contained in:
lwvmobile
2023-02-04 04:34:09 -05:00
parent 630d3f362c
commit a02f992a25

View File

@@ -1890,7 +1890,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
openWavOutFileL (opts, state); //testing for now, will want to move to per call later openWavOutFileL (opts, state); //testing for now, will want to move to per call later
} }
if (opts->call_alert == 1) if (opts->call_alert == 1 && rd != 0 && tg != 0)
{ {
//fprintf (stderr, "BEEP 0 MS LEFT\n"); //fprintf (stderr, "BEEP 0 MS LEFT\n");
beeper (opts, state, 0); beeper (opts, state, 0);
@@ -1933,7 +1933,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
openWavOutFileL (opts, state); //testing for now, will want to move to per call later openWavOutFileL (opts, state); //testing for now, will want to move to per call later
} }
if (opts->call_alert == 1) if (opts->call_alert == 1 && rd != 0 && tg != 0)
{ {
//fprintf (stderr, "BEEP 0 BS LEFT\n"); //fprintf (stderr, "BEEP 0 BS LEFT\n");
beeper (opts, state, 0); beeper (opts, state, 0);
@@ -1975,7 +1975,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
openWavOutFileR (opts, state); //testing for now, will want to move to per call later openWavOutFileR (opts, state); //testing for now, will want to move to per call later
} }
if (opts->call_alert == 1) if (opts->call_alert == 1 && rdR != 0 && tgR != 0)
{ {
//fprintf (stderr, "BEEP 1 BS RIGHT\n"); //fprintf (stderr, "BEEP 1 BS RIGHT\n");
beeper (opts, state, 1); beeper (opts, state, 1);
@@ -2030,11 +2030,19 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
// { // {
// beeper (opts, state, 0); // beeper (opts, state, 0);
// state->dmr_end_alert[0] = 1; //don't play again until new voice frames // state->dmr_end_alert[0] = 1; //don't play again until new voice frames
// state->lasttg = 0;
// state->lastsrc = 0;
// rd = 0;
// tg = 0;
// } // }
// if (state->dmrburstR == 2 && state->dmr_end_alert[1] == 0) //if TLC and flag not tripped // if (state->dmrburstR == 2 && state->dmr_end_alert[1] == 0) //if TLC and flag not tripped
// { // {
// beeper (opts, state, 1); // beeper (opts, state, 1);
// state->dmr_end_alert[1] = 1; //don't play again until new voice frames // state->dmr_end_alert[1] = 1; //don't play again until new voice frames
// state->lasttgR = 0;
// state->lastsrcR = 0;
// rdR = 0;
// tgR = 0;
// } // }
// } // }
@@ -2344,7 +2352,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
else if (lls == 0 || lls == 1) //P1 else if (lls == 0 || lls == 1) //P1
{ {
// printw ("P25 P1 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc); // printw ("P25 P1 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc);
printw ("P25 P1 - [%05llX][%03llX][%03llX] RFSS: [%X] SITE: [%X] ", state->p2_wacn, state->p2_sysid, state->p2_cc, state->p2_rfssid, state->p2_siteid); printw ("P25 P1 - [%05llX][%03llX][%03llX] RFSS: [%llX] SITE: [%llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc, state->p2_rfssid, state->p2_siteid);
if (state->p25_cc_freq != 0) if (state->p25_cc_freq != 0)
{ {
printw ("Freq: [%.06lf] MHz", (double)state->p25_cc_freq/1000000); printw ("Freq: [%.06lf] MHz", (double)state->p25_cc_freq/1000000);
@@ -2353,7 +2361,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
else if (lls == 35 || lls == 36) //P2 else if (lls == 35 || lls == 36) //P2
{ {
// printw ("P25 P2 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc); // printw ("P25 P2 - WACN: [%05llX] SYS: [%03llX] NAC: [%03llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc);
printw ("P25 P2 - [%05llX][%03llX][%03llX] RFSS: [%X] SITE: [%X] ", state->p2_wacn, state->p2_sysid, state->p2_cc, state->p2_rfssid, state->p2_siteid); printw ("P25 P2 - [%05llX][%03llX][%03llX] RFSS: [%llX] SITE: [%llX] ", state->p2_wacn, state->p2_sysid, state->p2_cc, state->p2_rfssid, state->p2_siteid);
if (state->p2_wacn == 0 || state->p2_sysid == 0 || state->p2_cc == 0) if (state->p2_wacn == 0 || state->p2_sysid == 0 || state->p2_cc == 0)
{ {
attron(COLOR_PAIR(2)); attron(COLOR_PAIR(2));
@@ -2891,8 +2899,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
printw ("--Call History----------------------------------------------------------------\n"); printw ("--Call History----------------------------------------------------------------\n");
for (short int j = 0; j < 10; j++) for (short int j = 0; j < 10; j++)
{ {
//only print if a valid time was assigned to the matrix, and not EDACS/PV //only print if a valid time was assigned to the matrix, and not EDACS/PV, and source is not zero
if ( ((time(NULL) - call_matrix[9-j][5]) < 999999) && call_matrix[9-j][0] != 14 && call_matrix[9-j][0] != 15 && call_matrix[9-j][0] != 37 && call_matrix[9-j][0] != 38 ) if ( ((time(NULL) - call_matrix[9-j][5]) < 999999) && call_matrix[9-j][0] != 14 && call_matrix[9-j][0] != 15 && call_matrix[9-j][0] != 37 && call_matrix[9-j][0] != 38 && call_matrix[9-j][2] != 0) //
{ {
printw ("| %s ", SyncTypes[call_matrix[9-j][0]]); printw ("| %s ", SyncTypes[call_matrix[9-j][0]]);
if (lls == 28 || lls == 29) if (lls == 28 || lls == 29)