{"action":"created","issue":{"url":"https://api.github.com/repos/shirriff/Arduino-IRremote/issues/20","labels_url":"https://api.github.com/repos/shirriff/Arduino-IRremote/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/shirriff/Arduino-IRremote/issues/20/comments","events_url":"https://api.github.com/repos/shirriff/Arduino-IRremote/issues/20/events","html_url":"https://github.com/shirriff/Arduino-IRremote/issues/20","id":8084301,"number":20,"title":"Multiple receivers support","user":{"login":"Neco777","id":2717523,"avatar_url":"https://avatars.githubusercontent.com/u/2717523?v=3","gravatar_id":"","url":"https://api.github.com/users/Neco777","html_url":"https://github.com/Neco777","followers_url":"https://api.github.com/users/Neco777/followers","following_url":"https://api.github.com/users/Neco777/following{/other_user}","gists_url":"https://api.github.com/users/Neco777/gists{/gist_id}","starred_url":"https://api.github.com/users/Neco777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neco777/subscriptions","organizations_url":"https://api.github.com/users/Neco777/orgs","repos_url":"https://api.github.com/users/Neco777/repos","events_url":"https://api.github.com/users/Neco777/events{/privacy}","received_events_url":"https://api.github.com/users/Neco777/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shirriff/Arduino-IRremote/labels/Awaiting%20Merge","name":"Awaiting Merge","color":"fbca04"},{"url":"https://api.github.com/repos/shirriff/Arduino-IRremote/labels/Enhancement","name":"Enhancement","color":"fad8c7"},{"url":"https://api.github.com/repos/shirriff/Arduino-IRremote/labels/New","name":"New","color":"009800"},{"url":"https://api.github.com/repos/shirriff/Arduino-IRremote/labels/WIP","name":"WIP","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2012-11-04T00:06:47Z","updated_at":"2015-03-22T23:02:05Z","closed_at":null,"body":"Hello,\r\n\r\nI worked on my project for arduino and I used IRremote library for receive IR signals. I found that the library did not support several IR receivers (connected to different pins) on a single Arduino.\r\nThe root cause of this (as far as I understood) is variable \"volatile irparams_t irparams\" in IRremote.cpp and \"ISR(TIMER2_OVF_vect)\" procedure. I made some minor changes to make it working for several receivers/pins. Now it seems to me working and I would like to see these changes in the master branch, so I can have all updates of the library.\r\n\r\nI am not familiar with the procedure that I should follow to commit changes - I need to spend some time to figure out how to do this. But I am not sure if my changes will be approved by authors. My main concerns are:\r\n- I am not a confident C++ coder. I came from C# world and my C++ might be awful for real masters.\r\n- I used my own class CppList for improving IRremote library. It makes usage of IRremote more complicated for other people (I use CppList anyway so adding this #include does not bother me). So I need your opinion on that.\r\n\r\nIn short my approach is the following. I moved \"irparams_t irparams\" from global state to class IRrecv. In global state I created collection of all instances of irparams_t instead. I add new instance of irparams_t into that collection in every constructor call of IRrecv (and delete in destructor call). So every instance of IRrecv works with its own instance of irparams_t. Inside \"ISR(TIMER2_OVF_vect)\" I go thru collection of irparams_t and process values from each pin separately.\r\n\r\nI can send you all code (if you give me your email address). If you find my approach is well enough and my implementation is not so awful I can work on branching/merging all this stuff here on github.\r\n\r\nThank you,\r\nNikolay."},"comment":{"url":"https://api.github.com/repos/shirriff/Arduino-IRremote/issues/comments/84729139","html_url":"https://github.com/shirriff/Arduino-IRremote/issues/20#issuecomment-84729139","issue_url":"https://api.github.com/repos/shirriff/Arduino-IRremote/issues/20","id":84729139,"user":{"login":"z3t0","id":9000061,"avatar_url":"https://avatars.githubusercontent.com/u/9000061?v=3","gravatar_id":"","url":"https://api.github.com/users/z3t0","html_url":"https://github.com/z3t0","followers_url":"https://api.github.com/users/z3t0/followers","following_url":"https://api.github.com/users/z3t0/following{/other_user}","gists_url":"https://api.github.com/users/z3t0/gists{/gist_id}","starred_url":"https://api.github.com/users/z3t0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z3t0/subscriptions","organizations_url":"https://api.github.com/users/z3t0/orgs","repos_url":"https://api.github.com/users/z3t0/repos","events_url":"https://api.github.com/users/z3t0/events{/privacy}","received_events_url":"https://api.github.com/users/z3t0/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T23:02:05Z","updated_at":"2015-03-22T23:02:05Z","body":"@khair-eddine Could you create a gist and paste your sketch there so we can take a look. Thanks!"}}