{"action":"created","issue":{"url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/369","repository_url":"https://api.github.com/repos/bbcmicrobit/micropython","labels_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/369/comments","events_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/369/events","html_url":"https://github.com/bbcmicrobit/micropython/pull/369","id":186096547,"number":369,"title":"Add receive_into function to radio module. Allows allocation-free radio reception.","user":{"login":"markshannon","id":9448417,"avatar_url":"https://avatars.githubusercontent.com/u/9448417?v=3","gravatar_id":"","url":"https://api.github.com/users/markshannon","html_url":"https://github.com/markshannon","followers_url":"https://api.github.com/users/markshannon/followers","following_url":"https://api.github.com/users/markshannon/following{/other_user}","gists_url":"https://api.github.com/users/markshannon/gists{/gist_id}","starred_url":"https://api.github.com/users/markshannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markshannon/subscriptions","organizations_url":"https://api.github.com/users/markshannon/orgs","repos_url":"https://api.github.com/users/markshannon/repos","events_url":"https://api.github.com/users/markshannon/events{/privacy}","received_events_url":"https://api.github.com/users/markshannon/received_events","type":"User","site_admin":false},"labels":[{"id":245267586,"url":"https://api.github.com/repos/bbcmicrobit/micropython/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"dpgeorge","id":6187689,"avatar_url":"https://avatars.githubusercontent.com/u/6187689?v=3","gravatar_id":"","url":"https://api.github.com/users/dpgeorge","html_url":"https://github.com/dpgeorge","followers_url":"https://api.github.com/users/dpgeorge/followers","following_url":"https://api.github.com/users/dpgeorge/following{/other_user}","gists_url":"https://api.github.com/users/dpgeorge/gists{/gist_id}","starred_url":"https://api.github.com/users/dpgeorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpgeorge/subscriptions","organizations_url":"https://api.github.com/users/dpgeorge/orgs","repos_url":"https://api.github.com/users/dpgeorge/repos","events_url":"https://api.github.com/users/dpgeorge/events{/privacy}","received_events_url":"https://api.github.com/users/dpgeorge/received_events","type":"User","site_admin":false},"assignees":[{"login":"dpgeorge","id":6187689,"avatar_url":"https://avatars.githubusercontent.com/u/6187689?v=3","gravatar_id":"","url":"https://api.github.com/users/dpgeorge","html_url":"https://github.com/dpgeorge","followers_url":"https://api.github.com/users/dpgeorge/followers","following_url":"https://api.github.com/users/dpgeorge/following{/other_user}","gists_url":"https://api.github.com/users/dpgeorge/gists{/gist_id}","starred_url":"https://api.github.com/users/dpgeorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpgeorge/subscriptions","organizations_url":"https://api.github.com/users/dpgeorge/orgs","repos_url":"https://api.github.com/users/dpgeorge/repos","events_url":"https://api.github.com/users/dpgeorge/events{/privacy}","received_events_url":"https://api.github.com/users/dpgeorge/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-29T19:32:31Z","updated_at":"2016-11-11T19:14:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bbcmicrobit/micropython/pulls/369","html_url":"https://github.com/bbcmicrobit/micropython/pull/369","diff_url":"https://github.com/bbcmicrobit/micropython/pull/369.diff","patch_url":"https://github.com/bbcmicrobit/micropython/pull/369.patch"},"body":"To transmit data at higher speeds, predictable delays are needed and that means no GC.\r\nThis PR adds a `receive_bytes_into` function allowing packets to be copied into a pre-existing buffer.\r\n\r\nFor example, this allows wireless audio:\r\n\r\n``` python\r\nimport audio\r\nimport radio\r\nf = audio.AudioFrame()\r\nradio.on()\r\ndef radio_stream():\r\n    while True:\r\n        if radio.receive_bytes_into(f) == 32:\r\n            yield f\r\naudio.play(radio_stream())\r\n```\r\n\r\nAlso includes a couple of minor fixes for the AudioFrame class.\r\n"},"comment":{"url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/comments/260032685","html_url":"https://github.com/bbcmicrobit/micropython/pull/369#issuecomment-260032685","issue_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/369","id":260032685,"user":{"login":"markshannon","id":9448417,"avatar_url":"https://avatars.githubusercontent.com/u/9448417?v=3","gravatar_id":"","url":"https://api.github.com/users/markshannon","html_url":"https://github.com/markshannon","followers_url":"https://api.github.com/users/markshannon/followers","following_url":"https://api.github.com/users/markshannon/following{/other_user}","gists_url":"https://api.github.com/users/markshannon/gists{/gist_id}","starred_url":"https://api.github.com/users/markshannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markshannon/subscriptions","organizations_url":"https://api.github.com/users/markshannon/orgs","repos_url":"https://api.github.com/users/markshannon/repos","events_url":"https://api.github.com/users/markshannon/events{/privacy}","received_events_url":"https://api.github.com/users/markshannon/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T19:14:02Z","updated_at":"2016-11-11T19:14:02Z","body":"Done."}}
{"actor":{"display_login":"markshannon"}}