Loading joysticks_linux.go +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ type event interface { type HatChangeEvent struct { time time.Duration x, y float32 X,Y float32 } func (b HatChangeEvent) Moment() time.Duration { Loading joysticks_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ func TestJoysticksCapture(t *testing.T) { case <-events[1]: play(NewSound(NewTone(f, float64(x)), time.Second/3)) case h := <-events[2]: x = h.(HatChangeEvent).x/2 + .5 f = time.Duration(100*math.Pow(2, float64(h.(HatChangeEvent).y))) * time.Second / 44000 x = h.(HatChangeEvent).X/2 + .5 f = time.Duration(100*math.Pow(2, float64(h.(HatChangeEvent).Y))) * time.Second / 44000 } } } Loading Loading
joysticks_linux.go +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ type event interface { type HatChangeEvent struct { time time.Duration x, y float32 X,Y float32 } func (b HatChangeEvent) Moment() time.Duration { Loading
joysticks_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ func TestJoysticksCapture(t *testing.T) { case <-events[1]: play(NewSound(NewTone(f, float64(x)), time.Second/3)) case h := <-events[2]: x = h.(HatChangeEvent).x/2 + .5 f = time.Duration(100*math.Pow(2, float64(h.(HatChangeEvent).y))) * time.Second / 44000 x = h.(HatChangeEvent).X/2 + .5 f = time.Duration(100*math.Pow(2, float64(h.(HatChangeEvent).Y))) * time.Second / 44000 } } } Loading