Analog Monitor Hold on SQL Break; Misc;

This commit is contained in:
lwvmobile
2023-08-13 11:30:21 -04:00
parent dcc818e9c3
commit 4cdcefb980
9 changed files with 31 additions and 12 deletions

View File

@@ -778,7 +778,7 @@ typedef struct
char m17_src_str[50];
char m17_dst_str[50];
uint8_t m17_meta[14]; //packed meta
uint8_t m17_meta[16]; //packed meta
uint8_t m17_enc; //enc type
uint8_t m17_enc_st; //scrambler or data subtye

View File

@@ -1245,7 +1245,7 @@ usage ()
printf ("Decoder options:\n");
printf (" -fa Auto Detection\n");
printf (" -ft TDMA Trunking P25p1 Control and Voice, P25p2 Trunked Channels, and DMR\n");
printf (" -fs DMR Stereo BS and MS Simplex\n");
printf (" -fs DMR TDMA BS and MS Simplex\n");
printf (" -f1 Decode only P25 Phase 1\n");
printf (" -f2 Decode only P25 Phase 2 (6000 sps) **\n");
printf (" -fd Decode only DSTAR\n");

View File

@@ -593,7 +593,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
state->dropL += 7;
short z = 0;
for (short p = 0; p < 6; p++)
for (short p = 0; p <= 6; p++)
{
//convert bytes back to bits and load into ambe_d array.
short b = 0; //reset b to use again
@@ -671,7 +671,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
state->dropL += 7;
short z = 0;
for (short p = 0; p < 6; p++)
for (short p = 0; p <= 6; p++)
{
//convert bytes back to bits and load into ambe_d array.
short b = 0; //reset b to use again
@@ -878,7 +878,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
state->dropR += 7;
short z = 0;
for (short p = 0; p < 6; p++)
for (short p = 0; p <= 6; p++)
{
//convert bytes back to bits and load into ambe_d array.
short b = 0; //reset b to use again
@@ -956,7 +956,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
state->dropR += 7;
short z = 0;
for (short p = 0; p < 6; p++)
for (short p = 0; p <= 6; p++)
{
//convert bytes back to bits and load into ambe_d array.
short b = 0; //reset b to use again

View File

@@ -2432,7 +2432,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
printw ("| Fast Scan Mode: ");
if (state->lcn_freq_roll != 0)
printw (" - Frequency: %.06lf Mhz", (double)state->trunk_lcn_freq[state->lcn_freq_roll-1]/1000000);
printw (" Frequency: %.06lf Mhz", (double)state->trunk_lcn_freq[state->lcn_freq_roll-1]/1000000);
printw (" Speed: %.02lf sec \n", opts->trunk_hangtime); //not sure values less than 1 make a difference, may be system/environment dependent
}

View File

@@ -308,6 +308,10 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
//OSS 8k1 (no go just yet)
// if (opts->audio_out_type == 2 && opts->pulse_digi_rate_out == 48000 && opts->pulse_digi_out_channels == 1)
// write (opts->audio_out_fd, state->analog_out, 960*2);
//test updating the sync time, so we can hold here while trunking or fast scanning
state->last_cc_sync_time = time(NULL);
state->last_vc_sync_time = time(NULL);
}
memset (state->analog_out, 0, sizeof(state->analog_out));

View File

@@ -136,7 +136,7 @@ void M17decodeLSF(dsd_state * state)
uint16_t lsf_type = (uint16_t)ConvertBitIntoBytes(&state->m17_lsf[96], 16);
//this is the way the manual/code expects you to read these bits
uint8_t lsf_ps = (lsf_type >> 0) & 0x1;
// uint8_t lsf_ps = (lsf_type >> 0) & 0x1;
uint8_t lsf_dt = (lsf_type >> 1) & 0x3;
uint8_t lsf_et = (lsf_type >> 3) & 0x3;
uint8_t lsf_es = (lsf_type >> 5) & 0x3;
@@ -152,8 +152,8 @@ void M17decodeLSF(dsd_state * state)
fprintf (stderr, "\n");
//packet or stream
if (lsf_ps == 0) fprintf (stderr, " P-");
if (lsf_ps == 1) fprintf (stderr, " S-");
// if (lsf_ps == 0) fprintf (stderr, " P-");
// if (lsf_ps == 1) fprintf (stderr, " S-");
fprintf (stderr, " CAN: %d", lsf_cn);
M17decodeCSD(state, lsf_dst, lsf_src);
@@ -190,7 +190,7 @@ void M17decodeLSF(dsd_state * state)
if (lsf_et == 1)
{
fprintf (stderr, " IV: ");
for (i = 0; i < 14; i++)
for (i = 0; i < 16; i++)
fprintf (stderr, "%02X", state->m17_meta[i]);
}
@@ -566,6 +566,10 @@ void M17prepareStream(dsd_opts * opts, dsd_state * state, uint8_t * m17_bits)
end = trellis_buf[0];
fn = (uint16_t)ConvertBitIntoBytes(&trellis_buf[1], 15);
//insert fn bits into meta 14 and meta 15 for Initialization Vector
state->m17_meta[14] = (uint8_t)ConvertBitIntoBytes(&trellis_buf[1], 7);
state->m17_meta[15] = (uint8_t)ConvertBitIntoBytes(&trellis_buf[8], 8);
if (opts->payload == 1)
fprintf (stderr, " FSN: %05d", fn);

View File

@@ -42,4 +42,10 @@ processTDU (dsd_opts* opts, dsd_state* state)
//reset gain
if (opts->floating_point == 1)
state->aout_gain = opts->audio_gain;
//zero out MI, key, alg
state->payload_miP = 0;
state->payload_algid = 0;
state->payload_keyid = 0;
}

View File

@@ -451,4 +451,9 @@ processTDULC (dsd_opts* opts, dsd_state* state)
if (opts->floating_point == 1)
state->aout_gain = opts->audio_gain;
//zero out MI, key, alg
state->payload_miP = 0;
state->payload_algid = 0;
state->payload_keyid = 0;
}

View File

@@ -842,7 +842,7 @@ void processYSF(dsd_opts * opts, dsd_state * state)
//print some useful decoded stuff
if (dt == 0 && err == 0) fprintf (stderr, "V/D1 "); //Voice/Data Type 1
if (dt == 1 && err == 0) fprintf (stderr, "DATA "); //Full Rate Voice
if (dt == 1 && err == 0) fprintf (stderr, "DATA "); //Full Rate Data
if (dt == 2 && err == 0) fprintf (stderr, "V/D2 "); //Voice/Data Type 2
if (dt == 3 && err == 0) fprintf (stderr, "VWFR "); //Full Rate Voice