mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
M17: Tweaks to Meta Decode Conditions;
This commit is contained in:
13
src/m17.c
13
src/m17.c
@@ -187,8 +187,13 @@ void M17decodeLSF(dsd_state * state)
|
|||||||
for (i = 0; i < 14; i++)
|
for (i = 0; i < 14; i++)
|
||||||
state->m17_meta[i] = (uint8_t)ConvertBitIntoBytes(&state->m17_lsf[(i*8)+112], 8);
|
state->m17_meta[i] = (uint8_t)ConvertBitIntoBytes(&state->m17_lsf[(i*8)+112], 8);
|
||||||
|
|
||||||
//Decode Meta Data
|
//using meta_sum in case some byte fields, particularly meta[0], are zero
|
||||||
if (lsf_et == 0 && state->m17_meta[0] != 0) //not sure if this applies universally, or just to text data byte 0 for null data
|
uint32_t meta_sum = 0;
|
||||||
|
for (i = 0; i < 14; i++)
|
||||||
|
meta_sum += state->m17_meta[i];
|
||||||
|
|
||||||
|
//Decode Meta Data when not ENC (if meta field is populated with something)
|
||||||
|
if (lsf_et == 0 && meta_sum != 0)
|
||||||
{
|
{
|
||||||
uint8_t meta[15]; meta[0] = lsf_es + 90; //add identifier for pkt decoder
|
uint8_t meta[15]; meta[0] = lsf_es + 90; //add identifier for pkt decoder
|
||||||
for (i = 0; i < 14; i++) meta[i+1] = state->m17_meta[i];
|
for (i = 0; i < 14; i++) meta[i+1] = state->m17_meta[i];
|
||||||
@@ -197,6 +202,10 @@ void M17decodeLSF(dsd_state * state)
|
|||||||
decodeM17PKT (NULL, state, meta, 15); //decode META
|
decodeM17PKT (NULL, state, meta, 15); //decode META
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if no Meta (debug)
|
||||||
|
// if (lsf_et == 0 && meta_sum == 0)
|
||||||
|
// fprintf (stderr, " Meta Null; ");
|
||||||
|
|
||||||
if (lsf_et == 2)
|
if (lsf_et == 2)
|
||||||
{
|
{
|
||||||
fprintf (stderr, " IV: ");
|
fprintf (stderr, " IV: ");
|
||||||
|
|||||||
Reference in New Issue
Block a user