File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
features/FEATURE_BLE/source/generic Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -591,6 +591,7 @@ ble_error_t GenericGap::stopScan()
591
591
set_random_address_rotation (false );
592
592
593
593
_scan_timeout.detach ();
594
+
594
595
return BLE_ERROR_NONE;
595
596
}
596
597
@@ -1485,7 +1486,7 @@ void GenericGap::on_scan_timeout()
1485
1486
}
1486
1487
1487
1488
/* if timeout happened on a 4.2 chip we need to stop the scan manually */
1488
- if (is_extended_advertising_available ()) {
1489
+ if (! is_extended_advertising_available ()) {
1489
1490
_pal_gap.scan_enable (false , false );
1490
1491
set_random_address_rotation (false );
1491
1492
}
@@ -2920,8 +2921,6 @@ ble_error_t GenericGap::startScan(
2920
2921
if (err) {
2921
2922
return err;
2922
2923
}
2923
-
2924
- _scan_enabled = true ;
2925
2924
} else {
2926
2925
if (period.value () != 0 ) {
2927
2926
return BLE_ERROR_INVALID_PARAM;
@@ -2936,8 +2935,6 @@ ble_error_t GenericGap::startScan(
2936
2935
return err;
2937
2936
}
2938
2937
2939
- _scan_enabled = true ;
2940
-
2941
2938
_scan_timeout.detach ();
2942
2939
if (duration.value ()) {
2943
2940
_scan_timeout.attach_us (
@@ -2947,6 +2944,8 @@ ble_error_t GenericGap::startScan(
2947
2944
}
2948
2945
}
2949
2946
2947
+ _scan_enabled = true ;
2948
+
2950
2949
return BLE_ERROR_NONE;
2951
2950
}
2952
2951
You can’t perform that action at this time.
0 commit comments