Commit 188e2b8b authored by simon's avatar simon
Browse files

comment

parent 028e2aec
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -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: [![GoDoc](https://godoc.org/github.com/splace/joysticks?status.svg)](https://godoc.org/github.com/splace/joysticks)

@@ -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.
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −5
Original line number Diff line number Diff line
@@ -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")
		}
	}
@@ -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
*/