better everyday

This commit is contained in:
freqyXin 2021-04-14 14:20:58 -07:00
parent f5d232231e
commit 90275d18ea

@ -21,15 +21,22 @@ func Scanners() {
// Start scanning. // Start scanning.
println("scanning...") println("scanning...")
err := projVars.ScanAdapter.Scan(func(scanAdapter *bluetooth.Adapter, device bluetooth.ScanResult) { err := projVars.ScanAdapter.Scan(func(scanAdapter *bluetooth.Adapter, device bluetooth.ScanResult) {
color.Cyan("found device:") if projVars.ScanList[device.LocalName()] != "" {
println(device.Address.String(), device.RSSI, device.LocalName()) //could create a more
//color.Yellow("Device Already in Mapped")
} else {
//TODO: create localname for devices that dont broadcast one color.Cyan("found device:")
projVars.ScanList[device.LocalName()] = device.Address.String() println(device.Address.String(), device.RSSI, device.LocalName())
//fucking sanity check //TODO: create localname for devices that dont broadcast one
i := projVars.ScanList[device.LocalName()] projVars.ScanList[device.LocalName()] = device.Address.String()
color.Red(i)
//fucking sanity check
i := projVars.ScanList[device.LocalName()]
color.Red(i)
}
}) })
dust.Must("start scan", err) dust.Must("start scan", err)
} }