mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
EDACS: Move TG Hold Display; Fix TG Hold Override when I-Call;
This commit is contained in:
@@ -2600,6 +2600,17 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
if (state->ea_mode == 0)
|
if (state->ea_mode == 0)
|
||||||
printw (" AFS: %d:%d:%d;", state->edacs_a_bits, state->edacs_f_bits, state->edacs_s_bits);
|
printw (" AFS: %d:%d:%d;", state->edacs_a_bits, state->edacs_f_bits, state->edacs_s_bits);
|
||||||
|
|
||||||
|
//TG Hold on EDACS, if specified by user
|
||||||
|
if (state->tg_hold != 0)
|
||||||
|
{
|
||||||
|
// Compute AFS for display purposes only
|
||||||
|
int a = (state->tg_hold >> state->edacs_a_shift) & state->edacs_a_mask;
|
||||||
|
int f = (state->tg_hold >> state->edacs_f_shift) & state->edacs_f_mask;
|
||||||
|
int s = state->tg_hold & state->edacs_s_mask;
|
||||||
|
if (state->ea_mode == 1) printw ("\n| \\TG HOLD: %d; ", state->tg_hold);
|
||||||
|
else printw ("\n| \\TG HOLD: %d [%02d-%02d%01d]; ", state->tg_hold, a, f, s);
|
||||||
|
}
|
||||||
|
|
||||||
attron(COLOR_PAIR(4));
|
attron(COLOR_PAIR(4));
|
||||||
printw ("\n");
|
printw ("\n");
|
||||||
}
|
}
|
||||||
@@ -2630,6 +2641,17 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
if (state->ea_mode == 0)
|
if (state->ea_mode == 0)
|
||||||
printw (" AFS: %d:%d:%d;", state->edacs_a_bits, state->edacs_f_bits, state->edacs_s_bits);
|
printw (" AFS: %d:%d:%d;", state->edacs_a_bits, state->edacs_f_bits, state->edacs_s_bits);
|
||||||
|
|
||||||
|
//TG Hold on EDACS, if specified by user
|
||||||
|
if (state->tg_hold != 0)
|
||||||
|
{
|
||||||
|
// Compute AFS for display purposes only
|
||||||
|
int a = (state->tg_hold >> state->edacs_a_shift) & state->edacs_a_mask;
|
||||||
|
int f = (state->tg_hold >> state->edacs_f_shift) & state->edacs_f_mask;
|
||||||
|
int s = state->tg_hold & state->edacs_s_mask;
|
||||||
|
if (state->ea_mode == 1) printw ("\n| \\TG HOLD: %d; ", state->tg_hold);
|
||||||
|
else printw ("\n| \\TG HOLD: %d [%02d-%02d%01d]; ", state->tg_hold, a, f, s);
|
||||||
|
}
|
||||||
|
|
||||||
printw ("\n");
|
printw ("\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2684,16 +2706,6 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
//debug -- troubleshoot voice tuning after grant on DMR CC, subsequent grant may not tune because tuner isn't available
|
//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 ");
|
if (opts->p25_trunk == 1 && opts->p25_is_tuned == 1) printw ("Tuner Locked ");
|
||||||
if (opts->p25_trunk == 1 && opts->p25_is_tuned == 0) printw ("Tuner Available ");
|
if (opts->p25_trunk == 1 && opts->p25_is_tuned == 0) printw ("Tuner Available ");
|
||||||
//TG Hold on EDACS, if specified by user
|
|
||||||
if ( (opts->frame_provoice == 1) && (state->tg_hold != 0) )
|
|
||||||
{
|
|
||||||
// Compute AFS for display purposes only
|
|
||||||
int a = (state->tg_hold >> state->edacs_a_shift) & state->edacs_a_mask;
|
|
||||||
int f = (state->tg_hold >> state->edacs_f_shift) & state->edacs_f_mask;
|
|
||||||
int s = state->tg_hold & state->edacs_s_mask;
|
|
||||||
if (state->ea_mode == 1) printw ("TG HOLD: %d; ", state->tg_hold);
|
|
||||||
else printw ("TG HOLD: %d [%02d-%02d%01d]; ", state->tg_hold, a, f, s);
|
|
||||||
}
|
|
||||||
printw ("\n");
|
printw ("\n");
|
||||||
printw ("| In Level: [%02d%%] \n", level);
|
printw ("| In Level: [%02d%%] \n", level);
|
||||||
|
|
||||||
|
|||||||
@@ -878,6 +878,20 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
//if we are using allow/whitelist mode, then write 'B' to mode for block - no allow/whitelist support for i-calls
|
//if we are using allow/whitelist mode, then write 'B' to mode for block - no allow/whitelist support for i-calls
|
||||||
if (opts->trunk_use_allow_list == 1) sprintf (mode, "%s", "B");
|
if (opts->trunk_use_allow_list == 1) sprintf (mode, "%s", "B");
|
||||||
|
|
||||||
|
//Get target mode for calls that are in the allow/whitelist
|
||||||
|
for (int i = 0; i < state->group_tally; i++)
|
||||||
|
{
|
||||||
|
if (state->group_array[i].groupNumber == target)
|
||||||
|
{
|
||||||
|
strcpy (mode, state->group_array[i].groupMode);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//TG hold on EDACS EA I-CALL -- block non-matching target
|
||||||
|
if (state->tg_hold != 0 && state->tg_hold != target) sprintf (mode, "%s", "B");
|
||||||
|
if (state->tg_hold != 0 && state->tg_hold == target) sprintf (mode, "%s", "A");
|
||||||
|
|
||||||
//this is working now with the new import setup
|
//this is working now with the new import setup
|
||||||
if (opts->trunk_tune_private_calls == 1 && opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
if (opts->trunk_tune_private_calls == 1 && opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
||||||
{
|
{
|
||||||
@@ -979,6 +993,10 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
//if we are using allow/whitelist mode, then write 'A' to mode for allow - always allow all-calls by default
|
//if we are using allow/whitelist mode, then write 'A' to mode for allow - always allow all-calls by default
|
||||||
if (opts->trunk_use_allow_list == 1) sprintf (mode, "%s", "A");
|
if (opts->trunk_use_allow_list == 1) sprintf (mode, "%s", "A");
|
||||||
|
|
||||||
|
//TG hold on EDACS ALL-CALL -- block ALL CALL in favor of hold?
|
||||||
|
// if (state->tg_hold != 0 && state->tg_hold != target) sprintf (mode, "%s", "B");
|
||||||
|
// if (state->tg_hold != 0 && state->tg_hold == target) sprintf (mode, "%s", "A");
|
||||||
|
|
||||||
//this is working now with the new import setup
|
//this is working now with the new import setup
|
||||||
if (opts->trunk_tune_group_calls == 1 && opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
if (opts->trunk_tune_group_calls == 1 && opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
||||||
{
|
{
|
||||||
@@ -1375,11 +1393,15 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TG hold on EDACS Standard/Net -- block non-matching target, allow matching group
|
//moved to below, we want the TG HOLD to override either group or individual calls
|
||||||
if (state->tg_hold != 0 && state->tg_hold != target) sprintf (mode, "%s", "B");
|
//
|
||||||
if (state->tg_hold != 0 && state->tg_hold == target) sprintf (mode, "%s", "A");
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TG hold on EDACS STD/NET -- block non-matching abstract target (moved here to fix tuning that occurs on I-CALL during TG HOLD)
|
||||||
|
if (state->tg_hold != 0 && state->tg_hold != target) sprintf (mode, "%s", "B");
|
||||||
|
if (state->tg_hold != 0 && state->tg_hold == target) sprintf (mode, "%s", "A");
|
||||||
|
|
||||||
//NOTE: Restructured below so that analog and digital are handled the same, just that when
|
//NOTE: Restructured below so that analog and digital are handled the same, just that when
|
||||||
//its analog, it will now start edacs_analog which will while loop analog samples until
|
//its analog, it will now start edacs_analog which will while loop analog samples until
|
||||||
//signal level drops (RMS, or a dotting sequence is detected)
|
//signal level drops (RMS, or a dotting sequence is detected)
|
||||||
|
|||||||
Reference in New Issue
Block a user