- printf ("SERIAL %3d RSSI %3d STATUS %02x STATE %s ",
- recv.telemetry.addr, recv.rssi, 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\n",
- recv.telemetry.adc.tick,
- recv.telemetry.adc.accel,
- recv.telemetry.adc.pres,
- recv.telemetry.adc.temp,
- recv.telemetry.adc.v_batt,
- recv.telemetry.adc.sense_d,
- recv.telemetry.adc.sense_m);
- ao_gps_print(&recv.telemetry.gps);
+ if (recv.status & PKT_APPEND_STATUS_1_CRC_OK) {
+ printf ("CALL %s SERIAL %3d RSSI %4d STATUS %02x STATE %7s ",
+ callsign,
+ recv.telemetry.addr,
+ (int) recv.rssi - 74, recv.status,
+ ao_state_names[state]);
+ printf("%5u a: %5d p: %5d t: %5d v: %5d d: %5d m: %5d fa: %5d ga: %d fv: %7ld fp: %5d gp: %5d ",
+ recv.telemetry.adc.tick,
+ recv.telemetry.adc.accel,
+ recv.telemetry.adc.pres,
+ recv.telemetry.adc.temp,
+ recv.telemetry.adc.v_batt,
+ recv.telemetry.adc.sense_d,
+ recv.telemetry.adc.sense_m,
+ recv.telemetry.flight_accel,
+ recv.telemetry.ground_accel,
+ recv.telemetry.flight_vel,
+ recv.telemetry.flight_pres,
+ recv.telemetry.ground_pres);
+ ao_gps_print(&recv.telemetry.gps);
+ ao_rssi_set((int) recv.rssi - 74);
+ } else {
+ printf("CRC INVALID RSSI %3d\n", (int) recv.rssi - 74);
+ }