Sensors.lib problem
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Hi guys,

    I just tapped into an issue with the sensors.library
    Essentially I used my trusted code from years ago (based on an example named waitandhid.c kindly supplied by Jacek) and it simply wouldn't work.

    Well, turns out it does work if I connect my good old xbox360 controller. Then I get a list of the sub-sensors etc.
    But with all my other gamepads (e.g sl 6556 xeox pro, sl 6535 Strike2; nothing fancy, work with AOS4 btw) the only thing sensors.lib delivers is the parent sensor - and then zero sub-sensors.

    In Poseidon the respective device shows up, I can even track the sensor-values in the settings dialog, but in the device info screen's table it also shows zero sub-sensors.

    Any idea for a workaround? Or are those joypads known to not work and I simply had bad luck when I purchased those?

    Thanks & cheers,
    Daniel
  • »22.01.18 - 13:46
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3146 from 2003/3/5
    From: Canada
    Do you have the xbox USB driver loaded? From what I can see this gamepad should act as an XBox 360 gamepad... What product/vendor ID does it report? Could you make a screenshot of its settings window from USB prefs?

    [ Edited by jacadcaps 22.01.2018 - 10:30 ]
  • »22.01.18 - 15:29
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Thanks a lot for your quick reply!

    Actually, your comment somehow got me on the right track:
    I remembered that this xeox pro has a switch on its bottom to toggle between XInput and good old DirectInput mode... It was in DI-mode - and once I switched it to XInput, voila, it appears as xbox360-kind with all its sub-sensors :)

    So, issue for that one solved. For the (pretty antique) other one I'll provide you with a screenshot asap.

    EDIT: here it is, the screenshot for the Speedlink SL-6535 Strike². I suppose the issue is simply that sensors.lib only likes modern XInput-devices?
  • »22.01.18 - 19:37
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3146 from 2003/3/5
    From: Canada
    Glad that you got at least one of those working... the Xbox USB class simply treats all gamepads as if they were Xbox 360 gamepad and just assumes a button layout - which all in all is also good for PS4 and XBone gamepads (coming in 3.10).

    As for your other gamepad... it should still work, but you likely need to map its sensors manually in the settings.
  • »23.01.18 - 12:14
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Daytona675x
    Posts: 109 from 2013/12/5
    Quote:

    the Xbox USB class simply treats all gamepads as if they were Xbox 360 gamepad and just assumes a button layout - which all in all is also good for PS4 and XBone gamepads (coming in 3.10).

    That's fine and good news!

    Quote:

    As for your other gamepad... it should still work, but you likely need to map its sensors manually in the settings.

    I'll see if I get that that done somehow and report back :-)

    Thanks again,
    Daniel
  • »24.01.18 - 06:15
    Profile Visit Website