altos: ao_radio_recv needs byte count *including* rssi and status
authorKeith Packard <keithp@keithp.com>
Tue, 28 Jun 2011 08:01:08 +0000 (01:01 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 28 Jun 2011 08:01:08 +0000 (01:01 -0700)
That's two more than the actual packet length.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao_monitor.c

index 1d083c5..e5e9159 100644 (file)
@@ -190,9 +190,9 @@ ao_monitor(void)
                default:
                        if (ao_monitoring > AO_MAX_TELEMETRY)
                                ao_monitoring = AO_MAX_TELEMETRY;
-                       if (!ao_radio_recv(&recv_raw, ao_monitoring))
+                       if (!ao_radio_recv(&recv_raw, ao_monitoring + 2))
                                continue;
-                       printf ("TELEM %02x", ao_monitoring+2);
+                       printf ("TELEM %02x", ao_monitoring + 2);
                        sum = 0x5a;
                        for (state = 0; state < ao_monitoring + 2; state++) {
                                byte = recv_raw.packet[state];