{"action":"created","issue":{"url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1880","repository_url":"https://api.github.com/repos/letscontrolit/ESPEasy","labels_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1880/labels{/name}","comments_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1880/comments","events_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1880/events","html_url":"https://github.com/letscontrolit/ESPEasy/pull/1880","id":368342426,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNTQyNzI1","number":1880,"title":"DEBOUNCE, DOUBLECLICK and LONGPRESS events for PLUGIN001","user":{"login":"giig1967g","id":21318099,"node_id":"MDQ6VXNlcjIxMzE4MDk5","avatar_url":"https://avatars3.githubusercontent.com/u/21318099?v=4","gravatar_id":"","url":"https://api.github.com/users/giig1967g","html_url":"https://github.com/giig1967g","followers_url":"https://api.github.com/users/giig1967g/followers","following_url":"https://api.github.com/users/giig1967g/following{/other_user}","gists_url":"https://api.github.com/users/giig1967g/gists{/gist_id}","starred_url":"https://api.github.com/users/giig1967g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giig1967g/subscriptions","organizations_url":"https://api.github.com/users/giig1967g/orgs","repos_url":"https://api.github.com/users/giig1967g/repos","events_url":"https://api.github.com/users/giig1967g/events{/privacy}","received_events_url":"https://api.github.com/users/giig1967g/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":39,"created_at":"2018-10-09T18:37:49Z","updated_at":"2018-11-18T22:12:27Z","closed_at":"2018-10-19T19:23:23Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/letscontrolit/ESPEasy/pulls/1880","html_url":"https://github.com/letscontrolit/ESPEasy/pull/1880","diff_url":"https://github.com/letscontrolit/ESPEasy/pull/1880.diff","patch_url":"https://github.com/letscontrolit/ESPEasy/pull/1880.patch"},"body":"Hi all,\r\nwith this PR I am adding to Plugin001 the following features:\r\n- ability to send events for doubleclick \r\n- ability to send events for longpress events.\r\n- debounce\r\n\r\nIn case of doubleclick the max time is configurable\r\nIn case of longpress, the min time is configurable\r\nI have also added a de-bouncing check configurable,\r\n\r\nFinally this PR contains the fix for #1878.\r\n\r\n**As soon as this PR is accepted I will develop the same functionalities to MCP and PCF.**\r\n\r\nEvents:\r\nFor doubleclick the EVENT will return = 3\r\nFor longpress, the EVENT will return = 10 or 11 according if the long press has been triggered when state was 0 or 1. In other words, if I keep pressed the button on state 0, the longpress event will return 10.\r\n\r\nThe usage is:\r\n```\r\non button#switch=3 do //check for doubleclick\r\non button#switch=10 do //check for longpress high\r\non button#switch=11 do //check for longpress low\r\n```"},"comment":{"url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/comments/439730547","html_url":"https://github.com/letscontrolit/ESPEasy/pull/1880#issuecomment-439730547","issue_url":"https://api.github.com/repos/letscontrolit/ESPEasy/issues/1880","id":439730547,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTczMDU0Nw==","user":{"login":"uzi18","id":118355,"node_id":"MDQ6VXNlcjExODM1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/118355?v=4","gravatar_id":"","url":"https://api.github.com/users/uzi18","html_url":"https://github.com/uzi18","followers_url":"https://api.github.com/users/uzi18/followers","following_url":"https://api.github.com/users/uzi18/following{/other_user}","gists_url":"https://api.github.com/users/uzi18/gists{/gist_id}","starred_url":"https://api.github.com/users/uzi18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uzi18/subscriptions","organizations_url":"https://api.github.com/users/uzi18/orgs","repos_url":"https://api.github.com/users/uzi18/repos","events_url":"https://api.github.com/users/uzi18/events{/privacy}","received_events_url":"https://api.github.com/users/uzi18/received_events","type":"User","site_admin":false},"created_at":"2018-11-18T22:12:27Z","updated_at":"2018-11-18T22:12:27Z","author_association":"CONTRIBUTOR","body":"@TD-er but how to think about it - as listner for events like SW1#On=1 and exporter for event eg. SW1#OnLP=1 for long press\r\nPros - universal for all gpios even extended one, it will be possible to add more gpios to task\r\nCons - we will need to remove compatibility code if we want clean solution\r\nOr ... we introduce \"System\" plugins for example with checkboxes to choose where to use them"}}
{"actor":{"display_login":"uzi18"}}