mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-14 01:37:25 -05:00
P25p1 MFID90 Channel User; TG Hold CLI; DMR BS Stablilization and LE Fix; Updated Patches; OSS Jank Fix; Ncurses Keyboard Shortcuts for Return to CC and Manual Channel Cycling; Misc;
This commit is contained in:
64
src/dmr_bs.c
64
src/dmr_bs.c
@@ -75,8 +75,18 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
//Init the color code status
|
||||
state->color_code_ok = 0;
|
||||
|
||||
vc1 = 2;
|
||||
vc2 = 2;
|
||||
//if coming from the bootsrap, then the slot will still be assigned the last value
|
||||
//we want to set only that vc value to 2, the other to 7
|
||||
if (state->currentslot == 0)
|
||||
{
|
||||
vc1 = 2;
|
||||
vc2 = 7;
|
||||
}
|
||||
if (state->currentslot == 1)
|
||||
{
|
||||
vc1 = 7;
|
||||
vc2 = 2;
|
||||
}
|
||||
|
||||
short int loop = 1;
|
||||
short int skipcount = 0;
|
||||
@@ -273,7 +283,7 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
else fprintf (stderr,"Sync: -DMR ");
|
||||
|
||||
vc1 = 1;
|
||||
vc1 = 7; //set to 7 so we can see that we should not be on a VC unless a framesync comes in for it first
|
||||
|
||||
//close MBEout file - slot 1
|
||||
if (opts->mbe_out_f != NULL) closeMbeOutFile (opts, state);
|
||||
@@ -286,7 +296,7 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
else fprintf (stderr,"Sync: -DMR ");
|
||||
|
||||
vc2 = 1;
|
||||
vc2 = 7; //set to 7 so we can see that we should not be on a VC unless a framesync comes in for it first
|
||||
|
||||
//close MBEout file - slot 2
|
||||
if (opts->mbe_out_fR != NULL) closeMbeOutFileR (opts, state);
|
||||
@@ -297,7 +307,49 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
goto SKIP;
|
||||
}
|
||||
|
||||
//only play voice on no data sync
|
||||
//check to see if we are expecting a VC at this point vc > 7
|
||||
if (strcmp (sync, DMR_BS_DATA_SYNC) != 0 && internalslot == 0 && vc1 > 6)
|
||||
{
|
||||
fprintf (stderr,"%s ", getTime());
|
||||
|
||||
//simplifying things
|
||||
char polarity[3];
|
||||
char light[18];
|
||||
|
||||
sprintf (light, "%s", " [SLOT1] slot2 ");
|
||||
fprintf (stderr,"Sync: %sDMR %s", polarity, light);
|
||||
fprintf (stderr, "%s", KCYN);
|
||||
fprintf (stderr, "| Frame Sync Err: %d", vc1);
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
fprintf (stderr, "\n");
|
||||
vc1++;
|
||||
//this should give it enough time to find the next frame sync pattern, if it exists, if not, then trigger a resync
|
||||
if ( vc1 > 13 ) goto END;
|
||||
else goto SKIP;
|
||||
}
|
||||
|
||||
//check to see if we are expecting a VC at this point vc > 7
|
||||
if (strcmp (sync, DMR_BS_DATA_SYNC) != 0 && internalslot == 1 && vc2 > 6)
|
||||
{
|
||||
fprintf (stderr,"%s ", getTime());
|
||||
|
||||
//simplifying things
|
||||
char polarity[3];
|
||||
char light[18];
|
||||
|
||||
sprintf (light, "%s", " slot1 [SLOT2] ");
|
||||
fprintf (stderr,"Sync: %sDMR %s", polarity, light);
|
||||
fprintf (stderr, "%s", KCYN);
|
||||
fprintf (stderr, "| Frame Sync Err: %d", vc2);
|
||||
fprintf (stderr, "%s", KNRM);
|
||||
fprintf (stderr, "\n");
|
||||
vc2++;
|
||||
//this should give it enough time to find the next frame sync pattern, if it exists, if not, then trigger a resync
|
||||
if ( vc2 > 13 ) goto END;
|
||||
else goto SKIP;
|
||||
}
|
||||
|
||||
//only play voice on no data sync, and VC values are within expected values 1-6
|
||||
if (strcmp (sync, DMR_BS_DATA_SYNC) != 0) //we already have a tact ecc check, so we won't get here without that, see if there is any other eccs we can run just to make sure
|
||||
{
|
||||
|
||||
@@ -430,7 +482,7 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
if (internalslot == 0 && vc1 == 6) dmr_alg_refresh (opts, state);
|
||||
if (internalslot == 1 && vc2 == 6) dmr_alg_refresh (opts, state);
|
||||
|
||||
dmr_late_entry_mi_fragment (opts, state, vc, m1, m2, m3);
|
||||
dmr_late_entry_mi_fragment (opts, state, vc%7, m1, m2, m3);
|
||||
|
||||
//increment the vc counters
|
||||
if (internalslot == 0) vc1++;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*-----------------------------------------------------------------------------*/
|
||||
|
||||
#include "dsd.h"
|
||||
|
||||
#define PCLEAR_TUNE_AWAY //disable if slower return is preferred
|
||||
//function for handling Control Signalling PDUs (CSBK, MBC) messages
|
||||
void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8_t cs_pdu[], uint32_t CRCCorrect, uint32_t IrrecoverableErrors)
|
||||
{
|
||||
@@ -297,6 +297,7 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
|
||||
SetFreq(opts->rigctl_sockfd, freq);
|
||||
state->p25_vc_freq[0] = state->p25_vc_freq[1] = freq;
|
||||
opts->p25_is_tuned = 1; //set to 1 to set as currently tuned so we don't keep tuning nonstop
|
||||
state->last_vc_sync_time = time(NULL); //set here so a random p_clear on the opposite slot doesn't send us back to the CC
|
||||
|
||||
}
|
||||
|
||||
@@ -324,6 +325,7 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
|
||||
rtl_dev_tune (opts, freq);
|
||||
state->p25_vc_freq[0] = state->p25_vc_freq[1] = freq;
|
||||
opts->p25_is_tuned = 1;
|
||||
state->last_vc_sync_time = time(NULL); //set here so a random p_clear on the opposite slot doesn't send us back to the CC
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -395,7 +397,7 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
|
||||
//initial line break
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, " Clear (P_CLEAR) %d", clear);
|
||||
|
||||
#ifdef PCLEAR_TUNE_AWAY
|
||||
//check to see if this is a dummy csbk sent from link control to signal return to tscc
|
||||
if (clear && csbk_fid == 255) fprintf (stderr, " No Encrypted Call Trunking; Return to CC; ");
|
||||
if (!clear && csbk_fid == 255) fprintf (stderr, " No Encrypted Call Trunking; Other Slot Busy; ");
|
||||
@@ -461,6 +463,7 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//(P_PROTECT)
|
||||
|
||||
@@ -336,7 +336,7 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
|
||||
if (opts->setmod_bw != 0) SetModulation(opts->rigctl_sockfd, opts->setmod_bw);
|
||||
SetFreq(opts->rigctl_sockfd, state->p25_cc_freq);
|
||||
//debug
|
||||
fprintf (stderr, " Con+ Timeout; Return to CC;");
|
||||
fprintf (stderr, " Con+ Timeout; Return to CC; \n");
|
||||
}
|
||||
|
||||
else if (opts->audio_in_type == 3) //rtl_fm tuning
|
||||
@@ -344,7 +344,7 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
|
||||
#ifdef USE_RTLSDR
|
||||
rtl_dev_tune(opts, state->p25_cc_freq);
|
||||
//debug
|
||||
fprintf (stderr, " Con+ Timeout; Return to CC;");
|
||||
fprintf (stderr, " Con+ Timeout; Return to CC; \n");
|
||||
#endif
|
||||
}
|
||||
opts->p25_is_tuned = 0;
|
||||
|
||||
@@ -1349,7 +1349,7 @@ usage ()
|
||||
printf (" -G <file> Import Group List Allow/Block and Label from csv file.\n");
|
||||
printf (" (See group.csv for example)\n");
|
||||
printf (" -T Enable Trunking Features (NXDN/P25/EDACS/DMR) with RIGCTL/TCP or RTL Input\n");
|
||||
printf (" -Y Enable Scanning Mode with RIGCTL/TCP or RTL Input (Lower z) \n");
|
||||
printf (" -Y Enable Scanning Mode with RIGCTL/TCP or RTL Input \n");
|
||||
printf (" Experimental -- Can only scan for sync with enabled decoders, don't mix NXDN and DMR/P25!\n");
|
||||
printf (" This is not a Trunking Feature, just scans through conventional frequencies fast!\n");
|
||||
printf (" -W Use Imported Group List as a Trunking Allow/White List -- Only Tune with Mode A\n");
|
||||
@@ -1357,7 +1357,7 @@ usage ()
|
||||
printf (" -E Disable Tune to Group Calls (DMR TIII, Con+, Cap+, P25, NXDN Type-C, and Type-D)\n");
|
||||
printf (" -e Enable Tune to Data Calls (DMR TIII, Cap+, NXDN Type-C)\n");
|
||||
printf (" (NOTE: No Clear Distinction between Cap+ Private Voice Calls and Data Calls -- Both enabled with Data Calls \n");
|
||||
printf (" (NOTE: P25 Data Channels Not Enabled (no handling) \n");
|
||||
printf (" -I <dec> Specify TG to Hold During Trunking (DMR, P25, NXDN Type-C Trunking)\n");
|
||||
printf (" -U <port> Enable RIGCTL/TCP; Set TCP Port for RIGCTL. (4532 on SDR++)\n");
|
||||
printf (" -B <Hertz> Set RIGCTL Setmod Bandwidth in Hertz (0 - default - OFF)\n");
|
||||
printf (" P25 - 12000; NXDN48 - 7000; NXDN96: 12000; DMR - 7000-12000; EDACS/PV - 12000-24000;\n"); //redo this, or check work, or whatever
|
||||
@@ -1586,7 +1586,7 @@ main (int argc, char **argv)
|
||||
|
||||
exitflag = 0;
|
||||
|
||||
while ((c = getopt (argc, argv, "yhaepPqs:t:v:z:i:o:d:c:g:nw:B:C:R:f:m:u:x:A:S:M:G:D:L:V:U:YK:b:H:X:NQ:WrlZTF01:2:345:6:7:89Ek:")) != -1)
|
||||
while ((c = getopt (argc, argv, "yhaepPqs:t:v:z:i:o:d:c:g:nw:B:C:R:f:m:u:x:A:S:M:G:D:L:V:U:YK:b:H:X:NQ:WrlZTF01:2:345:6:7:89Ek:I:")) != -1)
|
||||
{
|
||||
opterr = 0;
|
||||
switch (c)
|
||||
@@ -1609,6 +1609,12 @@ main (int argc, char **argv)
|
||||
//NOTE: The 'K' option for single BP key has been swapped to 'b'
|
||||
//'K' is now used for hexidecimal key.csv imports
|
||||
|
||||
//specify TG Hold value
|
||||
case 'I':
|
||||
sscanf (optarg, "%d", &state.tg_hold);
|
||||
fprintf (stderr, "TG Hold set to %d \n", state.tg_hold);
|
||||
break;
|
||||
|
||||
case '9': //This is a temporary fix for RR issue until a permanent fix can be found
|
||||
state.ea_mode = 0;
|
||||
fprintf (stderr,"Force Enabling EDACS Standard/Networked Mode Mode\n");
|
||||
|
||||
@@ -1077,6 +1077,9 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
{
|
||||
if ( opts->floating_point == 0 ) //opts->audio_out == 1 && //needed to remove for AERO OSS so we could still save wav files during dual voices
|
||||
{
|
||||
#ifdef AERO_BUILD
|
||||
if(opts->audio_out == 1 && opts->slot1_on == 1) //add conditional check here, otherwise some lag occurs on dual voices with OSS48k/1 input due to buffered audio
|
||||
#endif
|
||||
processAudio(opts, state);
|
||||
}
|
||||
if (opts->audio_out == 1 && opts->floating_point == 0 && opts->audio_out_type == 5 && opts->slot1_on == 1) //for OSS 48k 1 channel configs -- relocate later if possible
|
||||
@@ -1151,6 +1154,9 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
{
|
||||
if ( opts->floating_point == 0) //opts->audio_out == 1 && //needed to remove for AERO OSS so we could still save wav files during dual voices
|
||||
{
|
||||
#ifdef AERO_BUILD
|
||||
if(opts->audio_out == 1 && opts->slot2_on == 1) //add conditional check here, otherwise some lag occurs on dual voices with OSS48k/1 input due to buffered audio
|
||||
#endif
|
||||
processAudioR(opts, state);
|
||||
}
|
||||
if (opts->audio_out == 1 && opts->floating_point == 0 && opts->audio_out_type == 5 && opts->slot2_on == 1) //for OSS 48k 1 channel configs -- relocate later if possible
|
||||
|
||||
@@ -2533,8 +2533,11 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
attron(COLOR_PAIR(3));
|
||||
level = (int) state->max / 164; //only update on carrier present
|
||||
if (opts->mod_qpsk == 1) level = (int) state->max / 328; //test values here
|
||||
if (opts->audio_in_type == 4) level = 50; //hard set when reading symbol bin files, otherwise, it will just be near zero
|
||||
if (level > 100) level = 100; //cap max at 100 to prevent it going over
|
||||
reset = 1;
|
||||
}
|
||||
else level = 0;
|
||||
|
||||
printw ("--Audio Decode----------------------------------------------------------------\n");
|
||||
printw ("| Demod/Rate: ");
|
||||
@@ -4195,6 +4198,157 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
else opts->use_rigctl = 0;
|
||||
}
|
||||
|
||||
//if trunking and user wants to just go back to the control channel and skip this call
|
||||
if (opts->p25_trunk == 1 && state->p25_cc_freq != 0 && c == 67) //Capital C key - Return to CC
|
||||
{
|
||||
|
||||
//extra safeguards due to sync issues with NXDN
|
||||
memset (state->nxdn_sacch_frame_segment, 1, sizeof(state->nxdn_sacch_frame_segment));
|
||||
memset (state->nxdn_sacch_frame_segcrc, 1, sizeof(state->nxdn_sacch_frame_segcrc));
|
||||
|
||||
memset (state->active_channel, 0, sizeof(state->active_channel));
|
||||
|
||||
//reset dmr blocks
|
||||
dmr_reset_blocks (opts, state);
|
||||
|
||||
//zero out additional items
|
||||
state->lasttg = 0;
|
||||
state->lasttgR = 0;
|
||||
state->lastsrc = 0;
|
||||
state->lastsrcR = 0;
|
||||
state->payload_algid = 0;
|
||||
state->payload_algidR = 0;
|
||||
state->payload_keyid = 0;
|
||||
state->payload_keyidR = 0;
|
||||
state->payload_mi = 0;
|
||||
state->payload_miR = 0;
|
||||
state->payload_miP = 0;
|
||||
state->payload_miN = 0;
|
||||
opts->p25_is_tuned = 0;
|
||||
state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0;
|
||||
|
||||
//tune back to the control channel
|
||||
//RIGCTL
|
||||
if (opts->p25_trunk == 1 && opts->use_rigctl == 1) SetFreq(opts->rigctl_sockfd, state->p25_cc_freq);
|
||||
|
||||
//rtl
|
||||
#ifdef USE_RTLSDR
|
||||
if (opts->p25_trunk == 1 && opts->audio_in_type == 3) rtl_dev_tune (opts, state->p25_cc_freq);
|
||||
#endif
|
||||
|
||||
state->last_cc_sync_time = time(NULL);
|
||||
|
||||
//if P25p2 VCH and going back to P25p1 CC, flip symbolrate
|
||||
if (state->p25_cc_is_tdma == 0)
|
||||
{
|
||||
state->samplesPerSymbol = 10;
|
||||
state->symbolCenter = 4;
|
||||
}
|
||||
|
||||
//if P25p1 Data Revert on P25p2 TDMA CC, flip symbolrate
|
||||
if (state->p25_cc_is_tdma == 1)
|
||||
{
|
||||
state->samplesPerSymbol = 8;
|
||||
state->symbolCenter = 3;
|
||||
}
|
||||
|
||||
fprintf (stderr, "\n User Activated Return to CC; \n ");
|
||||
|
||||
}
|
||||
|
||||
//if trunking or scanning, manually cycle forward through channels loaded (can be run without trunking or scanning enabled)
|
||||
if ( (opts->use_rigctl == 1 || opts->audio_in_type == 3) && c == 76) //Capital L key - Cycle Channels Forward
|
||||
{
|
||||
|
||||
//extra safeguards due to sync issues with NXDN
|
||||
memset (state->nxdn_sacch_frame_segment, 1, sizeof(state->nxdn_sacch_frame_segment));
|
||||
memset (state->nxdn_sacch_frame_segcrc, 1, sizeof(state->nxdn_sacch_frame_segcrc));
|
||||
|
||||
memset (state->active_channel, 0, sizeof(state->active_channel));
|
||||
|
||||
//reset dmr blocks
|
||||
dmr_reset_blocks (opts, state);
|
||||
|
||||
//zero out additional items
|
||||
state->lasttg = 0;
|
||||
state->lasttgR = 0;
|
||||
state->lastsrc = 0;
|
||||
state->lastsrcR = 0;
|
||||
state->payload_algid = 0;
|
||||
state->payload_algidR = 0;
|
||||
state->payload_keyid = 0;
|
||||
state->payload_keyidR = 0;
|
||||
state->payload_mi = 0;
|
||||
state->payload_miR = 0;
|
||||
state->payload_miP = 0;
|
||||
state->payload_miN = 0;
|
||||
opts->p25_is_tuned = 0;
|
||||
state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0;
|
||||
|
||||
//just copy and pasted the cycle logic for CC/signal hunting on no sync
|
||||
if (state->lcn_freq_roll >= state->lcn_freq_count) //fixed this to skip the extra wait out at the end of the list
|
||||
{
|
||||
state->lcn_freq_roll = 0; //reset to zero
|
||||
}
|
||||
|
||||
//roll an extra value up if the current is the same as what's already loaded -- faster hunting on Cap+, etc
|
||||
if (state->lcn_freq_roll != 0)
|
||||
{
|
||||
if (state->trunk_lcn_freq[state->lcn_freq_roll-1] == state->trunk_lcn_freq[state->lcn_freq_roll])
|
||||
{
|
||||
state->lcn_freq_roll++;
|
||||
//check roll again if greater than expected, then go back to zero
|
||||
if (state->lcn_freq_roll >= state->lcn_freq_count)
|
||||
{
|
||||
state->lcn_freq_roll = 0; //reset to zero
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//check that we have a non zero value first, then tune next frequency
|
||||
if (state->trunk_lcn_freq[state->lcn_freq_roll] != 0)
|
||||
{
|
||||
//rigctl
|
||||
if (opts->use_rigctl == 1)
|
||||
{
|
||||
if (opts->setmod_bw != 0 ) SetModulation(opts->rigctl_sockfd, opts->setmod_bw);
|
||||
SetFreq(opts->rigctl_sockfd, state->trunk_lcn_freq[state->lcn_freq_roll]);
|
||||
}
|
||||
//rtl
|
||||
if (opts->audio_in_type == 3)
|
||||
{
|
||||
#ifdef USE_RTLSDR
|
||||
rtl_dev_tune (opts, state->trunk_lcn_freq[state->lcn_freq_roll]);
|
||||
#endif
|
||||
}
|
||||
|
||||
fprintf (stderr, "\n User Activated Channel Cycle;");
|
||||
fprintf (stderr, " Tuning to Frequency: %.06lf MHz\n",
|
||||
(double)state->trunk_lcn_freq[state->lcn_freq_roll]/1000000);
|
||||
|
||||
}
|
||||
state->lcn_freq_roll++;
|
||||
state->last_cc_sync_time = time(NULL);
|
||||
|
||||
|
||||
//may need to test to see if we want to do the conditional below or not for symbol rate flipping
|
||||
|
||||
//if P25p2 VCH and going back to P25p1 CC, flip symbolrate
|
||||
if (state->p25_cc_is_tdma == 0)
|
||||
{
|
||||
state->samplesPerSymbol = 10;
|
||||
state->symbolCenter = 4;
|
||||
}
|
||||
|
||||
//if P25p1 Data Revert on P25p2 TDMA CC, flip symbolrate
|
||||
if (state->p25_cc_is_tdma == 1)
|
||||
{
|
||||
state->samplesPerSymbol = 8;
|
||||
state->symbolCenter = 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//anything with an entry box will need the inputs and outputs stopped first
|
||||
//so probably just write a function to handle c input, and when c = certain values
|
||||
//needing an entry box, then stop all of those
|
||||
|
||||
@@ -264,16 +264,17 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
||||
|
||||
}
|
||||
|
||||
//BUG REPORT: 1. DMR Simplex doesn't work with raw wav files. 2. Using the monitor w/ wav file saving may produce undecodable wav files.
|
||||
//reworked a bit to allow raw audio wav file saving without the monitoring poriton active
|
||||
if (have_sync == 0)
|
||||
{
|
||||
|
||||
//do an extra checkfor carrier signal so that random raw audio spurts don't play during decoding
|
||||
if ( (state->carrier == 1) && ((time(NULL) - state->last_vc_sync_time) < 2))
|
||||
{
|
||||
memset (state->analog_out, 0, sizeof(state->analog_out));
|
||||
state->analog_sample_counter = 0;
|
||||
}
|
||||
// if ( (state->carrier == 1) && ((time(NULL) - state->last_vc_sync_time) < 2)) /This probably doesn't work correctly since we update time check when playing raw audio
|
||||
// {
|
||||
// memset (state->analog_out, 0, sizeof(state->analog_out));
|
||||
// state->analog_sample_counter = 0;
|
||||
// } //This is the root cause of issue listed above, will evaluate further at a later time for a more elegant solution, or determine if anything is negatively impacted by removing this
|
||||
|
||||
//sanity check to prevent an overflow
|
||||
if (state->analog_sample_counter > 959)
|
||||
@@ -295,7 +296,7 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
||||
// state->analog_out[x] /= 4;
|
||||
|
||||
//seems to be working now, but RMS values are lower on actual analog signal than on no signal but noise
|
||||
if ( (opts->rtl_rms > opts->rtl_squelch_level) && (opts->monitor_input_audio == 1) )
|
||||
if ( (opts->rtl_rms > opts->rtl_squelch_level) && opts->monitor_input_audio == 1 && state->carrier == 0 ) //added carrier check here in lieu of disabling it above
|
||||
{
|
||||
if (opts->audio_out_type == 0)
|
||||
pa_simple_write(opts->pulse_raw_dev_out, state->analog_out, 960*2, NULL);
|
||||
|
||||
@@ -328,7 +328,7 @@ void processDSTAR_SD(dsd_opts * opts, dsd_state * state, uint8_t * sd)
|
||||
fprintf (stderr, "; ");
|
||||
|
||||
//Got the feeling nobody will actually ever see this message, but who knows
|
||||
fprintf(stderr, "\n DEV NOTE: If you see this message, but incorrect lat/lon,\n please submit samples to https://github.com/lwvmobile/dsd-fme/issues/164 ");
|
||||
// fprintf(stderr, "\n DEV NOTE: If you see this message, but incorrect lat/lon,\n please submit samples to https://github.com/lwvmobile/dsd-fme/issues/164 ");
|
||||
|
||||
SKIP: ; //do nothing
|
||||
|
||||
|
||||
@@ -406,10 +406,28 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
|
||||
}
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x0)
|
||||
{
|
||||
//needed to fill this in, since tuning this on P1 will just leave the TG/SRC as zeroes
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Channel User (LCGRGR)");
|
||||
uint32_t sg = (uint32_t)ConvertBitIntoBytes(&LCW_bits[32], 16);
|
||||
uint32_t src = (uint32_t)ConvertBitIntoBytes(&LCW_bits[48], 24);
|
||||
fprintf (stderr, " SG: %d; SRC: %d;", sg, src);
|
||||
if (LCW_bits[16] == 1) fprintf (stderr, " Res;"); //res bit (octet 2)
|
||||
if (LCW_bits[17] == 1) fprintf (stderr, " ENC;"); //P-bit (octet 2)
|
||||
if (LCW_bits[31] == 1) fprintf (stderr, " EXT;"); //Full SUID next LC (external) (octet 3)
|
||||
state->lasttg = sg;
|
||||
state->lastsrc = src;
|
||||
}
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x1)
|
||||
{
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Channel Update (LCGRGU)");
|
||||
uint32_t sg = (uint32_t)ConvertBitIntoBytes(&LCW_bits[24], 16);
|
||||
uint32_t ch = (uint32_t)ConvertBitIntoBytes(&LCW_bits[56], 16);
|
||||
fprintf (stderr, " SG: %d; CH: %04X;", sg, ch);
|
||||
if (LCW_bits[16] == 1) fprintf (stderr, " Res;"); //res bit (octet 2)
|
||||
if (LCW_bits[17] == 1) fprintf (stderr, " ENC;"); //P-bit (octet 2)
|
||||
}
|
||||
|
||||
else if (lc_mfid == 0x90 && lc_opcode == 0x3)
|
||||
fprintf (stderr, " MFID90 (Moto) Group Regroup Add");
|
||||
|
||||
@@ -845,6 +845,10 @@ void process_P2_DUID (dsd_opts * opts, dsd_state * state)
|
||||
state->p25_vc_freq[0] = state->p25_vc_freq[1] = 0;
|
||||
memset (state->active_channel, 0, sizeof (state->active_channel)); //zero out here? I think this will be fine
|
||||
}
|
||||
else if (duid_decoded == 13 && ((time(NULL) - state->last_active_time) > 2) && opts->p25_is_tuned == 0) //should we use && opts->p25_is_tuned == 1?
|
||||
{
|
||||
memset (state->active_channel, 0, sizeof (state->active_channel)); //zero out here? I think this will be fine
|
||||
}
|
||||
|
||||
if (duid_decoded == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user