stop bluetooth advertisment on connection to save more energy
This commit is contained in:
parent
7494b18d71
commit
ac8737bc42
@ -58,9 +58,11 @@ func main() {
|
||||
adapter.SetConnectHandler(func(device bluetooth.Device, connected bool) {
|
||||
if connected {
|
||||
isBleConnected = true
|
||||
adv.Stop()
|
||||
} else {
|
||||
isBleConnected = false
|
||||
isCapturing = false
|
||||
adv.Start()
|
||||
}
|
||||
})
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user