Skip to content

Commit d6ae09d

Browse files
polldogiulcioffi
authored andcommitted
[WIP] Fix inconsistent stop scan - to be revisioned
1 parent 70b1b47 commit d6ae09d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: src/utility/GAP.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ void GAPClass::stopAdvertise()
8484

8585
int GAPClass::scan(bool withDuplicates)
8686
{
87-
HCI.leSetScanEnable(false, true);
87+
//HCI.leSetScanEnable(false, true);
88+
stopScan();
8889

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

130131
void GAPClass::stopScan()
131132
{
132-
HCI.leSetScanEnable(false, false);
133+
//HCI.leSetScanEnable(false, false);
134+
HCI.leSetScanEnable(false, true);
133135

134136
_scanning = false;
135137

0 commit comments

Comments
 (0)