{"action":"opened","number":3511,"pull_request":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/3511","id":73146144,"html_url":"https://github.com/mavlink/qgroundcontrol/pull/3511","diff_url":"https://github.com/mavlink/qgroundcontrol/pull/3511.diff","patch_url":"https://github.com/mavlink/qgroundcontrol/pull/3511.patch","issue_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/3511","number":3511,"state":"open","locked":false,"title":"Recognize joystick hats and append to the button list (rev 2)","user":{"login":"rjehangir","id":968100,"avatar_url":"https://avatars.githubusercontent.com/u/968100?v=3","gravatar_id":"","url":"https://api.github.com/users/rjehangir","html_url":"https://github.com/rjehangir","followers_url":"https://api.github.com/users/rjehangir/followers","following_url":"https://api.github.com/users/rjehangir/following{/other_user}","gists_url":"https://api.github.com/users/rjehangir/gists{/gist_id}","starred_url":"https://api.github.com/users/rjehangir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjehangir/subscriptions","organizations_url":"https://api.github.com/users/rjehangir/orgs","repos_url":"https://api.github.com/users/rjehangir/repos","events_url":"https://api.github.com/users/rjehangir/events{/privacy}","received_events_url":"https://api.github.com/users/rjehangir/received_events","type":"User","site_admin":false},"body":"(Note: This is a new version of PR #3455 that has been updated for the new joystick code.)\r\n\r\nThis PR addresses the issue that joystick/gamepad hats are considered to be \"hats\" in Windows but \"buttons\" on Mac and Linux. This causes inconsistent numbers of joystick buttons between OSes.\r\n\r\nThis PR causes joystick hats to be detected and appended to the normal button list. Only the up, down, left, right buttons are recognized and appear in the same order that they are detect on Mac/Linux.\r\n\r\nA few things worth mentioning:\r\n\r\n- The other buttons are still detected in different orders on different OSes so this doesn't provide complete consistency\r\n- The center button (like the \"X\" on the Xbox controller) is not detected on Windows. This will be fixed in SDL2\r\n- This does not affect the indices of any buttons so it should not affect any existing joystick performance or setup\r\n- This has been tested on Mac and Windows with Xbox 360 and Logitech 310 controllers\r\n- My motivation for doing this was to provide additional buttons to ArduSub software but it should be broadly useful\r\n\r\nLet me know if you have any thoughts or questions. I'm happy to discuss.\r\n\r\nAlso, I committed this before the repo was switched to the new dual licenses and I'm fine with the new license.\r\n","created_at":"2016-06-09T01:28:09Z","updated_at":"2016-06-09T01:28:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/3511/commits","review_comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/3511/comments","review_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/3511/comments","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/5d5528354f6247c2bd903fceb43439224ca77146","head":{"label":"bluerobotics:windowsJoystickHat","ref":"windowsJoystickHat","sha":"5d5528354f6247c2bd903fceb43439224ca77146","user":{"login":"bluerobotics","id":7120633,"avatar_url":"https://avatars.githubusercontent.com/u/7120633?v=3","gravatar_id":"","url":"https://api.github.com/users/bluerobotics","html_url":"https://github.com/bluerobotics","followers_url":"https://api.github.com/users/bluerobotics/followers","following_url":"https://api.github.com/users/bluerobotics/following{/other_user}","gists_url":"https://api.github.com/users/bluerobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/bluerobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluerobotics/subscriptions","organizations_url":"https://api.github.com/users/bluerobotics/orgs","repos_url":"https://api.github.com/users/bluerobotics/repos","events_url":"https://api.github.com/users/bluerobotics/events{/privacy}","received_events_url":"https://api.github.com/users/bluerobotics/received_events","type":"Organization","site_admin":false},"repo":{"id":49357822,"name":"qgroundcontrol","full_name":"bluerobotics/qgroundcontrol","owner":{"login":"bluerobotics","id":7120633,"avatar_url":"https://avatars.githubusercontent.com/u/7120633?v=3","gravatar_id":"","url":"https://api.github.com/users/bluerobotics","html_url":"https://github.com/bluerobotics","followers_url":"https://api.github.com/users/bluerobotics/followers","following_url":"https://api.github.com/users/bluerobotics/following{/other_user}","gists_url":"https://api.github.com/users/bluerobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/bluerobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluerobotics/subscriptions","organizations_url":"https://api.github.com/users/bluerobotics/orgs","repos_url":"https://api.github.com/users/bluerobotics/repos","events_url":"https://api.github.com/users/bluerobotics/events{/privacy}","received_events_url":"https://api.github.com/users/bluerobotics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bluerobotics/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":true,"url":"https://api.github.com/repos/bluerobotics/qgroundcontrol","forks_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/releases{/id}","deployments_url":"https://api.github.com/repos/bluerobotics/qgroundcontrol/deployments","created_at":"2016-01-10T07:31:43Z","updated_at":"2016-05-22T22:36:28Z","pushed_at":"2016-06-09T00:09:14Z","git_url":"git://github.com/bluerobotics/qgroundcontrol.git","ssh_url":"git@github.com:bluerobotics/qgroundcontrol.git","clone_url":"https://github.com/bluerobotics/qgroundcontrol.git","svn_url":"https://github.com/bluerobotics/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":187323,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"mavlink:master","ref":"master","sha":"7b8f0a14685d223837f03d398d65b3d1a4427c72","user":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"repo":{"id":2567844,"name":"qgroundcontrol","full_name":"mavlink/qgroundcontrol","owner":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mavlink/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":false,"url":"https://api.github.com/repos/mavlink/qgroundcontrol","forks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/mavlink/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavlink/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavlink/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/mavlink/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/mavlink/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/mavlink/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavlink/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/mavlink/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavlink/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/mavlink/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/mavlink/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavlink/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/mavlink/qgroundcontrol/releases{/id}","deployments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/deployments","created_at":"2011-10-13T07:31:07Z","updated_at":"2016-06-07T15:10:20Z","pushed_at":"2016-06-09T00:09:16Z","git_url":"git://github.com/mavlink/qgroundcontrol.git","ssh_url":"git@github.com:mavlink/qgroundcontrol.git","clone_url":"https://github.com/mavlink/qgroundcontrol.git","svn_url":"https://github.com/mavlink/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":203776,"stargazers_count":340,"watchers_count":340,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":582,"mirror_url":null,"open_issues_count":292,"forks":582,"open_issues":292,"watchers":340,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/3511"},"html":{"href":"https://github.com/mavlink/qgroundcontrol/pull/3511"},"issue":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/3511"},"comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/3511/comments"},"review_comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/3511/comments"},"review_comment":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/3511/commits"},"statuses":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/5d5528354f6247c2bd903fceb43439224ca77146"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":55,"deletions":20,"changed_files":5}}
{"actor":{"display_login":"rjehangir"}}