{"action":"created","issue":{"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/381","repository_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge","labels_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/381/comments","events_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/381/events","html_url":"https://github.com/Freeyourgadget/Gadgetbridge/issues/381","id":169791347,"number":381,"title":"Live activity should not plot invalid heart rate","user":{"login":"rgh36167","id":5628355,"avatar_url":"https://avatars.githubusercontent.com/u/5628355?v=3","gravatar_id":"","url":"https://api.github.com/users/rgh36167","html_url":"https://github.com/rgh36167","followers_url":"https://api.github.com/users/rgh36167/followers","following_url":"https://api.github.com/users/rgh36167/following{/other_user}","gists_url":"https://api.github.com/users/rgh36167/gists{/gist_id}","starred_url":"https://api.github.com/users/rgh36167/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgh36167/subscriptions","organizations_url":"https://api.github.com/users/rgh36167/orgs","repos_url":"https://api.github.com/users/rgh36167/repos","events_url":"https://api.github.com/users/rgh36167/events{/privacy}","received_events_url":"https://api.github.com/users/rgh36167/received_events","type":"User","site_admin":false},"labels":[{"id":163294514,"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/labels/bug","name":"bug","color":"fc2929","default":true},{"id":387206715,"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/labels/discussion","name":"discussion","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-07T11:06:06Z","updated_at":"2016-12-07T20:55:32Z","closed_at":null,"body":"it appears my miband returns \"0\" for about half the hr measurements and those are plotted resulting in a wild zigzag line going up and down from zero to valid value and back\n\nIn java/nodomain/freeyourgadget/gadgetbridge/activities/charts/LiveActivityFragment.java line 163 is a check for isValidHeartRateValue(heartRate) which causes setCurrentHeartRate(); not to be called.\n\nHowever, in  getCurrentHeartRate() mHeartRate was previously set to \"-1\" to signal an invalid value and is returned by next calls. \nWhere getCurrentHeartRate is callled in add entries there is no test for isValidHeartRateValue resulting in adding and plotting the bogus values.\n\nEither in line 219 there should be a check for isValidHeartRateValue or as a quick hack getCurrentHeartRate() should remember and return the latest valid value to bridge over invalid measurements.\n"},"comment":{"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/comments/265570552","html_url":"https://github.com/Freeyourgadget/Gadgetbridge/issues/381#issuecomment-265570552","issue_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/381","id":265570552,"user":{"login":"uwehermann","id":104173,"avatar_url":"https://avatars.githubusercontent.com/u/104173?v=3","gravatar_id":"","url":"https://api.github.com/users/uwehermann","html_url":"https://github.com/uwehermann","followers_url":"https://api.github.com/users/uwehermann/followers","following_url":"https://api.github.com/users/uwehermann/following{/other_user}","gists_url":"https://api.github.com/users/uwehermann/gists{/gist_id}","starred_url":"https://api.github.com/users/uwehermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwehermann/subscriptions","organizations_url":"https://api.github.com/users/uwehermann/orgs","repos_url":"https://api.github.com/users/uwehermann/repos","events_url":"https://api.github.com/users/uwehermann/events{/privacy}","received_events_url":"https://api.github.com/users/uwehermann/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T20:55:32Z","updated_at":"2016-12-07T20:55:32Z","body":"Oh, I forgot to mention -- we probably don't know what the firmware does internally, right? The numbers received via RF might already be \"smoothed\" via some method like the above (or maybe not)."}}
{"actor":{"display_login":"uwehermann"}}