Skip to content

Conversation

@zopieux
Copy link

@zopieux zopieux commented Nov 27, 2025

Tested on a nrf52840 board.

Without this patch, calling

Scan()
(sleep)
StopScan()
err := Scan()

returns an error on the second Scan() because the previous scan wasn't actually stopped, since the native call is missing.

With this patch, the above succeeds and the scan starts returning results, as usual.

I'm really not sure why there was a TODO rather than this simple function call. The TODO doesn't provide a rationale.

@deadprogram
Copy link
Member

I'm really not sure why there was a TODO rather than this simple function call. The TODO doesn't provide a rationale.

Nor am I, but glad to have the correct implementation. Tested on one of my nrf52840 boards and does appear to work as expected and does not cause any unexpected side effects.

Thanks for the PR @zopieux now merging.

@deadprogram deadprogram merged commit 6b07e06 into tinygo-org:dev Dec 6, 2025
4 checks passed
@zopieux zopieux deleted the scan-stop branch December 6, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants