Buttons support

Issue #7 resolved
Xavier Selva created an issue

Is it possible to map PSMove buttons? eg. FreePieIO[n].x = 8bit button flags FreePieIO[n].y = float analog trigger

Comments (8)

  1. Elliot Hawkins repo owner

    It is, and in the past that was supported. However, FreePieIO only has four indicies. The first is being used for position/rotation, and the others are currently used to provide raw sensor access. I made this change to accommodate a previous request, and because FreePie can already access the buttons on the PSMove controllers using joystick[n].getDown(m). If Freepie's joystick support isn't sufficient, I could probably bring this back as an option.

    Issue #2 and commit 42bf595 cover this change.

  2. Xavier Selva reporter

    Thanks for the quick response. The issue with joystick is that I'm reading FreePieIO directly from code (ie. not launching a FreePie script to process). I would have to launch FreePie and create a script that remaps the data to FreePieIO (and hope it doesn't conflict with the data coming from your bridge). Would be great if you could add an option/cmd line to map the IOs something like this: fp[0-2] controllers (position and rotation, no raw data), fp[3].x/y/z buttons and fp[3].yaw/pitch/roll trigger (x/yaw for controller 0, y/pitch controller 1, z/roll for controller 2).

  3. Elliot Hawkins repo owner

    That mapping sounds fine. I don't have a lot of free time this week so I might not be able to get to this until the weekend.

  4. Elliot Hawkins repo owner

    Alpha 8 is up with button support for up to three controllers using your struct mapping. The buttons are stored as follows:

    Bit 0 - Square

    Bit 1 - Triangle

    Bit 2 - Cross

    Bit 3 - Circle

    Bit 4 - Move

    Bit 5 - PS

    Bit 6 - Start

    Bit 7 - Select

  5. Log in to comment