{"action":"created","issue":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/651","repository_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero","labels_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/651/labels{/name}","comments_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/651/comments","events_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/651/events","html_url":"https://github.com/RPi-Distro/python-gpiozero/pull/651","id":326876189,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwODIxODY0","number":651,"title":"Add support for MCP23008 and MCP23017 ICs","user":{"login":"pmuller","id":321533,"node_id":"MDQ6VXNlcjMyMTUzMw==","avatar_url":"https://avatars1.githubusercontent.com/u/321533?v=4","gravatar_id":"","url":"https://api.github.com/users/pmuller","html_url":"https://github.com/pmuller","followers_url":"https://api.github.com/users/pmuller/followers","following_url":"https://api.github.com/users/pmuller/following{/other_user}","gists_url":"https://api.github.com/users/pmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/pmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmuller/subscriptions","organizations_url":"https://api.github.com/users/pmuller/orgs","repos_url":"https://api.github.com/users/pmuller/repos","events_url":"https://api.github.com/users/pmuller/events{/privacy}","received_events_url":"https://api.github.com/users/pmuller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-28T02:23:11Z","updated_at":"2018-10-16T23:08:13Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/pulls/651","html_url":"https://github.com/RPi-Distro/python-gpiozero/pull/651","diff_url":"https://github.com/RPi-Distro/python-gpiozero/pull/651.diff","patch_url":"https://github.com/RPi-Distro/python-gpiozero/pull/651.patch"},"body":"Fix #199"},"comment":{"url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/comments/430432313","html_url":"https://github.com/RPi-Distro/python-gpiozero/pull/651#issuecomment-430432313","issue_url":"https://api.github.com/repos/RPi-Distro/python-gpiozero/issues/651","id":430432313,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDQzMjMxMw==","user":{"login":"ffleandro","id":1027186,"node_id":"MDQ6VXNlcjEwMjcxODY=","avatar_url":"https://avatars1.githubusercontent.com/u/1027186?v=4","gravatar_id":"","url":"https://api.github.com/users/ffleandro","html_url":"https://github.com/ffleandro","followers_url":"https://api.github.com/users/ffleandro/followers","following_url":"https://api.github.com/users/ffleandro/following{/other_user}","gists_url":"https://api.github.com/users/ffleandro/gists{/gist_id}","starred_url":"https://api.github.com/users/ffleandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffleandro/subscriptions","organizations_url":"https://api.github.com/users/ffleandro/orgs","repos_url":"https://api.github.com/users/ffleandro/repos","events_url":"https://api.github.com/users/ffleandro/events{/privacy}","received_events_url":"https://api.github.com/users/ffleandro/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T23:08:13Z","updated_at":"2018-10-16T23:08:13Z","author_association":"NONE","body":"So, regarding the pull problem, the error occurs because the `Button` class checks if it's pin already has pull been set and the `MCP230xxPin` implementation has a default value of `floating` for it's pin.\r\nSettings the default value to `None` solves this problem.\r\n\r\nAlso, I found a really complex bug in the `MCP230xxPoller` class.\r\n\r\nInside it's loop implementation, everytime the poller checks for a pin state change it calls the factory pin creation method for ALL 16 pins. Every. single. loop.\r\n\r\nAlso I think this poller is very inneficient since it does lot's of unnecessary gpio reads.\r\n\r\nWhy is this poller class necessary and not use the default gpiozero behaviour for checking state changes?"}}
{"actor":{"display_login":"ffleandro"}}