rdepena/node-dualshock-controller

View on GitHub
controllerConfigurations/dualShock3.json

Summary

Maintainability
Test Coverage
{
    "vendorId" : 1356,
    "productId" : 616,
    "analogSticks" : [
        {
            "name" : "left",
            "x" : 6,
            "y" : 7,
            "joystickXNumber" : 0,
            "joystickYNumber" : 1
        },
        {
            "name" : "right",
            "x" : 8,
            "y" : 9,
            "joystickXNumber" : 2,
            "joystickYNumber" : 3
        }
    ],
    "buttons" : [
        {
            "name": "l2",
            "buttonBlock": 3,
            "buttonValue": "0x01",
            "analogPin" : 18,
            "joystickNumber": 8
        },
        {
            "name": "r2",
            "buttonBlock": 3,
            "buttonValue": "0x02",
            "analogPin" : 19,
            "joystickNumber" : 9
        },
        {
            "name": "l1",
            "buttonBlock": 3,
            "buttonValue": "0x04",
            "analogPin" : 20,
            "joystickNumber" : 10
        },
        {
            "name":"r1",
            "buttonBlock": 3,
            "buttonValue": "0x08",
            "analogPin" : 21,
            "joystickNumber" : 11
        },
        {
            "name": "triangle",
            "buttonBlock": 3,
            "buttonValue": "0x10",
            "analogPin" : 22,
            "joystickNumber" : 12
        },
        {
            "name": "circle",
            "buttonBlock": 3,
            "buttonValue": "0x20",
            "analogPin" : 23,
            "joystickNumber" : 13
        },
        {
            "name": "x",
            "buttonBlock": 3,
            "buttonValue": "0x40",
            "analogPin" : 24,
            "joystickNumber" : 14
        },
        {
            "name": "square",
            "buttonBlock": 3,
            "buttonValue": "0x80",
            "analogPin": 25,
            "joystickNumber" : 15
        },
        {
            "name": "select",
            "buttonBlock": 2,
            "buttonValue": "0x1",
            "joystickNumber" : 0
        },
        {
            "name": "leftAnalogBump",
            "buttonBlock": 2,
            "buttonValue": "0x2",
            "joystickNumber" : 1
        },
        {
            "name": "rightAnalogBump",
            "buttonBlock": 2,
            "buttonValue": "0x4",
            "joystickNumber" : 2
        },
        {
            "name": "start",
            "buttonBlock": 2,
            "buttonValue": "0x08",
            "joystickNumber" : 3
        },
        {
            "name": "dpadUp",
            "buttonBlock": 2,
            "buttonValue": "0x10",
            "analogPin": 14,
            "joystickNumber" : 4
        },
        {
            "name": "dpadRight",
            "buttonBlock": 2,
            "buttonValue": "0x20",
            "analogPin": 15,
            "joystickNumber" : 5
        },
        {
            "name": "dpadDown",
            "buttonBlock": 2,
            "buttonValue" : "0x40",
            "analogPin" : 16,
            "joystickNumber" : 6
        },
        {
            "name": "dpadLeft",
            "buttonBlock": 2,
            "buttonValue": "0x80",
            "analogPin": 17,
            "joystickNumber" : 7
        },
        {
            "name": "psxButton",
            "buttonBlock":4,
            "buttonValue": "0x01",
            "joystickNumber" : 16
        }
    ],
    "motionInputs": [
            {
                "name" : "rightLeft",
                "directionPin" : 41,
                "valuePin" : 42
            },
            {
                "name" : "forwardBackward",
                "directionPin" : 43,
                "valuePin" : 44
            },
            {
                "name" : "upDown",
                "directionPin" : 45,
                "valuePin" : 46
            },
            {
                "name" : "yaw",
                "directionPin" : 47,
                "valuePin" : 48
            }
        ],
    "status": [
        {
            "name" : "charging",
            "pin" : 29,
            "states" : [
                {
                    "value" : 0,
                    "state" : "Charging"
                },
                {
                    "value" : 2,
                    "state" : "Charging"
                },
                {
                    "value" : 3,
                    "state" : "Not Charging"
                }
            ]
        },
        {
            "name" : "battery",
            "pin" : 30,
            "states" : [
                {
                    "value" : 238,
                    "state" : "Charging"
                },
                {
                    "value" : 0,
                    "state" : "No charge"
                },
                {
                    "value" : 1,
                    "state" : "20%"
                },
                {
                    "value" : 2,
                    "state" : "40%"
                },
                {
                    "value" : 3,
                    "state" : "60%"
                },
                {
                    "value" : 4,
                    "state" : "80%"
                },
                {
                    "value" : 5,
                    "state" : "100%"
                }
            ]
        },
        {
            "name" : "connection",
            "pin" : 31,
            "states" : [
                {
                    "value" : 18,
                    "state" : "Usb"
                },
                {
                    "value" : 22,
                    "state" : "Bluetooth"
                },
                {
                    "value" : 20,
                    "state" : "Rumbling"
                }
            ]
        }
    ],
    "output": {
        "defaultBuffer":[
            1, 0, 254, 0, 254, 0, 0, 0, 0, 0, 0,
            255, 39, 16, 0, 50, 255, 39, 16, 0, 50, 255,
            39, 16, 0, 50, 255, 39, 16, 0, 50, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0
        ],
        "indexes": {
            "rumbleLeft": 3,
            "rumbleRight": 5,
            "led": 10
        }
    }
}