From: Keith Packard Date: Sun, 26 Apr 2009 08:36:53 +0000 (-0700) Subject: Clean up monitor output a bit X-Git-Tag: 0.1~6 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=2e737ad00cad5d893b252d8aa9dbff3d9b800731 Clean up monitor output a bit --- diff --git a/ao_gps_print.c b/ao_gps_print.c index de4a79c1..8cadd31f 100644 --- a/ao_gps_print.c +++ b/ao_gps_print.c @@ -20,8 +20,10 @@ void ao_gps_print(__xdata struct ao_gps_data *gps_data) __reentrant { + printf("GPS %2d sat", + (gps_data->flags & AO_GPS_NUM_SAT_MASK) >> AO_GPS_NUM_SAT_SHIFT);; if (gps_data->flags & AO_GPS_VALID) { - printf("GPS %2d:%02d:%02d %2d°%2d.%04d'%c %2d°%2d.%04d'%c %5dm %2d sat\n", + printf(" %2d:%02d:%02d %2d°%2d.%04d'%c %2d°%2d.%04d'%c %5dm\n", gps_data->hour, gps_data->minute, gps_data->second, @@ -38,8 +40,7 @@ ao_gps_print(__xdata struct ao_gps_data *gps_data) __reentrant gps_data->altitude, (gps_data->flags & AO_GPS_NUM_SAT_MASK) >> AO_GPS_NUM_SAT_SHIFT); } else { - printf("GPS %2d sat\n", - (gps_data->flags & AO_GPS_NUM_SAT_MASK) >> AO_GPS_NUM_SAT_SHIFT);; + printf(" unlocked\n"); } } diff --git a/ao_monitor.c b/ao_monitor.c index d62f69da..eee66fa2 100644 --- a/ao_monitor.c +++ b/ao_monitor.c @@ -40,14 +40,14 @@ ao_monitor(void) memcpy(callsign, recv.telemetry.callsign, AO_MAX_CALLSIGN); if (state > ao_flight_invalid) state = ao_flight_invalid; - printf ("CALL %s SERIAL %3d RSSI %3d STATUS %02x STATE %s ", + printf ("CALL %s SERIAL %3d RSSI %3d STATUS %02x STATE %7s ", callsign, recv.telemetry.addr, (int) recv.rssi - 74, recv.status, ao_state_names[state]); if (!(recv.status & PKT_APPEND_STATUS_1_CRC_OK)) printf("CRC INVALID "); - printf("%5u a: %d p: %d t: %d v: %d d: %d m: %d ", + printf("%5u a: %5d p: %5d t: %5d v: %5d d: %5d m: %5d ", recv.telemetry.adc.tick, recv.telemetry.adc.accel, recv.telemetry.adc.pres,