M17 - M17 STR Encoder Nucrses Support;

This commit is contained in:
lwvmobile
2024-03-02 02:21:38 -05:00
parent c6bc10f1ba
commit 8a197aea45
4 changed files with 64 additions and 27 deletions

View File

@@ -2551,6 +2551,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (opts->mod_gfsk == 1) printw ("[GFSK]");
printw ( "[%d] \n", (48000*opts->wav_interpolator)/state->samplesPerSymbol);
printw ("| Decoding: [%s] ", opts->output_name);
if (opts->m17encoder == 1) printw ("(\\) Toggle TX; ");
if (opts->aggressive_framesync == 0) printw ("CRC/(RAS) ");
//debug -- troubleshoot voice tuning after grant on DMR CC, subsequent grant may not tune because tuner isn't available
if (opts->p25_trunk == 1 && opts->p25_is_tuned == 1) printw ("Tuner Locked ");
@@ -3632,7 +3633,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
//keyboard shortcuts - codes same as ascii codes
if (c == 27) //esc key, open menu
{
ncursesMenu (opts, state); //just a quick test
if (opts->m17encoder == 0) //don't allow menu if using M17 encoder
ncursesMenu (opts, state);
}
//use k and l keys to test tg hold toggles on slots 1 and slots 2
@@ -4366,6 +4368,12 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
if (opts->m17encoder == 1 && c == 92) //'\' key - toggle M17 encoder Encode + TX
{
if (state->m17encoder_tx == 0) state->m17encoder_tx = 1;
else state->m17encoder_tx = 0;
}
//anything with an entry box will need the inputs and outputs stopped first
//so probably just write a function to handle c input, and when c = certain values
//needing an entry box, then stop all of those