{"action":"opened","issue":{"url":"https://api.github.com/repos/john-/Device-Chip-TMP102/issues/2","repository_url":"https://api.github.com/repos/john-/Device-Chip-TMP102","labels_url":"https://api.github.com/repos/john-/Device-Chip-TMP102/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/john-/Device-Chip-TMP102/issues/2/comments","events_url":"https://api.github.com/repos/john-/Device-Chip-TMP102/issues/2/events","html_url":"https://github.com/john-/Device-Chip-TMP102/issues/2","id":381978695,"node_id":"MDU6SXNzdWUzODE5Nzg2OTU=","number":2,"title":"Doesn't handle negative temperatures","user":{"login":"john-","id":2359125,"node_id":"MDQ6VXNlcjIzNTkxMjU=","avatar_url":"https://avatars2.githubusercontent.com/u/2359125?v=4","gravatar_id":"","url":"https://api.github.com/users/john-","html_url":"https://github.com/john-","followers_url":"https://api.github.com/users/john-/followers","following_url":"https://api.github.com/users/john-/following{/other_user}","gists_url":"https://api.github.com/users/john-/gists{/gist_id}","starred_url":"https://api.github.com/users/john-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-/subscriptions","organizations_url":"https://api.github.com/users/john-/orgs","repos_url":"https://api.github.com/users/john-/repos","events_url":"https://api.github.com/users/john-/events{/privacy}","received_events_url":"https://api.github.com/users/john-/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-18T16:59:42Z","updated_at":"2018-11-18T16:59:42Z","closed_at":null,"author_association":"OWNER","body":"https://github.com/john-/Device-Chip-TMP102/blob/78825c17b95c59bcd4f4c4d8ef9a83154ebbf90b/lib/Device/Chip/TMP102.pm#L257\r\n\r\nThat subroutine does not handle negative temperatures correctly.   It was ported from this code:\r\n\r\nhttps://github.com/khoulihan/micropython-tmp102/blob/d734988aebb5e5be09ee9ce90d7e20a76a5bf760/tmp102/_tmp102.py#L69\r\n\r\nTo get it to work with 12bit temperatures format (extended mode is 13bit) I hacked the following line by incrementing $ti by 1:\r\n\r\n$t = -(($ti+1) * 0.0625); # TODO:  Maybe off by one needs to be fixed elsewhere\r\n\r\nIn fact this hack does does work with 13bit (extended mode) temperatures.\r\n"}}
{"actor":{"display_login":"john-"}}