mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-13 01:07:24 -05:00
Merge pull request #43 from lwvmobile/lwvmobile-patch-1
More ALG,KEY,MI 'fixes'
This commit is contained in:
@@ -242,10 +242,12 @@ closeMbeOutFile (dsd_opts * opts, dsd_state * state)
|
||||
strftime (datestr, 31, "%Y-%m-%d-%H%M%S", &timep);
|
||||
|
||||
sprintf (newfilename, "%s%s", datestr, ext); //this one
|
||||
|
||||
if (state->lastsynctype == 0 || state->lastsynctype == 1)
|
||||
{
|
||||
sprintf (newfilename, "%s-nac%X-tg%i%s", datestr, state->nac, talkgroup, ext);
|
||||
}
|
||||
|
||||
sprintf (new_path, "%s%s", opts->mbe_out_dir, newfilename);
|
||||
#ifdef _WIN32
|
||||
sprintf (shell, "move %s %s", opts->mbe_out_path, new_path);
|
||||
|
||||
@@ -452,17 +452,25 @@ processHDU(dsd_opts* opts, dsd_state* state)
|
||||
skipDibit (opts, state, 5);
|
||||
status = getDibit (opts, state);
|
||||
//TODO: Do something useful with the status bits...
|
||||
/*
|
||||
algidhex = strtol (algid, NULL, 2);
|
||||
kidhex = strtol (kid, NULL, 2);
|
||||
|
||||
state->payload_algid = algidhex;
|
||||
state->payload_keyid = kidhex;
|
||||
if (opts->payload == 1)
|
||||
if (state->carrier == 1 && state->errs == 0) //only update when carrier is present, and no errors??
|
||||
//if (state->carrier == 1)
|
||||
{
|
||||
fprintf (stderr, "ALG ID: 0x%X KEY ID: 0x%X\n", algidhex, kidhex);
|
||||
algidhex = strtol (algid, NULL, 2);
|
||||
kidhex = strtol (kid, NULL, 2);
|
||||
|
||||
state->payload_algid = algidhex;
|
||||
state->payload_keyid = kidhex;
|
||||
}
|
||||
*/
|
||||
|
||||
//if (opts->payload == 1)
|
||||
if (opts->payload == 1 && state->errs == 0)
|
||||
{
|
||||
//fprintf (stderr, "ALG ID: 0x%X KEY ID: 0x%X\n", algidhex, kidhex);
|
||||
fprintf (stderr, "HDU ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi);
|
||||
//fprintf (stderr, "ALG ID: 0x%X KEY ID: 0x%X MI: 0x%016X%02X\n", algidhex, kidhex, mihex1, mihex2);
|
||||
}
|
||||
|
||||
if (opts->p25enc == 1 && opts->payload == 0)
|
||||
{
|
||||
algidhex = strtol (algid, NULL, 2);
|
||||
|
||||
@@ -521,7 +521,8 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
||||
kid[15] = hex_data[ 0][5] + '0';
|
||||
|
||||
//if (state->carrier == 1 && state->errs2 == 0) //only update when carrier is present, and no errors??
|
||||
if (state->carrier == 1)
|
||||
if (state->carrier == 1 && state->errs == 0) //only update when carrier is present, and no errors??
|
||||
//if (state->carrier == 1)
|
||||
{
|
||||
/*
|
||||
for (short i = 0; i < 64; i++)
|
||||
@@ -547,10 +548,11 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
}
|
||||
|
||||
if (opts->payload == 1)
|
||||
//if (opts->payload == 1)
|
||||
if (opts->payload == 1 && state->errs == 0)
|
||||
{
|
||||
//fprintf (stderr, "ALG ID: 0x%X KEY ID: 0x%X\n", algidhex, kidhex);
|
||||
fprintf (stderr, "ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi);
|
||||
fprintf (stderr, "LDU2 ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi);
|
||||
//fprintf (stderr, "ALG ID: 0x%X KEY ID: 0x%X MI: 0x%016X%02X\n", algidhex, kidhex, mihex1, mihex2);
|
||||
}
|
||||
//if (opts->p25enc == 1 && opts->payload == 0)
|
||||
|
||||
Reference in New Issue
Block a user