i broke, i fixed

This commit is contained in:
freqyXin 2021-04-14 18:44:09 -07:00
parent 92ae207001
commit 89b9371e82

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