P25p1 -- Tweak APX(Moto) LCW GPS Output;

This commit is contained in:
lwvmobile
2023-10-28 17:30:09 -04:00
parent e6dd71f338
commit fb1abfbd26

View File

@@ -408,7 +408,6 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
//my earlier assumption that this was the same format as DMR Embedded GPS was incorrect //my earlier assumption that this was the same format as DMR Embedded GPS was incorrect
void apx_embedded_gps (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[]) void apx_embedded_gps (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
{ {
UNUSED(opts);
fprintf (stderr, "%s", KYEL); fprintf (stderr, "%s", KYEL);
fprintf (stderr, " LCW GPS:"); fprintf (stderr, " LCW GPS:");
@@ -417,7 +416,6 @@ void apx_embedded_gps (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
uint8_t res_a = lc_bits[1]; uint8_t res_a = lc_bits[1];
uint8_t res_b = (uint8_t)ConvertBitIntoBytes(&lc_bits[16], 7); uint8_t res_b = (uint8_t)ConvertBitIntoBytes(&lc_bits[16], 7);
uint8_t expired = lc_bits[23]; //this bit seems to indicate that the GPS coordinates are out of date or fresh uint8_t expired = lc_bits[23]; //this bit seems to indicate that the GPS coordinates are out of date or fresh
UNUSED2(res_a, res_b);
char deg_glyph[4]; char deg_glyph[4];
sprintf (deg_glyph, "%s", "°"); sprintf (deg_glyph, "%s", "°");
@@ -461,6 +459,8 @@ void apx_embedded_gps (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[])
fprintf (stderr, "Expired; "); fprintf (stderr, "Expired; ");
sprintf (valid, "%s", "Expired"); sprintf (valid, "%s", "Expired");
} }
else if (!expired)
fprintf (stderr, "Current; ");
if (res_a) if (res_a)
fprintf (stderr, "RES_A: %d; ", res_a); fprintf (stderr, "RES_A: %d; ", res_a);