Loading README.md +1 −16 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ uses Linux kernel 'input' interface, available on a wide range of linux devices, uses go channels to pipe around events, for flexibility and multi-threading. implements many high-level UI abstractions directly, to enable commonality between projects.(see below) implements many high-level UI abstractions directly, to enable commonality between projects.(see On???() HID methods in docs) Overview/docs: [](https://godoc.org/github.com/splace/joysticks) Loading Loading @@ -54,21 +54,6 @@ Example: prints event info for pressing button #1 or moving hat#1.(with 10sec ti fmt.Println("Shutting down due to timeout.") } event types: buttonChange buttonClose buttonOpen buttonLongPress buttonDoublePress hatChange hatPanX hatPanY hatPosition hatAngle hatRadius hatCentered hatEdge Note: "jstest-gtk" - system wide mapping and calibration for joysticks. Loading joysticks.go +2 −2 Original line number Diff line number Diff line Loading @@ -317,14 +317,14 @@ func (d HID) OnPanY(hat uint8) chan Event { return c } // hat axis-X moved event channel. // hat axis-X speed changed event channel. func (d HID) OnSpeedX(hat uint8) chan Event { c := make(chan Event) d.Events[eventSignature{hatVelocityX, hat}] = c return c } // hat axis-Y moved event channel. // hat axis-Y speed changed event channel. func (d HID) OnSpeedY(hat uint8) chan Event { c := make(chan Event) d.Events[eventSignature{hatVelocityY, hat}] = c Loading joysticks_test.go +2 −5 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ func TestHIDsAdvanced(t *testing.T) { fmt.Printf("hat 2 Y moved %+v\n", h) case h := <-h6: fmt.Println("hat 1 edged", h.(AngleEvent).Angle) case h<-h7: case <-h7: fmt.Println("hat 1 centered") } } Loading Loading @@ -134,8 +134,5 @@ func play(s Sound) { } } /* Hal3 Mon 24 Apr 17:08:32 BST 2017 go version go1.6.2 linux/amd64 FAIL _/home/simon/Dropbox/github/working/joysticks [build failed] Mon 24 Apr 17:08:32 BST 2017 */ Loading
README.md +1 −16 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ uses Linux kernel 'input' interface, available on a wide range of linux devices, uses go channels to pipe around events, for flexibility and multi-threading. implements many high-level UI abstractions directly, to enable commonality between projects.(see below) implements many high-level UI abstractions directly, to enable commonality between projects.(see On???() HID methods in docs) Overview/docs: [](https://godoc.org/github.com/splace/joysticks) Loading Loading @@ -54,21 +54,6 @@ Example: prints event info for pressing button #1 or moving hat#1.(with 10sec ti fmt.Println("Shutting down due to timeout.") } event types: buttonChange buttonClose buttonOpen buttonLongPress buttonDoublePress hatChange hatPanX hatPanY hatPosition hatAngle hatRadius hatCentered hatEdge Note: "jstest-gtk" - system wide mapping and calibration for joysticks. Loading
joysticks.go +2 −2 Original line number Diff line number Diff line Loading @@ -317,14 +317,14 @@ func (d HID) OnPanY(hat uint8) chan Event { return c } // hat axis-X moved event channel. // hat axis-X speed changed event channel. func (d HID) OnSpeedX(hat uint8) chan Event { c := make(chan Event) d.Events[eventSignature{hatVelocityX, hat}] = c return c } // hat axis-Y moved event channel. // hat axis-Y speed changed event channel. func (d HID) OnSpeedY(hat uint8) chan Event { c := make(chan Event) d.Events[eventSignature{hatVelocityY, hat}] = c Loading
joysticks_test.go +2 −5 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ func TestHIDsAdvanced(t *testing.T) { fmt.Printf("hat 2 Y moved %+v\n", h) case h := <-h6: fmt.Println("hat 1 edged", h.(AngleEvent).Angle) case h<-h7: case <-h7: fmt.Println("hat 1 centered") } } Loading Loading @@ -134,8 +134,5 @@ func play(s Sound) { } } /* Hal3 Mon 24 Apr 17:08:32 BST 2017 go version go1.6.2 linux/amd64 FAIL _/home/simon/Dropbox/github/working/joysticks [build failed] Mon 24 Apr 17:08:32 BST 2017 */