aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/experimental/main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/experimental/main.go b/cmd/experimental/main.go
index 991d910..d70c512 100644
--- a/cmd/experimental/main.go
+++ b/cmd/experimental/main.go
@@ -95,6 +95,15 @@ func onConnect(p gatt.Peripheral, err error) {
ss.Set(500, 2500)
b := anki.Encode(ss)
p.WriteCharacteristic(c, b, true)
+
+ go func(c *gatt.Characteristic) {
+ time.Sleep(5 * time.Second)
+ log.Println("Change lane")
+ cl := &anki.VehicleMsgChangeLane{}
+ cl.Set(100, 100, 0.0)
+ b = anki.Encode(cl)
+ p.WriteCharacteristic(c, b, true)
+ }(c)
}
}
}