diff options
author | Keith Packard <keithp@keithp.com> | 2011-06-28 01:01:08 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-06-28 01:01:08 -0700 |
commit | cb239b7161feea8646425b1f5788c3c82ae24321 (patch) | |
tree | 807ed20f396c66d3fb8aac9b273b3f7272a09967 | |
parent | 336224a08327cadc95f6e5b564a4ddc64aaad8f8 (diff) |
altos: ao_radio_recv needs byte count *including* rssi and status
That's two more than the actual packet length.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/ao_monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ao_monitor.c b/src/ao_monitor.c index 1d083c59..e5e9159f 100644 --- a/src/ao_monitor.c +++ b/src/ao_monitor.c @@ -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]; |