add send_on_cca if query

This commit is contained in:
thomas-ha 2016-04-07 15:17:44 +02:00
parent a7b43de535
commit 9ac859a2af

View file

@ -607,9 +607,11 @@ transmit(unsigned short transmit_len)
while(RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + ONOFF_TIME)); while(RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + ONOFF_TIME));
} }
if(channel_clear() == CC2538_RF_CCA_BUSY) { if(send_on_cca) {
RIMESTATS_ADD(contentiondrop); if(channel_clear() == CC2538_RF_CCA_BUSY) {
return RADIO_TX_COLLISION; RIMESTATS_ADD(contentiondrop);
return RADIO_TX_COLLISION;
}
} }
/* /*