added adapter MAC output todo note
This commit is contained in:
parent
939f0337b4
commit
07fa606cd8
@ -20,6 +20,9 @@ func Scanners() {
|
|||||||
// Enable BLE interface.
|
// Enable BLE interface.
|
||||||
dust.Must("enable BLE stack", projVars.ScanAdapter.Enable())
|
dust.Must("enable BLE stack", projVars.ScanAdapter.Enable())
|
||||||
|
|
||||||
|
//TODO: Add device adapter MAC output
|
||||||
|
//println(bluetooth.Addresser.String())
|
||||||
|
|
||||||
//TODO: only scan a device once, skip if its in the map
|
//TODO: only scan a device once, skip if its in the map
|
||||||
// Start scanning.
|
// Start scanning.
|
||||||
println("scanning...")
|
println("scanning...")
|
||||||
@ -27,7 +30,7 @@ func Scanners() {
|
|||||||
//results := new(bluetooth.ScanResult)
|
//results := new(bluetooth.ScanResult)
|
||||||
|
|
||||||
projVars.ScanAdapter.Scan(func(scanAdapter *bluetooth.Adapter, device bluetooth.ScanResult) {
|
projVars.ScanAdapter.Scan(func(scanAdapter *bluetooth.Adapter, device bluetooth.ScanResult) {
|
||||||
|
|
||||||
if device.LocalName() != projVars.ScanList[device.Address.String()] {
|
if device.LocalName() != projVars.ScanList[device.Address.String()] {
|
||||||
color.Cyan("found device:")
|
color.Cyan("found device:")
|
||||||
println(device.Address.String(), device.RSSI, device.LocalName())
|
println(device.Address.String(), device.RSSI, device.LocalName())
|
||||||
|
Loading…
Reference in New Issue
Block a user