M17: Misc Handling / Display Tweaks;

This commit is contained in:
lwvmobile 2024-04-08 18:04:39 -04:00
parent eed267ed3f
commit 129af0ba9e
3 changed files with 20 additions and 7 deletions

View File

@ -2735,6 +2735,7 @@ main (int argc, char **argv)
opts.pulse_digi_rate_out = 8000;
opts.pulse_digi_out_channels = 1;
sprintf (opts.output_name, "M17 IP Frame");
fprintf (stderr, "Decoding M17 UDP/IP Frames.\n");
}
break;
//don't mess with the modulations unless you really need to
@ -3343,6 +3344,14 @@ main (int argc, char **argv)
if (state.m17_can_en > 15)
state.m17_can_en = 15;
//if vox is greater than 1, assume user meant 'yes' and set to one
if (state.m17_vox > 1)
state.m17_vox = 1;
//if use_ip is greater than 1, assume user meant 'yes' and set to one
if (opts.m17_use_ip > 1)
opts.m17_use_ip = 1;
//debug print m17dat string
// fprintf (stderr, " %s;", state.m17dat);

View File

@ -2481,17 +2481,14 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
}
// if (opts->monitor_input_audio == 1)
// {
// printw ("| Monitoring Source Audio when Carrier Present and No Sync Detected (WIP)\n");
// }
if (opts->m17_use_ip == 1)
printw ("| M17 UDP IP Frame Output: 127.0.0.1:17000\n");
if (opts->mbe_out_dir[0] != 0 && opts->dmr_stereo == 0)
{
printw ("| Writing MBE data files to directory %s\n", opts->mbe_out_dir);
}
if (opts->wav_out_raw)
{
printw ("| Raw Audio Output: %s\n", opts->wav_out_file_raw);
@ -2663,8 +2660,10 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (opts->mod_gfsk == 1) printw ("[GFSK]");
printw ( "[%d] \n", (48000*opts->wav_interpolator)/state->samplesPerSymbol);
if (opts->m17encoder == 1) printw ("| Encoding: [%s] ", opts->output_name);
if (opts->m17encoder == 1) printw (" Toggle (\\); ");
if (opts->m17encoder == 1) printw (" Mic Gain (/|*): %02.0f%% ", opts->audio_gainA);
if (opts->m17encoder == 1 && state->m17encoder_tx == 1 && state->m17_vox == 0) printw (" TX (\\) ON ;");
if (opts->m17encoder == 1 && state->m17encoder_tx == 0 && state->m17_vox == 0) printw (" TX (\\) OFF;");
if (opts->m17encoder == 1 && state->m17_vox == 1) printw (" Vox Mode;");
if (opts->m17encoder == 1) printw (" Input Gain (/|*): %02.0f%% ", opts->audio_gainA);
if (opts->m17encoder == 1)
{
if (opts->use_lpf == 1) printw ("F: |LP|"); else printw ("F: | |");

View File

@ -1451,6 +1451,10 @@ void encodeM17STR(dsd_opts * opts, dsd_state * state)
if (opts->use_ncurses_terminal == 1)
ncursesOpen(opts, state);
//if using the ncurses terminal, disable TX on startup until user toggles it with the '\' key, if not vox enabled
if (opts->use_ncurses_terminal == 1 && state->m17encoder_tx == 1 && state->m17_vox == 0)
state->m17encoder_tx = 0;
//User Defined Variables
int use_ip = 0; //1 to enable IP Frame Broadcast over UDP
int udpport = 17000; //port number for M17 IP Frmae (default is 17000)
@ -1503,6 +1507,7 @@ void encodeM17STR(dsd_opts * opts, dsd_state * state)
{
fprintf (stderr, "Error Configuring UDP Socket for M17 IP Frame :( \n");
use_ip = 0;
opts->m17_use_ip = 0;
}
else use_ip = 1;
}