This fixes an event handling issue in the cc26xx BLE driver. Currently, the rf_ble_beacon_process triggers the BLE beacon upon receiving any event, rather than verifying that the event timer has expired. This means that any PROCESS_BROADCAST (e.g. any sensor event) will fire the beacon. This commit adds logic to prevent this.
This commit is contained in:
parent
c9baf0cb57
commit
2a07dc0e0a
|
@ -256,7 +256,7 @@ PROCESS_THREAD(rf_ble_beacon_process, ev, data)
|
||||||
while(1) {
|
while(1) {
|
||||||
etimer_set(&ble_adv_et, beacond_config.interval);
|
etimer_set(&ble_adv_et, beacond_config.interval);
|
||||||
|
|
||||||
PROCESS_WAIT_EVENT();
|
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&ble_adv_et) || ev == PROCESS_EVENT_EXIT);
|
||||||
|
|
||||||
if(ev == PROCESS_EVENT_EXIT) {
|
if(ev == PROCESS_EVENT_EXIT) {
|
||||||
PROCESS_EXIT();
|
PROCESS_EXIT();
|
||||||
|
@ -374,7 +374,7 @@ PROCESS_THREAD(rf_ble_beacon_process, ev, data)
|
||||||
|
|
||||||
/* Wait unless this is the last burst */
|
/* Wait unless this is the last burst */
|
||||||
if(i < BLE_ADV_MESSAGES - 1) {
|
if(i < BLE_ADV_MESSAGES - 1) {
|
||||||
PROCESS_WAIT_EVENT();
|
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&ble_adv_et));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue