set rxpk_done when it's expectedFrame.
@@ -233,13 +233,12 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {
// toggle led if the frame is expected
if (expectedFrame){
+ // indicate I just received a packet from bsp_radio_tx mote
+ app_vars.rxpk_done = 1;
leds_debug_toggle();
}
- // indicate I just received a packet from bsp_radio_tx mote
- app_vars.rxpk_done = 1;
-
// keep listening (needed for at86rf215 radio)
radio_rxEnable();
radio_rxNow();
