{"action":"created","issue":{"url":"https://api.github.com/repos/pilight/pilight/issues/221","labels_url":"https://api.github.com/repos/pilight/pilight/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/pilight/pilight/issues/221/comments","events_url":"https://api.github.com/repos/pilight/pilight/issues/221/events","html_url":"https://github.com/pilight/pilight/pull/221","id":125136051,"number":221,"title":"Teknihall: Fix negative temperatures","user":{"login":"pilino1234","id":11665015,"avatar_url":"https://avatars.githubusercontent.com/u/11665015?v=3","gravatar_id":"","url":"https://api.github.com/users/pilino1234","html_url":"https://github.com/pilino1234","followers_url":"https://api.github.com/users/pilino1234/followers","following_url":"https://api.github.com/users/pilino1234/following{/other_user}","gists_url":"https://api.github.com/users/pilino1234/gists{/gist_id}","starred_url":"https://api.github.com/users/pilino1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilino1234/subscriptions","organizations_url":"https://api.github.com/users/pilino1234/orgs","repos_url":"https://api.github.com/users/pilino1234/repos","events_url":"https://api.github.com/users/pilino1234/events{/privacy}","received_events_url":"https://api.github.com/users/pilino1234/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-01-06T08:49:56Z","updated_at":"2016-01-15T20:33:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pilight/pilight/pulls/221","html_url":"https://github.com/pilight/pilight/pull/221","diff_url":"https://github.com/pilight/pilight/pull/221.diff","patch_url":"https://github.com/pilight/pilight/pull/221.patch"},"body":"The values were distorted, fixed by checking for unreasonably high value and subtracting 102.4°.\r\nDiscussion: https://forum.pilight.org/Thread-negative-Temperature-for?pid=16687#pid16687"},"comment":{"url":"https://api.github.com/repos/pilight/pilight/issues/comments/172085557","html_url":"https://github.com/pilight/pilight/pull/221#issuecomment-172085557","issue_url":"https://api.github.com/repos/pilight/pilight/issues/221","id":172085557,"user":{"login":"emeied","id":16724144,"avatar_url":"https://avatars.githubusercontent.com/u/16724144?v=3","gravatar_id":"","url":"https://api.github.com/users/emeied","html_url":"https://github.com/emeied","followers_url":"https://api.github.com/users/emeied/followers","following_url":"https://api.github.com/users/emeied/following{/other_user}","gists_url":"https://api.github.com/users/emeied/gists{/gist_id}","starred_url":"https://api.github.com/users/emeied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emeied/subscriptions","organizations_url":"https://api.github.com/users/emeied/orgs","repos_url":"https://api.github.com/users/emeied/repos","events_url":"https://api.github.com/users/emeied/events{/privacy}","received_events_url":"https://api.github.com/users/emeied/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T20:33:14Z","updated_at":"2016-01-15T20:33:14Z","body":"alecto_ws1700.c has already a fix:\r\n`if(temperature > 511) {\ttemperature -= 1023;}`\r\n\r\nFor auriol.c this would be:\r\nline 74:\r\n`int temp = binToDecRev(binary, 12, 23);\r\ntemperature = temp > 2047 ? (double)(temp-2047)/10 : (double)temp/10;`\r\n\r\n"}}