mirror of https://github.com/lwvmobile/dsd-fme.git
EDACS tweaks;
This commit is contained in:
parent
d1efa05164
commit
c73d45d553
|
|
@ -1,5 +1,5 @@
|
|||
DEC,Mode,Name of Group,Group Description,
|
||||
100,DE,Example Name,Description,
|
||||
1449,A,Fire Dispatch,Fire,
|
||||
929,A,Titusville Fire Tac,Fire,
|
||||
22033,DE,Law Dispatch,Fire,
|
||||
DEC,Mode(A- Allow, B - Block, DE - Digital Enc),Name of Group,Tag,
|
||||
100,B,Example Name,Tag
|
||||
1449,A,Fire Dispatch,Fire
|
||||
929,A,Titusville Fire Tac,Fire
|
||||
22033,DE,Law Dispatch,Law
|
||||
|
|
|
|||
|
|
|
@ -676,7 +676,7 @@ initState (dsd_state * state)
|
|||
state->p25_vc_freq[0] = 0;
|
||||
state->p25_vc_freq[1] = 0;
|
||||
|
||||
//edacs
|
||||
//edacs - may need to make these user configurable instead for stability on non-ea systems
|
||||
state->ea_mode = -1; //init on -1, 0 is standard, 1 is ea
|
||||
state->esk_mode = -1; //same as above, but with esk or not
|
||||
state->esk_mask = 0x0; //toggles from 0x0 to 0xA0 if esk mode enabled
|
||||
|
|
@ -733,8 +733,8 @@ usage ()
|
|||
// printf (" -ps Show P25 status bits and low speed data\n");
|
||||
// printf (" -pt Show P25 talkgroup info\n");
|
||||
// printf (" -q Don't show Frame Info/errorbars\n");
|
||||
printf (" -s Datascope (disables other display options)\n");
|
||||
printf (" -t Show symbol timing during sync\n");
|
||||
//printf (" -s Datascope (disables other display options)\n");
|
||||
//printf (" -t Show symbol timing during sync\n");
|
||||
// printf (" -v <num> Frame information Verbosity\n");
|
||||
printf (" -z <num> Frame rate for datascope\n");
|
||||
printf ("\n");
|
||||
|
|
@ -747,6 +747,7 @@ usage ()
|
|||
printf (" filename.wav -s 96000 for 96K/1 wav files (DSDPlus)\n");
|
||||
printf (" (Use single quotes '/directory/audio file.wav' when directories/spaces are present)\n");
|
||||
printf (" filename.bin for OP25/FME capture bin files\n");
|
||||
printf (" -s <rate> Sample Rate of wav input files (usually 48000 or 96000) Mono only!\n");
|
||||
printf (" -o <device> Audio output device (default is pulse audio)(null for no audio output)\n");
|
||||
printf (" -d <dir> Create mbe data files, use this directory\n");
|
||||
printf (" -r <files> Read/Play saved mbe data from file(s)\n");
|
||||
|
|
@ -767,7 +768,7 @@ usage ()
|
|||
printf (" -G <num> RTL-SDR Device Gain (0-49) (default = 0 Auto Gain)\n");
|
||||
printf (" -L <num> RTL-SDR Squelch Level (0 - Open, 25 - Little, 50 - Higher)\n (Just have to guess really...)\n");
|
||||
printf (" -V <num> RTL-SDR Sample Gain Multiplier (default = 1)\n");
|
||||
printf (" -Y <num> RTL-SDR VFO Bandwidth kHz (default = 48)(6, 8, 12, 16, 24, 48) \n");
|
||||
printf (" -Y <num> RTL-SDR VFO Bandwidth kHz (default = 12)(6, 8, 12, 16, 24, 48) \n");
|
||||
printf (" -U <num> RTL-SDR UDP Remote Port (default = 6020)\n");
|
||||
printf ("\n");
|
||||
printf ("Scanner control options:\n");
|
||||
|
|
@ -1080,6 +1081,7 @@ main (int argc, char **argv)
|
|||
//printPortAudioDevices();
|
||||
//exit(0);
|
||||
opts.call_alert = 1;
|
||||
break;
|
||||
//placeholder until letters get re-arranged (or opt_long switched in)
|
||||
case '1': //LCN/Frequency CSV
|
||||
strncpy(opts.lcn_in_file, optarg, 1023);
|
||||
|
|
|
|||
|
|
@ -138,8 +138,8 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
}
|
||||
|
||||
//Standard/Networked Auto Detection
|
||||
//if (command == netcmd) //netcmd is F3 Unknown Command in Networked
|
||||
if ( (fr_1t >> 32 == netcmd) )
|
||||
//if (command == netcmd) //netcmd is F3 Standard/Networked (I think)
|
||||
if ( (fr_1t >> 32 == netcmd) || (fr_1t >> 32 == (netcmd ^ 0xA0)) )
|
||||
{
|
||||
state->ea_mode = 0; //disable extended addressing mode
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
fprintf (stderr, "%s", KGRN);
|
||||
fprintf (stderr, " Group [%05d] Source [%08d] LCN[%02d]", group, source, lcn);
|
||||
|
||||
char mode[8]; //allow, block, digital, enc, etc
|
||||
char mode[8]; //allow, block, digital enc
|
||||
|
||||
for (int i = 0; i < state->group_tally; i++)
|
||||
{
|
||||
|
|
@ -242,7 +242,6 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
fprintf (stderr, " [%s]", state->group_array[i].groupName);
|
||||
strcpy (mode, state->group_array[i].groupMode);
|
||||
//fprintf (stderr, "[%s]", mode); //see if we are getting correct values
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -252,12 +251,12 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
fprintf (stderr, "%s", KNRM);
|
||||
|
||||
//this is working now with the new import setup
|
||||
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) )
|
||||
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
||||
{
|
||||
if (lcn < 26 && state->trunk_lcn_freq[lcn-1] != 0) //don't tune if zero (not loaded or otherwise)
|
||||
{
|
||||
//openwav file and do per call right here, should probably check as well to make sure we have a valid trunking method active (rigctl, rtl)
|
||||
if (opts->dmr_stereo_wav == 1)
|
||||
if (opts->dmr_stereo_wav == 1 && (opts->use_rigctl == 1 || opts->audio_in_type == 3))
|
||||
{
|
||||
sprintf (opts->wav_out_file, "./WAV/%s %s pV Site %lld TG %d SRC %d.wav", getDateE(), getTimeE(), state->edacs_site_id, group, source);
|
||||
openWavOutFile (opts, state);
|
||||
|
|
@ -268,7 +267,6 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
SetModulation(opts->rigctl_sockfd, 12500); //bw depends on system strength, but we want a wide one for now
|
||||
SetFreq(opts->rigctl_sockfd, state->trunk_lcn_freq[lcn-1]); //minus one because the lcn index starts at zero
|
||||
//probably should place these inside of the tuning function condition
|
||||
state->edacs_tuned_lcn = lcn;
|
||||
opts->p25_is_tuned = 1;
|
||||
|
||||
|
|
@ -276,9 +274,7 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
|
||||
if (opts->audio_in_type == 3) //rtl dongle
|
||||
{
|
||||
//insert rtl udp command, make a new function for it!
|
||||
rtl_udp_tune(opts, state, state->trunk_lcn_freq[lcn-1]);
|
||||
//probably should place these inside of the tuning function condition
|
||||
state->edacs_tuned_lcn = lcn;
|
||||
opts->p25_is_tuned = 1;
|
||||
}
|
||||
|
|
@ -337,7 +333,7 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
fprintf (stderr, "%s", KGRN);
|
||||
fprintf (stderr, " AFS [0x%03X] [%02d-%03d] LCN [%02d]", afs, a, fs, lcn);
|
||||
|
||||
char mode[8]; //allow, block, digital, enc, etc
|
||||
char mode[8]; //allow, block, digital enc
|
||||
|
||||
for (int i = 0; i < state->group_tally; i++)
|
||||
{
|
||||
|
|
@ -357,12 +353,12 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
fprintf (stderr, " Digital");
|
||||
//this is working now with the new import setup
|
||||
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) )
|
||||
if (opts->p25_trunk == 1 && (strcmp(mode, "DE") != 0) && (strcmp(mode, "B") != 0) ) //DE is digital encrypted, B is block
|
||||
{
|
||||
if (lcn < 26 && state->trunk_lcn_freq[lcn-1] != 0) //don't tune if zero (not loaded or otherwise)
|
||||
{
|
||||
//openwav file and do per call right here
|
||||
if (opts->dmr_stereo_wav == 1)
|
||||
if (opts->dmr_stereo_wav == 1 && (opts->use_rigctl == 1 || opts->audio_in_type == 3))
|
||||
{
|
||||
sprintf (opts->wav_out_file, "./WAV/%s %s pV Site %lld AFS %X.wav", getDateE(), getTimeE(), state->edacs_site_id, afs);
|
||||
openWavOutFile (opts, state);
|
||||
|
|
@ -372,16 +368,13 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
SetModulation(opts->rigctl_sockfd, 12500); //bw depends on system strength, but we want a wide one for now
|
||||
SetFreq(opts->rigctl_sockfd, state->trunk_lcn_freq[lcn-1]); //minus one because our index starts at zero
|
||||
//probably should place these inside of the tuning function condition
|
||||
state->edacs_tuned_lcn = lcn;
|
||||
opts->p25_is_tuned = 1;
|
||||
}
|
||||
|
||||
if (opts->audio_in_type == 3) //rtl dongle
|
||||
{
|
||||
//rtl udp command here
|
||||
rtl_udp_tune(opts, state, state->trunk_lcn_freq[lcn-1]);
|
||||
//probably should place these inside of the tuning function condition
|
||||
state->edacs_tuned_lcn = lcn;
|
||||
opts->p25_is_tuned = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue