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,10 +607,12 @@ transmit(unsigned short transmit_len)
while(RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + ONOFF_TIME));
}
if(send_on_cca) {
if(channel_clear() == CC2538_RF_CCA_BUSY) {
RIMESTATS_ADD(contentiondrop);
return RADIO_TX_COLLISION;
}
}
/*
* prepare() double checked that TX_ACTIVE is low. If SFD is high we are