[Debug] 2020/01/20 16:38:34 helloworld.go:24: OnStart: This is a debug message
[Debug] 2020/01/20 16:38:35 helloworld.go:49: OnConnect: battery.Quantity() 0
[Debug] 2020/01/20 16:38:35 helloworld.go:35: OnStart: rover.Available is true
[ERROR] 2020/01/20 16:38:35 helloworld.go:53: rover MoveCtrl error: errno: 50, errstr: send move control command is error
func (d *helloworld) OnStart() {
battery.Start()
cerebellum.Start()
err := rover.Start()
if err != nil {
log.Error.Println("rover start error:", err)
return
}
if rover.Available() {
log.Debug.Println("OnStart: rover.Available is true")
}
}
func (d *helloworld) OnConnect() {
quantity, err := battery.Quantity()
log.Debug.Println("OnConnect: battery.Quantity() " + fmt.Sprint(quantity) + " " + fmt.Sprint(err))
errd := rover.MoveCtrl(1000, 0)
if errd != nil {
log.Error.Println("rover MoveCtrl error:", errd)
}
}