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
@@ -1487,7 +1488,7 @@ void GenericGap::on_scan_timeout()
1487
1488
}
1488
1489
1489
1490
/* if timeout happened on a 4.2 chip we need to stop the scan manually */
1490
- if (is_extended_advertising_available ()) {
1491
+ if (! is_extended_advertising_available ()) {
1491
1492
_pal_gap.scan_enable (false , false );
1492
1493
set_random_address_rotation (false );
1493
1494
}
@@ -2983,8 +2984,6 @@ ble_error_t GenericGap::startScan(
2983
2984
if (err) {
2984
2985
return err;
2985
2986
}
2986
-
2987
- _scan_enabled = true ;
2988
2987
} else {
2989
2988
if (period.value () != 0 ) {
2990
2989
return BLE_ERROR_INVALID_PARAM;
@@ -2999,8 +2998,6 @@ ble_error_t GenericGap::startScan(
2999
2998
return err;
3000
2999
}
3001
3000
3002
- _scan_enabled = true ;
3003
-
3004
3001
_scan_timeout.detach ();
3005
3002
if (duration.value ()) {
3006
3003
_scan_timeout.attach_us (
@@ -3010,6 +3007,8 @@ ble_error_t GenericGap::startScan(
3010
3007
}
3011
3008
}
3012
3009
3010
+ _scan_enabled = true ;
3011
+
3013
3012
return BLE_ERROR_NONE;
3014
3013
}
3015
3014
You can’t perform that action at this time.
0 commit comments