Ejemplo n.º 1
0
func TestDiscovery(t *testing.T) {
	_, err := gaze.USBTrackers()

	if err != nil {
		t.Error(err)
	}
}
Ejemplo n.º 2
0
func main() {
	trackerinfos, err := gaze.USBTrackers()
	if err != nil {
		log.Println("Error @ main#getTrackers :", err)
		return
	}

	for i, trackerinfo := range trackerinfos {
		tracker, err := gaze.EyeTrackerFromURL("tet-usb://" + trackerinfo.SerialNumber())
		if err != nil {
			log.Println("Error @ main#createTracker", i, ":", err)
			continue
		}
		tracker.Connect()
		err = tracker.SetDisplayArea(520, 225, math.Pi/16)
		if err != nil {
			log.Println("Error @ main#SetDisplayArea", i, ":", err)
			return
		}
		log.Println("Set DisplayArea of", "tet-usb://"+trackerinfo.SerialNumber())
	}
}