{"action":"created","issue":{"url":"https://api.github.com/repos/alex-spataru/QJoysticks/issues/1","repository_url":"https://api.github.com/repos/alex-spataru/QJoysticks","labels_url":"https://api.github.com/repos/alex-spataru/QJoysticks/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/alex-spataru/QJoysticks/issues/1/comments","events_url":"https://api.github.com/repos/alex-spataru/QJoysticks/issues/1/events","html_url":"https://github.com/alex-spataru/QJoysticks/issues/1","id":314005979,"node_id":"MDU6SXNzdWUzMTQwMDU5Nzk=","number":1,"title":"QList out of range","user":{"login":"IljaGrebel","id":7014558,"node_id":"MDQ6VXNlcjcwMTQ1NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/7014558?v=4","gravatar_id":"","url":"https://api.github.com/users/IljaGrebel","html_url":"https://github.com/IljaGrebel","followers_url":"https://api.github.com/users/IljaGrebel/followers","following_url":"https://api.github.com/users/IljaGrebel/following{/other_user}","gists_url":"https://api.github.com/users/IljaGrebel/gists{/gist_id}","starred_url":"https://api.github.com/users/IljaGrebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IljaGrebel/subscriptions","organizations_url":"https://api.github.com/users/IljaGrebel/orgs","repos_url":"https://api.github.com/users/IljaGrebel/repos","events_url":"https://api.github.com/users/IljaGrebel/events{/privacy}","received_events_url":"https://api.github.com/users/IljaGrebel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-13T08:00:21Z","updated_at":"2018-07-11T09:16:02Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nI was trying to use your lib with my joystick which have 3 axis and every time, when I'm trying to change the 3rd axis, my app just crash with a debug message - QList<T>::operator[]: \"index out of range\".\r\n\r\nDo you have any idea, how I can fix that?"},"comment":{"url":"https://api.github.com/repos/alex-spataru/QJoysticks/issues/comments/404101906","html_url":"https://github.com/alex-spataru/QJoysticks/issues/1#issuecomment-404101906","issue_url":"https://api.github.com/repos/alex-spataru/QJoysticks/issues/1","id":404101906,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDEwMTkwNg==","user":{"login":"ARTORGTimFi","id":39736945,"node_id":"MDQ6VXNlcjM5NzM2OTQ1","avatar_url":"https://avatars3.githubusercontent.com/u/39736945?v=4","gravatar_id":"","url":"https://api.github.com/users/ARTORGTimFi","html_url":"https://github.com/ARTORGTimFi","followers_url":"https://api.github.com/users/ARTORGTimFi/followers","following_url":"https://api.github.com/users/ARTORGTimFi/following{/other_user}","gists_url":"https://api.github.com/users/ARTORGTimFi/gists{/gist_id}","starred_url":"https://api.github.com/users/ARTORGTimFi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARTORGTimFi/subscriptions","organizations_url":"https://api.github.com/users/ARTORGTimFi/orgs","repos_url":"https://api.github.com/users/ARTORGTimFi/repos","events_url":"https://api.github.com/users/ARTORGTimFi/events{/privacy}","received_events_url":"https://api.github.com/users/ARTORGTimFi/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T09:16:02Z","updated_at":"2018-07-11T09:16:02Z","author_association":"NONE","body":" 0\r\ndown vote\r\n\r\nI had the same problem.\r\n\r\nHowever if you do not need the 4th axis and just basic 2D joystick movement just change the code to ignore the 4th axis:\r\n\r\nvoid QJoysticks::onAxisEvent (const QJoystickAxisEvent& e)\r\n{\r\n    if (!isBlacklisted (e.joystick->id)) {\r\n        if (e.axis != 4)\r\n        {\r\n            getInputDevice (e.joystick->id)->axes [e.axis] = e.value;\r\n            emit axisChanged (e.joystick->id, e.axis, e.value);\r\n        }\r\n    }\r\n}\r\n\r\n"}}
{"actor":{"display_login":"ARTORGTimFi"}}