{"action":"created","issue":{"url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary/issues/25","repository_url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary","labels_url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary/issues/25/comments","events_url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary/issues/25/events","html_url":"https://github.com/MHeironimus/ArduinoJoystickLibrary/issues/25","id":195894168,"number":25,"title":"Reversed axis range cannot be defined","user":{"login":"baritonomarchetto","id":22976086,"avatar_url":"https://avatars.githubusercontent.com/u/22976086?v=3","gravatar_id":"","url":"https://api.github.com/users/baritonomarchetto","html_url":"https://github.com/baritonomarchetto","followers_url":"https://api.github.com/users/baritonomarchetto/followers","following_url":"https://api.github.com/users/baritonomarchetto/following{/other_user}","gists_url":"https://api.github.com/users/baritonomarchetto/gists{/gist_id}","starred_url":"https://api.github.com/users/baritonomarchetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baritonomarchetto/subscriptions","organizations_url":"https://api.github.com/users/baritonomarchetto/orgs","repos_url":"https://api.github.com/users/baritonomarchetto/repos","events_url":"https://api.github.com/users/baritonomarchetto/events{/privacy}","received_events_url":"https://api.github.com/users/baritonomarchetto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"MHeironimus","id":5286686,"avatar_url":"https://avatars.githubusercontent.com/u/5286686?v=3","gravatar_id":"","url":"https://api.github.com/users/MHeironimus","html_url":"https://github.com/MHeironimus","followers_url":"https://api.github.com/users/MHeironimus/followers","following_url":"https://api.github.com/users/MHeironimus/following{/other_user}","gists_url":"https://api.github.com/users/MHeironimus/gists{/gist_id}","starred_url":"https://api.github.com/users/MHeironimus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHeironimus/subscriptions","organizations_url":"https://api.github.com/users/MHeironimus/orgs","repos_url":"https://api.github.com/users/MHeironimus/repos","events_url":"https://api.github.com/users/MHeironimus/events{/privacy}","received_events_url":"https://api.github.com/users/MHeironimus/received_events","type":"User","site_admin":false},"assignees":[{"login":"MHeironimus","id":5286686,"avatar_url":"https://avatars.githubusercontent.com/u/5286686?v=3","gravatar_id":"","url":"https://api.github.com/users/MHeironimus","html_url":"https://github.com/MHeironimus","followers_url":"https://api.github.com/users/MHeironimus/followers","following_url":"https://api.github.com/users/MHeironimus/following{/other_user}","gists_url":"https://api.github.com/users/MHeironimus/gists{/gist_id}","starred_url":"https://api.github.com/users/MHeironimus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHeironimus/subscriptions","organizations_url":"https://api.github.com/users/MHeironimus/orgs","repos_url":"https://api.github.com/users/MHeironimus/repos","events_url":"https://api.github.com/users/MHeironimus/events{/privacy}","received_events_url":"https://api.github.com/users/MHeironimus/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2016-12-15T19:28:39Z","updated_at":"2016-12-26T20:34:23Z","closed_at":"2016-12-26T20:34:23Z","body":"First thing first: this is not really an issue but more a request.\r\n\r\nI was toying with the new library version and tried to reverse the axis behaviour. My starting code was this:\r\n\r\n```\r\n#include <Joystick.h>\r\n\r\n//pure x axis...\r\nJoystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_JOYSTICK,\r\n  0, 0,                  \r\n  true, false, false,    \r\n  false, false, false,   \r\n  false, false,          \r\n  false, false, false);  \r\n\r\nint readPot;\r\n\r\nvoid setup() {\r\n Joystick.begin();\r\n Joystick.setXAxisRange(0, 1023);\r\n}\r\n\r\nvoid loop() {\r\nreadPot = analogRead(A2);\r\n\r\n Joystick.setXAxis(readPot);\r\n}\r\n```\r\n\r\nThis code works flawlessy, but if you set a reversed XAxisRange:\r\n\r\n` Joystick.setXAxisRange(1023, 0);`\r\n\r\nIt \"doens't work\": the axis cannot be controlled by the pot anymore. \r\nI know that this could be \"fixed\" by a simple, standard, arduino \"map\" function, but it would be nice to reverse the axis by simply reverse the range definition :)\r\n\r\nKeep the great work up!"},"comment":{"url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary/issues/comments/269240135","html_url":"https://github.com/MHeironimus/ArduinoJoystickLibrary/issues/25#issuecomment-269240135","issue_url":"https://api.github.com/repos/MHeironimus/ArduinoJoystickLibrary/issues/25","id":269240135,"user":{"login":"MHeironimus","id":5286686,"avatar_url":"https://avatars.githubusercontent.com/u/5286686?v=3","gravatar_id":"","url":"https://api.github.com/users/MHeironimus","html_url":"https://github.com/MHeironimus","followers_url":"https://api.github.com/users/MHeironimus/followers","following_url":"https://api.github.com/users/MHeironimus/following{/other_user}","gists_url":"https://api.github.com/users/MHeironimus/gists{/gist_id}","starred_url":"https://api.github.com/users/MHeironimus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHeironimus/subscriptions","organizations_url":"https://api.github.com/users/MHeironimus/orgs","repos_url":"https://api.github.com/users/MHeironimus/repos","events_url":"https://api.github.com/users/MHeironimus/events{/privacy}","received_events_url":"https://api.github.com/users/MHeironimus/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T20:34:23Z","updated_at":"2016-12-26T20:34:23Z","body":"This change has now been merged into the master and version-2.0 branches."}}
{"actor":{"display_login":"MHeironimus"}}