1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/nimble/autoadv: fix flag comparisons

This commit is contained in:
Kaspar Schleiser 2023-02-02 15:18:25 +01:00
parent b0fc3e5814
commit ebc643ffb0

View File

@ -192,11 +192,11 @@ void nimble_autoadv_start(ble_addr_t *addr)
if (addr != NULL) { if (addr != NULL) {
mode = BLE_GAP_CONN_MODE_DIR; mode = BLE_GAP_CONN_MODE_DIR;
} }
else if (_cfg.flags && NIMBLE_AUTOADV_FLAG_CONNECTABLE) { else if (_cfg.flags & NIMBLE_AUTOADV_FLAG_CONNECTABLE) {
mode = BLE_GAP_CONN_MODE_UND; mode = BLE_GAP_CONN_MODE_UND;
} }
uint8_t disc = (_cfg.flags && NIMBLE_AUTOADV_FLAG_SCANNABLE) ? BLE_GAP_CONN_MODE_DIR uint8_t disc = (_cfg.flags & NIMBLE_AUTOADV_FLAG_SCANNABLE) ? BLE_GAP_CONN_MODE_DIR
: BLE_GAP_CONN_MODE_UND; : BLE_GAP_CONN_MODE_UND;
struct ble_gap_adv_params advp = { struct ble_gap_adv_params advp = {
.conn_mode = mode, .conn_mode = mode,
.disc_mode = disc, .disc_mode = disc,