examples: correct all usage of ps3 joystick reads, which are now int instead of int16

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2024-06-14 11:55:14 +02:00
parent bfba1ab9e0
commit d7794518a1
6 changed files with 24 additions and 24 deletions

View File

@ -50,22 +50,22 @@ func main() {
})
_ = stick.On(joystick.LeftX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftX.Store(val)
})
_ = stick.On(joystick.LeftY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftY.Store(val)
})
_ = stick.On(joystick.RightX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightX.Store(val)
})
_ = stick.On(joystick.RightY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightY.Store(val)
})

View File

@ -73,22 +73,22 @@ func main() {
})
_ = stick.On(joystick.LeftX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftX.Store(val)
})
_ = stick.On(joystick.LeftY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftY.Store(val)
})
_ = stick.On(joystick.RightX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightX.Store(val)
})
_ = stick.On(joystick.RightY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightY.Store(val)
})

View File

@ -139,22 +139,22 @@ func main() {
}
})
_ = stick.On(joystick.LeftX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftX.Store(val)
})
_ = stick.On(joystick.LeftY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftY.Store(val)
})
_ = stick.On(joystick.RightX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightX.Store(val)
})
_ = stick.On(joystick.RightY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightY.Store(val)
})

View File

@ -104,22 +104,22 @@ func main() {
})
_ = stick.On(joystick.LeftX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftX.Store(val)
})
_ = stick.On(joystick.LeftY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftY.Store(val)
})
_ = stick.On(joystick.RightX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightX.Store(val)
})
_ = stick.On(joystick.RightY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightY.Store(val)
})

View File

@ -93,22 +93,22 @@ func main() {
})
_ = stick.On(joystick.LeftX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftX.Store(val)
})
_ = stick.On(joystick.LeftY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftY.Store(val)
})
_ = stick.On(joystick.RightX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightX.Store(val)
})
_ = stick.On(joystick.RightY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightY.Store(val)
})

View File

@ -89,22 +89,22 @@ func main() {
})
_ = stick.On(joystick.LeftX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftX.Store(val)
})
_ = stick.On(joystick.LeftY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
leftY.Store(val)
})
_ = stick.On(joystick.RightX, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightX.Store(val)
})
_ = stick.On(joystick.RightY, func(data interface{}) {
val := float64(data.(int16))
val := float64(data.(int))
rightY.Store(val)
})