examples: discover should only wait on startup on baremetal, since macOS does not like that
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
a2662956b8
commit
9daf7205ab
3 changed files with 10 additions and 3 deletions
|
@ -17,15 +17,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"tinygo.org/x/bluetooth"
|
||||
)
|
||||
|
||||
var adapter = bluetooth.DefaultAdapter
|
||||
|
||||
func main() {
|
||||
time.Sleep(3 * time.Second)
|
||||
wait()
|
||||
|
||||
println("enabling")
|
||||
|
||||
|
|
|
@ -13,6 +13,11 @@ func connectAddress() string {
|
|||
return deviceAddress
|
||||
}
|
||||
|
||||
// wait on baremetal, proceed immediately on desktop OS.
|
||||
func wait() {
|
||||
time.Sleep(3 * time.Second)
|
||||
}
|
||||
|
||||
// done just blocks forever, allows USB CDC reset for flashing new software.
|
||||
func done() {
|
||||
println("Done.")
|
||||
|
|
|
@ -16,6 +16,10 @@ func connectAddress() string {
|
|||
return address
|
||||
}
|
||||
|
||||
// wait on baremetal, proceed immediately on desktop OS.
|
||||
func wait() {
|
||||
}
|
||||
|
||||
// done just prints a message and allows program to exit.
|
||||
func done() {
|
||||
println("Done.")
|
||||
|
|
Loading…
Reference in a new issue