mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-13 01:07:24 -05:00
Analog Monitor Hold on SQL Break; Misc;
This commit is contained in:
@@ -745,7 +745,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
|
||||
|
||||
|
||||
@@ -582,7 +582,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
|
||||
@@ -660,7 +660,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
|
||||
@@ -867,7 +867,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
|
||||
@@ -945,7 +945,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
|
||||
|
||||
@@ -295,6 +295,10 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
||||
//NOTE: Worked okay earlier in Cygwin, so should be fine
|
||||
if (opts->audio_out_type == 5)
|
||||
write (opts->audio_out_fd, state->analog_out, 960*2);
|
||||
|
||||
//test hold on scan/trunking
|
||||
state->last_cc_sync_time = time(NULL);
|
||||
state->last_vc_sync_time = time(NULL);
|
||||
}
|
||||
|
||||
memset (state->analog_out, 0, sizeof(state->analog_out));
|
||||
|
||||
12
src/m17.c
12
src/m17.c
@@ -157,7 +157,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;
|
||||
@@ -173,8 +173,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);
|
||||
@@ -211,7 +211,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]);
|
||||
}
|
||||
|
||||
@@ -589,6 +589,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);
|
||||
|
||||
|
||||
@@ -37,4 +37,9 @@ processTDU (dsd_opts* opts, dsd_state* state)
|
||||
//reset some strings -- since its a tdu, blank out any call strings, only want during actual call
|
||||
sprintf (state->call_string[0], "%s", " "); //21 spaces
|
||||
sprintf (state->call_string[1], "%s", " "); //21 spaces
|
||||
|
||||
//zero out on termination
|
||||
state->payload_algid = 0;
|
||||
state->payload_keyid = 0;
|
||||
state->payload_miP = 0;
|
||||
}
|
||||
|
||||
@@ -446,4 +446,9 @@ processTDULC (dsd_opts* opts, dsd_state* state)
|
||||
sprintf (state->call_string[0], "%s", " "); //21 spaces
|
||||
sprintf (state->call_string[1], "%s", " "); //21 spaces
|
||||
|
||||
//zero out on termination
|
||||
state->payload_algid = 0;
|
||||
state->payload_keyid = 0;
|
||||
state->payload_miP = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -812,7 +812,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user