EDACS: Ncurses Display Working Mode Tweaks;

This commit is contained in:
lwvmobile 2024-03-22 02:01:09 -04:00
parent b2d1608eb7
commit c404f3c48c
2 changed files with 65 additions and 1 deletions

View File

@ -2505,6 +2505,65 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
else printw (" - Black List Mode\n");
}
#endif
//print additional information for EDACS modes and toggles
#ifdef PRETTY_COLORS
if (opts->p25_trunk == 1 && opts->frame_provoice == 1)
{
printw ("| \\--EDACS -");
if (state->ea_mode == -1)
{
attron(COLOR_PAIR(2));
printw (" Standard/Network");
printw (" Extended Address");
attron(COLOR_PAIR(4));
}
else if (state->ea_mode == 0)
{
printw (" Standard/Network");
attron(COLOR_PAIR(2));
printw (" Extended Address");
attron(COLOR_PAIR(4));
}
else if (state->ea_mode == 1)
{
attron(COLOR_PAIR(2));
printw (" Standard/Network");
attron(COLOR_PAIR(4));
printw (" Extended Address");
}
printw (" (S) Mode;");
printw(" ESK Mask: %02X", state->esk_mask);
printw (" (A); ");
attron(COLOR_PAIR(4));
printw ("\n");
}
#else //set on to UPPER CASE, off to lower case
if (opts->p25_trunk == 1 && opts->frame_provoice == 1)
{
printw ("| \\--EDACS -");
if (state->ea_mode == -1)
{
printw (" standard/network");
printw (" extended address");
}
else if (state->ea_mode == 0)
{
printw (" STANDARD/NETWORK");
printw (" extended address");
}
else if (state->ea_mode == 1)
{
printw (" standard/network");
printw (" EXTENDED ADDRESS");
}
printw (" (S) Mode (Toggle);");
printw(" ESK Mask: %02X", state->esk_mask);
printw (" (A) Toggle; ");
printw ("\n");
#endif
// if (opts->aggressive_framesync == 0) printw ("| Selective CRC ERR Bypass Enabled (RAS) \n");
if (state->M == 1)
{

View File

@ -504,7 +504,12 @@ void edacs(dsd_opts * opts, dsd_state * state)
-fH Decode only EDACS Standard/ProVoice with ESK 0xA0*\n");
-fe Decode only EDACS EA/ProVoice*\n");
-fE Decode only EDACS EA/ProVoice with ESK 0xA0*\n");
(A) key toggles mode; (S) key toggles mask value in ncurses
*/
//TODO: Consider re-adding the auto code to make a suggestion to users
//as to which mode to proceed in?
//Start Extended Addressing Mode
if (state->ea_mode == 1)
@ -1062,7 +1067,7 @@ void edacs(dsd_opts * opts, dsd_state * state)
} //end Standard or Networked
//supply user warning to use -9 switch if decoding doesn't start shortly
//let users know they need to select an operational mode with the switches below
else fprintf (stderr, " Detected: Use -fh, -fH, -fe, or -fE for std, esk, ea, or ea-esk;");
}