From b1c40ed6e7cdc3b72f0c536365e20ba60465aff5 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Sun, 13 Nov 2022 23:35:17 -0500 Subject: [PATCH] Roman DMR End Call Alert --- include/dsd.h | 3 +++ src/dsd_main.c | 4 +++- src/dsd_ncurses.c | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/dsd.h b/include/dsd.h index e572674..6defa05 100644 --- a/include/dsd.h +++ b/include/dsd.h @@ -647,6 +647,9 @@ typedef struct uint8_t nxdn_alias_block_number; char nxdn_alias_block_segment[4][4][8]; + //Roman DMR End Call Alert Beep + int dmr_end_alert[2]; //dmr TLC end call alert beep has already played once flag + } dsd_state; /* diff --git a/src/dsd_main.c b/src/dsd_main.c index 6fea574..46670aa 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -709,7 +709,9 @@ initState (dsd_state * state) state->nxdn_alias_block_number = 0; memset (state->nxdn_alias_block_segment, 0, sizeof(state->nxdn_alias_block_segment)); - + //Roman DMR End Call Alert Beep + state->dmr_end_alert[0] = 0; + state->dmr_end_alert[1] = 0; initialize_p25_heuristics(&state->p25_heuristics); } diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index f1b8d69..2e4e9a8 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -1848,6 +1848,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) { //fprintf (stderr, "BEEP 0 MS LEFT\n"); beeper (opts, state, 0); + state->dmr_end_alert[0] = 0; //new voice frame, okay to beep at the end of it } } @@ -1887,6 +1888,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) { //fprintf (stderr, "BEEP 0 BS LEFT\n"); beeper (opts, state, 0); + state->dmr_end_alert[0] = 0; //new voice frame, okay to beep at the end of it } } @@ -1925,6 +1927,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) { //fprintf (stderr, "BEEP 1 BS RIGHT\n"); beeper (opts, state, 1); + state->dmr_end_alert[1] = 0; //new voice frame, okay to beep at the end of it } } @@ -1965,6 +1968,21 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) } + //Roman DMR End Call Alert Beep + // if (opts->call_alert == 1) + // { + // if (state->dmrburstL == 2 && state->dmr_end_alert[0] == 0) //if TLC and flag not tripped + // { + // beeper (opts, state, 0); + // state->dmr_end_alert[0] = 1; //don't play again until new voice frames + // } + // if (state->dmrburstR == 2 && state->dmr_end_alert[1] == 0) //if TLC and flag not tripped + // { + // beeper (opts, state, 1); + // state->dmr_end_alert[1] = 1; //don't play again until new voice frames + // } + // } + //Start Printing Section erase(); if (opts->ncurses_compact == 1)