Update and Strip Down M17 Features; #322

This commit is contained in:
lwvmobile
2025-10-31 05:58:45 -04:00
parent 095d982b62
commit fa47d0321b
12 changed files with 854 additions and 3831 deletions

View File

@@ -223,9 +223,6 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
printw ("| Symbol Float Input: %s \n", opts->audio_in_dev);
}
if (opts->m17decoderip == 1 && opts->udp_sockfd)
printw ("| M17 UDP IP Frame Input: %s:%d \n", opts->m17_hostname, opts->m17_portno);
if (opts->audio_in_type == 8)
{
printw ("| TCP Signal Input: %s:%d; %d kHz; 1 Ch; ", opts->tcp_hostname, opts->tcp_portno, opts->wav_sample_rate/1000);
@@ -336,25 +333,6 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
}
if (opts->m17encoder == 1)
{
printw ("| M17 Encoder:");
if (state->m17encoder_tx == 1 && state->m17_vox == 0) printw (" Toggle TX (\\) ON ;");
if (state->m17encoder_tx == 0 && state->m17_vox == 0) printw (" Toggle TX (\\) OFF;");
if (state->m17_vox == 1) printw (" Vox Mode;");
printw (" Input Gain (/|*): %02.0f%% ", opts->audio_gainA);
if (opts->use_lpf == 1) printw ("F: |LP|"); else printw ("F: | |");
if (opts->use_hpf == 1) printw ("HP|"); else printw (" |");
if (opts->use_pbf == 1) printw ("PB|"); else printw (" |");
if (opts->audio_in_type != 3 && state->m17_vox == 1) printw ( " SQL: %04ld : %04d;", opts->rtl_rms, opts->rtl_squelch_level);
printw ("\n");
}
if (opts->m17_use_ip == 1)
printw ("| M17 UDP IP Frame Output: %s:%d \n", opts->m17_hostname, opts->m17_portno);
if (opts->mbe_out_dir[0] != 0 && opts->dmr_stereo == 0)
{
printw ("| Writing MBE data files to directory %s\n", opts->mbe_out_dir);
@@ -561,7 +539,6 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (opts->mod_c4fm == 1) printw ("[C4FM]");
if (opts->mod_gfsk == 1) printw ("[GFSK]");
printw ( "[%d] \n", (48000*opts->wav_interpolator)/state->samplesPerSymbol);
if (opts->m17encoder == 1) printw ("| Encoding: [%s] \n", opts->output_name);
printw ("| Decoding: [%s] ", opts->output_name);
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
@@ -654,20 +631,22 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
printw ("\n");
printw ("| ");
//fill in any extra info, like Meta (IV, etc)
if (state->m17_enc == 1)
{
printw (" Scrambler - Type: %d", state->m17_enc_st);
attron(COLOR_PAIR(1));
printw ("Scrambler - Type: %d", state->m17_enc_st);
attron(COLOR_PAIR(3));
}
if (state->m17_enc == 2)
{
attron(COLOR_PAIR(1));
printw ("AES-CTR - IV: ");
//display packed meta as IV
printw ("AES-CTR IV: ");
//display AES IV
for (i = 0; i < 16; i++)
printw ("%02X", state->m17_meta[i]);
printw ("%02X", state->m17_aes_iv[i]);
attron(COLOR_PAIR(3));
}
if (state->m17_enc == 3)
@@ -676,6 +655,30 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
printw ("\n");
printw ("| ");
//decoded elements from stream
char shortm17[72];
memset(shortm17, 0, sizeof(shortm17));
strncpy (shortm17, state->m17_text_string, 70);
shortm17[71] = 0;
printw ("META TEXT: %s", shortm17);
printw ("\n");
printw ("| ");
memset(shortm17, 0, sizeof(shortm17));
strncpy (shortm17, state->m17_gnss_string, 70);
shortm17[71] = 0;
printw ("META GNSS: %s", shortm17);
printw ("\n");
printw ("| ");
memset(shortm17, 0, sizeof(shortm17));
strncpy (shortm17, state->m17_data_string, 70);
shortm17[71] = 0;
printw ("MISC DATA: %s", shortm17);
printw ("\n");
}