Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f954cb0

Browse files
polldogiulcioffi
authored andcommitted
[WIP] Fix inconsistent stop scan - to be revisioned
1 parent 3803e5f commit f954cb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/utility/GAP.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ void GAPClass::stopAdvertise()
167167

168168
int GAPClass::scan(bool withDuplicates)
169169
{
170-
HCI.leSetScanEnable(false, true);
170+
//HCI.leSetScanEnable(false, true);
171+
stopScan();
171172

172173
// active scan, 10 ms scan interval (N * 0.625), 10 ms scan window (N * 0.625), public own address type, no filter
173174
if (HCI.leSetScanParameters(0x01, 0x0010, 0x0010, 0x00, 0x00) != 0) {
@@ -212,7 +213,8 @@ int GAPClass::scanForAddress(String address, bool withDuplicates)
212213

213214
void GAPClass::stopScan()
214215
{
215-
HCI.leSetScanEnable(false, false);
216+
//HCI.leSetScanEnable(false, false);
217+
HCI.leSetScanEnable(false, true);
216218

217219
_scanning = false;
218220

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /