Loading README.md +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ Example: prints event info for pressing button #1 or moving hat#1.(with 10sec ti case <-b1press: fmt.Println("button #1 pressed") case h := <-h1move: hpos:=h.(HatPositionEvent) hpos:=h.(CoordsEvent) fmt.Println("hat #1 moved too:", hpos.X,hpos.Y) } } Loading examples/basic/basic.go +2 −2 Original line number Diff line number Diff line Loading @@ -29,10 +29,10 @@ func main() { case <-b2press: fmt.Println("button #2 pressed") coords := make([]float32, 2) device.ReadHatPosition(1,coords) device.HatCoords(1,coords) fmt.Println("current hat #1 position:",coords) case h := <-h1move: hpos:=h.(HatPositionEvent) hpos:=h.(CoordsEvent) fmt.Println("hat #1 moved too:", hpos.X,hpos.Y) } } Loading Loading
README.md +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ Example: prints event info for pressing button #1 or moving hat#1.(with 10sec ti case <-b1press: fmt.Println("button #1 pressed") case h := <-h1move: hpos:=h.(HatPositionEvent) hpos:=h.(CoordsEvent) fmt.Println("hat #1 moved too:", hpos.X,hpos.Y) } } Loading
examples/basic/basic.go +2 −2 Original line number Diff line number Diff line Loading @@ -29,10 +29,10 @@ func main() { case <-b2press: fmt.Println("button #2 pressed") coords := make([]float32, 2) device.ReadHatPosition(1,coords) device.HatCoords(1,coords) fmt.Println("current hat #1 position:",coords) case h := <-h1move: hpos:=h.(HatPositionEvent) hpos:=h.(CoordsEvent) fmt.Println("hat #1 moved too:", hpos.X,hpos.Y) } } Loading