sensors and xbox360 controllers
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Just added sensors.library-support to my framework, especially to support xbox360 controllers.

    Works, but either I'm drunk or the two analogue sticks of the gamepad report their axis data the wrong way:

    if I do a vertical up/down movement I get a message with a SENSORS_HIDInput_EW_Value instead of SENSORS_HIDInput_NS_Value and for left/right I get NS instead of EW.
    So essentially, if I push up I get left, for down I get right, for left I get up and for right I get down.

    The digital-direction-hat of the gamepad works as it should.

    Is there some gamepad configuration inside MorphOS that I don't know of and that may be the reason for this (like some calibration settings that's off, mapping vertical to horizontal and the other way around)?
  • »27.12.13 - 10:50
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3022 from 2003/3/5
    From: Canada
    Which controller is this exactly? Is it the wired one? I only have the wireless pc adapter and wireless controllers so the wired support was done without actual testing. It's possible that I mixed some entries up.
  • »27.12.13 - 14:10
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    It's a wireless which was delivered with the console, plugged it in through that "Xbox 360 Wireless Adapter für Windows" from MS.
  • »27.12.13 - 14:16
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3022 from 2003/3/5
    From: Canada
    OK, that's pretty odd then :) I'll try to upload my test app for the driver soon or push a SDK update out in a few days...
  • »27.12.13 - 14:28
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    @jacadcaps
    Were you able to reproduce this?
    If so, what would be your recomendation how I shall handle this?
    If it is a bug, shall I add some "if morphos_version < xyz then toggle" thingy to my code?

    Thanks,
    Daniel
  • »07.01.14 - 09:17
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3022 from 2003/3/5
    From: Canada
    I wasn't able to check the pad yet, but here's the source of my own testapp:

    http://dreamolers.binaryriot.org/priv/waitandhid.c

    Please use this to verify that your code is OK.
  • »07.01.14 - 10:55
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Thanks! Turns out my code is okay and the analogue sticks do indeed return EW for up/down and NS for left/right (the POV stick is okay).

    Look at the screen-shot. It was made when I pushed all sticks UP...
    Okay, so it obviously is a bug in the sensors.library or the xbox-controller-driver. How shall I handle this for now?

    sensors_bug.png

    [ Editiert durch Daytona675x 07.01.2014 - 12:01 ]
  • »07.01.14 - 12:00
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3022 from 2003/3/5
    From: Canada
    Must be something in the controller. I'll try to check with my pads today and find a solution for this.
  • »07.01.14 - 12:18
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Thanks!
    It's a standard MS xbox360 wireless controller though. And the USB-adapter is the official one from MS too.
    Also, I'm not the only one who suffers from this effect. At least one guy (the one who asked me to implement sensors-support for his xbox-controller ;-) ) experiences this too.
  • »07.01.14 - 12:30
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3022 from 2003/3/5
    From: Canada
    Check your PM for a fixed driver and let me know if this is OK now. I've bumped it so it'll be easy to check it by doing OpenLibrary on the driver and checking the version in the Library structure.
  • »07.01.14 - 20:51
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Yo, now it works as it should :-)
    So all versions prior to this were buggy?
  • »08.01.14 - 08:05
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3022 from 2003/3/5
    From: Canada
    Quote:

    Daytona675x wrote:
    Yo, now it works as it should :-)
    So all versions prior to this were buggy?


    Seems so :(
  • »08.01.14 - 08:56
    Profile Visit Website
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Too much time in the cold, Jacek?
    "Never attribute to malice what can more readily explained by incompetence"
  • »08.01.14 - 21:16
    Profile