mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-13 17:27:21 -05:00
EDACS -- Fix/Tweak Analog Calls and Ncurses;
This commit is contained in:
@@ -1348,7 +1348,7 @@ usage ()
|
||||
printf (" P25 - 7000-12000; P25 (QPSK) - 12000; NXDN48 - 7000; NXDN96: 9000; DMR - 7000; EDACS/PV - 12500;\n");
|
||||
printf (" May vary based on system stregnth, etc.\n");
|
||||
printf (" -t <secs> Set Trunking or Scan Speed VC/sync loss hangtime in seconds. (default = 1 second)\n");
|
||||
printf (" -9 Force Enable EDACS Standard or Networked Mode on Systems without a netcmd (temp fix) \n");
|
||||
printf (" -9 Force Enable EDACS Standard or Networked Mode if Auto Detection Fails \n");
|
||||
printf ("\n");
|
||||
printf (" Trunking Example TCP: dsd-fme -fs -i tcp -U 4532 -T -C dmr_t3_chan.csv -G group.csv -N 2> log.ans\n");
|
||||
printf (" Trunking Example RTL: dsd-fme -fs -i rtl:0:450M:26:-2:8 -T -C connect_plus_chan.csv -G group.csv -N 2> log.ans\n");
|
||||
|
||||
@@ -2523,12 +2523,15 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
printw ( "[%d] \n", (48000*opts->wav_interpolator)/state->samplesPerSymbol);
|
||||
printw ("| Decoding: [%s] ", opts->output_name);
|
||||
if (opts->aggressive_framesync == 0) printw ("CRC/(RAS) ");
|
||||
//TG Hold on EDACS, if specified by user
|
||||
if ( (opts->frame_provoice == 1) && (state->tg_hold != 0) )
|
||||
printw ("TG HOLD: %d; ", state->tg_hold);
|
||||
//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 ");
|
||||
//TG Hold on EDACS, if specified by user
|
||||
if ( (opts->frame_provoice == 1) && (state->tg_hold != 0) )
|
||||
{
|
||||
if (state->ea_mode == 1) printw ("TG HOLD: %d; ", state->tg_hold);
|
||||
else printw ("TG HOLD: %d [%02d-%03d]; ", state->tg_hold, (state->tg_hold >> 7 ) & 0xF, state->tg_hold & 0x7F);
|
||||
}
|
||||
printw ("\n");
|
||||
printw ("| In Level: [%02d%%] \n", level);
|
||||
|
||||
@@ -3423,13 +3426,20 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
attron (COLOR_PAIR(3));
|
||||
if (state->ea_mode == 1) printw (" TG [%5lld] SRC [%8lld]", call_matrix[i][2], call_matrix[i][3] );
|
||||
else printw (" AFS [%d][%02d-%03d]", call_matrix[i][3], a, fs );
|
||||
else printw (" AFS [%lld][%02d-%03d]", call_matrix[i][3], a, fs );
|
||||
for (int k = 0; k < state->group_tally; k++)
|
||||
{
|
||||
if (state->group_array[k].groupNumber == call_matrix[i][2])
|
||||
if (state->group_array[k].groupNumber == call_matrix[i][2] && call_matrix[i][2] != 0)
|
||||
{
|
||||
printw (" [%s]", state->group_array[k].groupName);
|
||||
printw ("[%s]", state->group_array[k].groupMode);
|
||||
break;
|
||||
}
|
||||
else if (state->group_array[k].groupNumber == call_matrix[i][3] && call_matrix[i][3] != 0)
|
||||
{
|
||||
printw (" [%s]", state->group_array[k].groupName);
|
||||
printw ("[%s]", state->group_array[k].groupMode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
attroff (COLOR_PAIR(3));
|
||||
@@ -3439,13 +3449,20 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
attron (COLOR_PAIR(2));
|
||||
if (state->ea_mode == 1) printw (" TG [%5lld] SRC [%8lld]", call_matrix[i][2], call_matrix[i][3] );
|
||||
else printw (" AFS [%d][%02d-%03d]", call_matrix[i][3], a, fs );
|
||||
else printw (" AFS [%lld][%02d-%03d]", call_matrix[i][3], a, fs );
|
||||
for (int k = 0; k < state->group_tally; k++)
|
||||
{
|
||||
if (state->group_array[k].groupNumber == call_matrix[i][2])
|
||||
if (state->group_array[k].groupNumber == call_matrix[i][2] && call_matrix[i][2] != 0)
|
||||
{
|
||||
printw (" [%s]", state->group_array[k].groupName);
|
||||
printw ("[%s]", state->group_array[k].groupMode);
|
||||
break;
|
||||
}
|
||||
else if (state->group_array[k].groupNumber == call_matrix[i][3] && call_matrix[i][3] != 0)
|
||||
{
|
||||
printw (" [%s]", state->group_array[k].groupName);
|
||||
printw ("[%s]", state->group_array[k].groupMode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
attroff (COLOR_PAIR(2));
|
||||
@@ -3549,20 +3566,31 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
printw ("%s ", getDateC(call_matrix[j][5]) );
|
||||
printw ("%s ", getTimeC(call_matrix[j][5]) );
|
||||
printw ("LCN [%2lld] ", call_matrix[j][1]);
|
||||
printw ("Group [%8lld] ", call_matrix[j][2]);
|
||||
printw ("Source [%8lld] ", call_matrix[j][3]);
|
||||
if (state->ea_mode == 1)
|
||||
{
|
||||
printw ("Group [%8lld] ", call_matrix[j][2]);
|
||||
printw ("Source [%8lld] ", call_matrix[j][3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
int a = (call_matrix[j][3] >> 7) & 0xF;
|
||||
int fs = call_matrix[j][3] & 0x7F;
|
||||
printw (" AFS [%lld][%02d-%03d]", call_matrix[j][3], a, fs );
|
||||
}
|
||||
//test
|
||||
for (int k = 0; k < state->group_tally; k++)
|
||||
{
|
||||
if (state->group_array[k].groupNumber == call_matrix[j][2])
|
||||
if (state->group_array[k].groupNumber == call_matrix[j][2] && call_matrix[j][2] != 0)
|
||||
{
|
||||
attron(COLOR_PAIR(4));
|
||||
printw ("[%s] ", state->group_array[k].groupName);
|
||||
break;
|
||||
}
|
||||
else if (state->group_array[k].groupNumber == call_matrix[j][3])
|
||||
else if (state->group_array[k].groupNumber == call_matrix[j][3] && call_matrix[j][3] != 0)
|
||||
{
|
||||
attron(COLOR_PAIR(4));
|
||||
printw ("[%s] ", state->group_array[k].groupName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//end test
|
||||
@@ -3593,6 +3621,9 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
if ( (opts->frame_nxdn48 == 1 || opts->frame_nxdn96 == 1) && (state->tg_hold == 0) )
|
||||
state->tg_hold = state->nxdn_last_tg;
|
||||
|
||||
else if (opts->frame_provoice == 1 && state->ea_mode == 0)
|
||||
state->tg_hold = state->lastsrc;
|
||||
}
|
||||
|
||||
if (c == 108) //'l' key, hold tg on slot 2 for trunking purposes, or toggle clear
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* 1994-7
|
||||
*
|
||||
* LWVMOBILE
|
||||
* 2023-08 Version EDACS-FM Florida Man Edition
|
||||
* 2023-11 Version EDACS-FM Florida Man Edition
|
||||
*-----------------------------------------------------------------------------*/
|
||||
#include "dsd.h"
|
||||
|
||||
@@ -96,6 +96,7 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn
|
||||
{
|
||||
|
||||
int i;
|
||||
int count = 5; //RMS has a 5 count (5 * 180ms) now before cutting off;
|
||||
short analog1[960];
|
||||
short analog2[960];
|
||||
short analog3[960];
|
||||
@@ -113,7 +114,7 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn
|
||||
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
while (!exitflag && rms > sql)
|
||||
while (!exitflag && count > 0)
|
||||
{
|
||||
//this will only work on 48k/1 short output
|
||||
if (opts->audio_in_type == 0)
|
||||
@@ -217,14 +218,18 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn
|
||||
|
||||
printFrameSync (opts, state, " EDACS", 0, "A");
|
||||
|
||||
if (rms < sql) fprintf (stderr, "%s", KRED);
|
||||
else fprintf (stderr, "%s", KGRN);
|
||||
if (rms < sql) count--;
|
||||
else count = 5;
|
||||
|
||||
if (rms > sql) fprintf(stderr, "%s", KGRN);
|
||||
else fprintf(stderr, "%s", KRED);
|
||||
|
||||
fprintf (stderr, " Analog RMS: %04ld SQL: %ld", rms, sql);
|
||||
if (afs != 0)
|
||||
fprintf (stderr, " AFS [%d] [%02d-%03d] LCN [%02d]", afs, afs >> 7, afs & 0x7F, lcn);
|
||||
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
//debug, view hit counter
|
||||
// fprintf (stderr, " CNT: %d; ", count);
|
||||
|
||||
if (opts->floating_point == 1)
|
||||
fprintf (stderr, "Analog Floating Point Output Not Supported");
|
||||
@@ -255,10 +260,11 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn
|
||||
// fprintf (stderr, " SR: %016llX", sr);
|
||||
|
||||
if (sr == 0xAAAAAAAAAAAAAAAA || sr == 0x5555555555555555)
|
||||
rms = 0; //break while loop by dropping rms value
|
||||
count = 0; //break while loop, sr will not equal these if just random noise
|
||||
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
|
||||
if (rms > sql) fprintf (stderr, "\n");
|
||||
if (count > 0) fprintf (stderr, "\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user