mirror of https://github.com/ARMmbed/mbed-os.git
review fixes
parent
e1a8fb5a7a
commit
d9c919b7e1
|
|
@ -591,6 +591,7 @@ ble_error_t GenericGap::stopScan()
|
|||
set_random_address_rotation(false);
|
||||
|
||||
_scan_timeout.detach();
|
||||
|
||||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
|
@ -1487,7 +1488,7 @@ void GenericGap::on_scan_timeout()
|
|||
}
|
||||
|
||||
/* if timeout happened on a 4.2 chip we need to stop the scan manually */
|
||||
if (is_extended_advertising_available()) {
|
||||
if (!is_extended_advertising_available()) {
|
||||
_pal_gap.scan_enable(false, false);
|
||||
set_random_address_rotation(false);
|
||||
}
|
||||
|
|
@ -2983,8 +2984,6 @@ ble_error_t GenericGap::startScan(
|
|||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
_scan_enabled = true;
|
||||
} else {
|
||||
if (period.value() != 0) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
|
|
@ -2999,8 +2998,6 @@ ble_error_t GenericGap::startScan(
|
|||
return err;
|
||||
}
|
||||
|
||||
_scan_enabled = true;
|
||||
|
||||
_scan_timeout.detach();
|
||||
if (duration.value()) {
|
||||
_scan_timeout.attach_us(
|
||||
|
|
@ -3010,6 +3007,8 @@ ble_error_t GenericGap::startScan(
|
|||
}
|
||||
}
|
||||
|
||||
_scan_enabled = true;
|
||||
|
||||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue