Replace the 'S' (which marks the field showing sats in view) with
either 'L' or 'U' to tell the user whether the GPS receiver is locked
or unlocked.
This also removes the colons in the comment field to shorten it. This
makes it fit on one line of my FT1D display.
Signed-off-by: Keith Packard <keithp@keithp.com>
return n;
}
+static char ao_gps_locked(void)
+{
+ if (ao_gps_data.flags & AO_GPS_VALID)
+ return 'L';
+ else
+ return 'U';
+}
+
static int tncComment(uint8_t *buf)
{
#if HAS_ADC
int16_t main = ao_ignite_decivolt(AO_SENSE_MAIN(&packet));
return sprintf((char *) buf,
- "S: %d B:%d.%d A:%d.%d M:%d.%d",
+ "%c%d B%d.%d A%d.%d M%d.%d",
+ ao_gps_locked(),
ao_num_sats(),
battery/10,
battery % 10,
main%10);
#else
return sprintf((char *) buf,
- "S: %d", ao_num_sats());
+ "%c%d",
+ ao_gps_locked(),
+ ao_num_sats());
#endif
}