altos/cc1111: Fetch RSSI for TeleFire from correct byte
authorKeith Packard <keithp@keithp.com>
Thu, 20 Jun 2013 05:42:58 +0000 (22:42 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 20 Jun 2013 05:42:58 +0000 (22:42 -0700)
Reading the status byte doesn't provide very useful RSSI info

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

index 88b8f686e21c09f1c8193076e0f12d5bf4cc2c0c..190647ce0dbe432f6a0b4ee5f8428b686110cf69 100644 (file)
@@ -374,7 +374,7 @@ ao_radio_recv(__xdata void *packet, uint8_t size, uint8_t timeout) __reentrant
        }
 #if NEED_RADIO_RSSI
        else
        }
 #if NEED_RADIO_RSSI
        else
-               ao_radio_rssi = AO_RSSI_FROM_RADIO(((uint8_t *)packet)[size - 1]);
+               ao_radio_rssi = AO_RSSI_FROM_RADIO(((uint8_t *)packet)[size - 2]);
 #endif
        ao_radio_put();
        return ao_radio_dma_done;
 #endif
        ao_radio_put();
        return ao_radio_dma_done;