{"action":"created","comment":{"url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/comments/186542670","pull_request_review_id":118142086,"id":186542670,"diff_hunk":"@@ -576,32 +591,34 @@ def receive(self, timeout_s=0.5, keep_listening=True):\n         # enough, however it's the best that can be done from Python without\n         # interrupt supports.\n         start = time.monotonic()\n-        while not self.rx_done:\n+        timed_out = False\n+        while not timed_out and not self.rx_done:\n             if (time.monotonic() - start) >= timeout_s:\n-                return None  # Exceeded timeout.\n-        # Clear interrupt.\n-        self._write_u8(_RH_RF95_REG_12_IRQ_FLAGS, 0xFF)\n+                timed_out = True","path":"adafruit_rfm9x.py","position":140,"original_position":140,"commit_id":"fa35c3045a226df994b6c2f25680b568a9750546","original_commit_id":"fa35c3045a226df994b6c2f25680b568a9750546","user":{"login":"tannewt","id":52649,"avatar_url":"https://avatars1.githubusercontent.com/u/52649?v=4","gravatar_id":"","url":"https://api.github.com/users/tannewt","html_url":"https://github.com/tannewt","followers_url":"https://api.github.com/users/tannewt/followers","following_url":"https://api.github.com/users/tannewt/following{/other_user}","gists_url":"https://api.github.com/users/tannewt/gists{/gist_id}","starred_url":"https://api.github.com/users/tannewt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannewt/subscriptions","organizations_url":"https://api.github.com/users/tannewt/orgs","repos_url":"https://api.github.com/users/tannewt/repos","events_url":"https://api.github.com/users/tannewt/events{/privacy}","received_events_url":"https://api.github.com/users/tannewt/received_events","type":"User","site_admin":false},"body":"Ok, returning None is fine with me. I believe we do want an exception for `send` failure above though.","created_at":"2018-05-07T20:39:07Z","updated_at":"2018-05-07T20:40:21Z","html_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/pull/4#discussion_r186542670","pull_request_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/comments/186542670"},"html":{"href":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/pull/4#discussion_r186542670"},"pull_request":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4"}},"in_reply_to_id":186332453},"pull_request":{"url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4","id":186224410,"html_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/pull/4","diff_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/pull/4.diff","patch_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/pull/4.patch","issue_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues/4","number":4,"state":"open","locked":false,"title":"Fix power and frequency initiailzations","user":{"login":"jerryneedell","id":15856834,"avatar_url":"https://avatars0.githubusercontent.com/u/15856834?v=4","gravatar_id":"","url":"https://api.github.com/users/jerryneedell","html_url":"https://github.com/jerryneedell","followers_url":"https://api.github.com/users/jerryneedell/followers","following_url":"https://api.github.com/users/jerryneedell/following{/other_user}","gists_url":"https://api.github.com/users/jerryneedell/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryneedell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryneedell/subscriptions","organizations_url":"https://api.github.com/users/jerryneedell/orgs","repos_url":"https://api.github.com/users/jerryneedell/repos","events_url":"https://api.github.com/users/jerryneedell/events{/privacy}","received_events_url":"https://api.github.com/users/jerryneedell/received_events","type":"User","site_admin":false},"body":"Most of the changes were to make this driver compatible with the Arduino driver.\r\nThe main changes are to the way the frequency was set - the actual \"setter\" was never being called and the default frequency (424mHz) remained the actual setting. In addition there was an error in calculation of the frequency setting due to the use of \"//\" vs \"/\".\r\n\r\nThe default baudrate of 10Mhz was causing some \"hangs\" during reads from the FIFO, even with a featherwing. Lowering it to 5MHz seems to have mad this much more reliable\r\n\r\nSeveral minor changes were made bring the code to closer agreement with the Arduino dirver.\r\n\r\nAdded an arbitrary 2 second timeout to the send function. It may be changed va a keyword argument. but I wanted to avoid possible infinite loop.\r\n\r\nBefore these changes, two devices running CP could communicate, but they could not communicate to a device using Arduino. This was due to the frequency mis-configuration. The two CP devices were consistent with eachother, but not with the Arduino Driver.\r\n\r\nAlso renamed the example to rfm9x_simpletest as is the new custom.\r\n\r\nI have tested this with rfm9x feathewings connnected to feather_m0_express boards running teh current CP3.0 master.","created_at":"2018-05-06T20:20:38Z","updated_at":"2018-05-07T20:40:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"965d4047847bbf241ae841948136afd353b71c47","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4/commits","review_comments_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4/comments","review_comment_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues/4/comments","statuses_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/statuses/fa35c3045a226df994b6c2f25680b568a9750546","head":{"label":"jerryneedell:jerryn_power","ref":"jerryn_power","sha":"fa35c3045a226df994b6c2f25680b568a9750546","user":{"login":"jerryneedell","id":15856834,"avatar_url":"https://avatars0.githubusercontent.com/u/15856834?v=4","gravatar_id":"","url":"https://api.github.com/users/jerryneedell","html_url":"https://github.com/jerryneedell","followers_url":"https://api.github.com/users/jerryneedell/followers","following_url":"https://api.github.com/users/jerryneedell/following{/other_user}","gists_url":"https://api.github.com/users/jerryneedell/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryneedell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryneedell/subscriptions","organizations_url":"https://api.github.com/users/jerryneedell/orgs","repos_url":"https://api.github.com/users/jerryneedell/repos","events_url":"https://api.github.com/users/jerryneedell/events{/privacy}","received_events_url":"https://api.github.com/users/jerryneedell/received_events","type":"User","site_admin":false},"repo":{"id":131911156,"name":"Adafruit_CircuitPython_RFM9x","full_name":"jerryneedell/Adafruit_CircuitPython_RFM9x","owner":{"login":"jerryneedell","id":15856834,"avatar_url":"https://avatars0.githubusercontent.com/u/15856834?v=4","gravatar_id":"","url":"https://api.github.com/users/jerryneedell","html_url":"https://github.com/jerryneedell","followers_url":"https://api.github.com/users/jerryneedell/followers","following_url":"https://api.github.com/users/jerryneedell/following{/other_user}","gists_url":"https://api.github.com/users/jerryneedell/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryneedell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryneedell/subscriptions","organizations_url":"https://api.github.com/users/jerryneedell/orgs","repos_url":"https://api.github.com/users/jerryneedell/repos","events_url":"https://api.github.com/users/jerryneedell/events{/privacy}","received_events_url":"https://api.github.com/users/jerryneedell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jerryneedell/Adafruit_CircuitPython_RFM9x","description":"CircuitPython module for the RFM95/6/7/8 LoRa wireless 433/915mhz packet radios.","fork":true,"url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x","forks_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/forks","keys_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/teams","hooks_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/hooks","issue_events_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/issues/events{/number}","events_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/events","assignees_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/assignees{/user}","branches_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/branches{/branch}","tags_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/tags","blobs_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/git/refs{/sha}","trees_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/statuses/{sha}","languages_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/languages","stargazers_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/stargazers","contributors_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/contributors","subscribers_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/subscribers","subscription_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/subscription","commits_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/commits{/sha}","git_commits_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/git/commits{/sha}","comments_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/comments{/number}","issue_comment_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/issues/comments{/number}","contents_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/contents/{+path}","compare_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/merges","archive_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/downloads","issues_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/issues{/number}","pulls_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/pulls{/number}","milestones_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/milestones{/number}","notifications_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/labels{/name}","releases_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/releases{/id}","deployments_url":"https://api.github.com/repos/jerryneedell/Adafruit_CircuitPython_RFM9x/deployments","created_at":"2018-05-02T22:11:53Z","updated_at":"2018-05-03T19:57:39Z","pushed_at":"2018-05-06T20:26:40Z","git_url":"git://github.com/jerryneedell/Adafruit_CircuitPython_RFM9x.git","ssh_url":"git@github.com:jerryneedell/Adafruit_CircuitPython_RFM9x.git","clone_url":"https://github.com/jerryneedell/Adafruit_CircuitPython_RFM9x.git","svn_url":"https://github.com/jerryneedell/Adafruit_CircuitPython_RFM9x","homepage":null,"size":52,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"adafruit:master","ref":"master","sha":"902ac23fae7ddde6c37d3b7da747d08bd7aeced3","user":{"login":"adafruit","id":181069,"avatar_url":"https://avatars3.githubusercontent.com/u/181069?v=4","gravatar_id":"","url":"https://api.github.com/users/adafruit","html_url":"https://github.com/adafruit","followers_url":"https://api.github.com/users/adafruit/followers","following_url":"https://api.github.com/users/adafruit/following{/other_user}","gists_url":"https://api.github.com/users/adafruit/gists{/gist_id}","starred_url":"https://api.github.com/users/adafruit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adafruit/subscriptions","organizations_url":"https://api.github.com/users/adafruit/orgs","repos_url":"https://api.github.com/users/adafruit/repos","events_url":"https://api.github.com/users/adafruit/events{/privacy}","received_events_url":"https://api.github.com/users/adafruit/received_events","type":"Organization","site_admin":false},"repo":{"id":123541402,"name":"Adafruit_CircuitPython_RFM9x","full_name":"adafruit/Adafruit_CircuitPython_RFM9x","owner":{"login":"adafruit","id":181069,"avatar_url":"https://avatars3.githubusercontent.com/u/181069?v=4","gravatar_id":"","url":"https://api.github.com/users/adafruit","html_url":"https://github.com/adafruit","followers_url":"https://api.github.com/users/adafruit/followers","following_url":"https://api.github.com/users/adafruit/following{/other_user}","gists_url":"https://api.github.com/users/adafruit/gists{/gist_id}","starred_url":"https://api.github.com/users/adafruit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adafruit/subscriptions","organizations_url":"https://api.github.com/users/adafruit/orgs","repos_url":"https://api.github.com/users/adafruit/repos","events_url":"https://api.github.com/users/adafruit/events{/privacy}","received_events_url":"https://api.github.com/users/adafruit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x","description":"CircuitPython module for the RFM95/6/7/8 LoRa wireless 433/915mhz packet radios.","fork":false,"url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x","forks_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/forks","keys_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/teams","hooks_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/hooks","issue_events_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues/events{/number}","events_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/events","assignees_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/assignees{/user}","branches_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/branches{/branch}","tags_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/tags","blobs_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/git/refs{/sha}","trees_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/statuses/{sha}","languages_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/languages","stargazers_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/stargazers","contributors_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/contributors","subscribers_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/subscribers","subscription_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/subscription","commits_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/commits{/sha}","git_commits_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/git/commits{/sha}","comments_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/comments{/number}","issue_comment_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues/comments{/number}","contents_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/contents/{+path}","compare_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/merges","archive_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/downloads","issues_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues{/number}","pulls_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls{/number}","milestones_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/milestones{/number}","notifications_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/labels{/name}","releases_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/releases{/id}","deployments_url":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/deployments","created_at":"2018-03-02T06:44:53Z","updated_at":"2018-05-07T20:38:20Z","pushed_at":"2018-05-06T20:26:41Z","git_url":"git://github.com/adafruit/Adafruit_CircuitPython_RFM9x.git","ssh_url":"git@github.com:adafruit/Adafruit_CircuitPython_RFM9x.git","clone_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x.git","svn_url":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x","homepage":null,"size":39,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4"},"html":{"href":"https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/pull/4"},"issue":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues/4"},"comments":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/adafruit/Adafruit_CircuitPython_RFM9x/statuses/fa35c3045a226df994b6c2f25680b568a9750546"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tannewt"}}