{"action":"created","comment":{"url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/comments/136899115","pull_request_review_id":60499590,"id":136899115,"diff_hunk":"@@ -28,6 +28,53 @@\n #define PULSE_L _LATD6\n #define PULSE_R _LATE4\n \n+#define CALIB_HISTERES 20\n+#define DEFAULT_CALIB 0x7FFF\n+\n+static unsigned char prox_calib_max_counter[2];\n+static int prox_ground_max[2]; // the calibratoin is not store in settings\n+\n+static int _calib(int value, int i) {\n+\tint ret;\n+\t\n+\tif(value + CALIB_HISTERES > prox_ground_max[i]) {\n+\t\tif(++prox_calib_max_counter[i] > 3) {\n+\t\t\tif(value > prox_ground_max[i]) {\n+\t\t\t\tprox_ground_max[i] = value;\n+\t\t\t} else\n+\t\t\t\tprox_calib_max_counter[i] = 0;","path":"ground_ir.c","position":18,"original_position":18,"commit_id":"5e8b6074eaa999da3ca5a189020865216417576a","original_commit_id":"5e8b6074eaa999da3ca5a189020865216417576a","user":{"login":"stephanemagnenat","id":390278,"avatar_url":"https://avatars3.githubusercontent.com/u/390278?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanemagnenat","html_url":"https://github.com/stephanemagnenat","followers_url":"https://api.github.com/users/stephanemagnenat/followers","following_url":"https://api.github.com/users/stephanemagnenat/following{/other_user}","gists_url":"https://api.github.com/users/stephanemagnenat/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanemagnenat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanemagnenat/subscriptions","organizations_url":"https://api.github.com/users/stephanemagnenat/orgs","repos_url":"https://api.github.com/users/stephanemagnenat/repos","events_url":"https://api.github.com/users/stephanemagnenat/events{/privacy}","received_events_url":"https://api.github.com/users/stephanemagnenat/received_events","type":"User","site_admin":false},"body":"Whatever you prefer, just be symmetric.","created_at":"2017-09-05T05:44:36Z","updated_at":"2017-09-05T05:44:36Z","html_url":"https://github.com/aseba-community/aseba-target-thymio2/pull/26#discussion_r136899115","pull_request_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/comments/136899115"},"html":{"href":"https://github.com/aseba-community/aseba-target-thymio2/pull/26#discussion_r136899115"},"pull_request":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26"}},"in_reply_to_id":136761412},"pull_request":{"url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26","id":136473687,"html_url":"https://github.com/aseba-community/aseba-target-thymio2/pull/26","diff_url":"https://github.com/aseba-community/aseba-target-thymio2/pull/26.diff","patch_url":"https://github.com/aseba-community/aseba-target-thymio2/pull/26.patch","issue_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues/26","number":26,"state":"open","locked":false,"title":"Firmware 11","user":{"login":"mbonani","id":1000934,"avatar_url":"https://avatars2.githubusercontent.com/u/1000934?v=4","gravatar_id":"","url":"https://api.github.com/users/mbonani","html_url":"https://github.com/mbonani","followers_url":"https://api.github.com/users/mbonani/followers","following_url":"https://api.github.com/users/mbonani/following{/other_user}","gists_url":"https://api.github.com/users/mbonani/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonani/subscriptions","organizations_url":"https://api.github.com/users/mbonani/orgs","repos_url":"https://api.github.com/users/mbonani/repos","events_url":"https://api.github.com/users/mbonani/events{/privacy}","received_events_url":"https://api.github.com/users/mbonani/received_events","type":"User","site_admin":false},"body":"first pull request before intensive testing of binaries ","created_at":"2017-08-18T12:59:48Z","updated_at":"2017-09-05T05:44:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfebdd36acc86dc4f12eb5872f31d0d7052ec15e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26/commits","review_comments_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26/comments","review_comment_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues/26/comments","statuses_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/statuses/5e8b6074eaa999da3ca5a189020865216417576a","head":{"label":"mbonani:master","ref":"master","sha":"5e8b6074eaa999da3ca5a189020865216417576a","user":{"login":"mbonani","id":1000934,"avatar_url":"https://avatars2.githubusercontent.com/u/1000934?v=4","gravatar_id":"","url":"https://api.github.com/users/mbonani","html_url":"https://github.com/mbonani","followers_url":"https://api.github.com/users/mbonani/followers","following_url":"https://api.github.com/users/mbonani/following{/other_user}","gists_url":"https://api.github.com/users/mbonani/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonani/subscriptions","organizations_url":"https://api.github.com/users/mbonani/orgs","repos_url":"https://api.github.com/users/mbonani/repos","events_url":"https://api.github.com/users/mbonani/events{/privacy}","received_events_url":"https://api.github.com/users/mbonani/received_events","type":"User","site_admin":false},"repo":{"id":33307977,"name":"aseba-target-thymio2","full_name":"mbonani/aseba-target-thymio2","owner":{"login":"mbonani","id":1000934,"avatar_url":"https://avatars2.githubusercontent.com/u/1000934?v=4","gravatar_id":"","url":"https://api.github.com/users/mbonani","html_url":"https://github.com/mbonani","followers_url":"https://api.github.com/users/mbonani/followers","following_url":"https://api.github.com/users/mbonani/following{/other_user}","gists_url":"https://api.github.com/users/mbonani/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonani/subscriptions","organizations_url":"https://api.github.com/users/mbonani/orgs","repos_url":"https://api.github.com/users/mbonani/repos","events_url":"https://api.github.com/users/mbonani/events{/privacy}","received_events_url":"https://api.github.com/users/mbonani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbonani/aseba-target-thymio2","description":"Thymio 2 firmware","fork":true,"url":"https://api.github.com/repos/mbonani/aseba-target-thymio2","forks_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/forks","keys_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/teams","hooks_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/hooks","issue_events_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/issues/events{/number}","events_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/events","assignees_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/assignees{/user}","branches_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/branches{/branch}","tags_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/tags","blobs_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/statuses/{sha}","languages_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/languages","stargazers_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/stargazers","contributors_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/contributors","subscribers_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/subscribers","subscription_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/subscription","commits_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/contents/{+path}","compare_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/merges","archive_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/downloads","issues_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/issues{/number}","pulls_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/pulls{/number}","milestones_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/milestones{/number}","notifications_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/labels{/name}","releases_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/releases{/id}","deployments_url":"https://api.github.com/repos/mbonani/aseba-target-thymio2/deployments","created_at":"2015-04-02T12:37:53Z","updated_at":"2017-03-08T14:12:36Z","pushed_at":"2017-08-18T12:37:38Z","git_url":"git://github.com/mbonani/aseba-target-thymio2.git","ssh_url":"git@github.com:mbonani/aseba-target-thymio2.git","clone_url":"https://github.com/mbonani/aseba-target-thymio2.git","svn_url":"https://github.com/mbonani/aseba-target-thymio2","homepage":null,"size":3801,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"aseba-community:master","ref":"master","sha":"1d916acc11c13ccb217bf990dbdea30167d79f5d","user":{"login":"aseba-community","id":973992,"avatar_url":"https://avatars0.githubusercontent.com/u/973992?v=4","gravatar_id":"","url":"https://api.github.com/users/aseba-community","html_url":"https://github.com/aseba-community","followers_url":"https://api.github.com/users/aseba-community/followers","following_url":"https://api.github.com/users/aseba-community/following{/other_user}","gists_url":"https://api.github.com/users/aseba-community/gists{/gist_id}","starred_url":"https://api.github.com/users/aseba-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseba-community/subscriptions","organizations_url":"https://api.github.com/users/aseba-community/orgs","repos_url":"https://api.github.com/users/aseba-community/repos","events_url":"https://api.github.com/users/aseba-community/events{/privacy}","received_events_url":"https://api.github.com/users/aseba-community/received_events","type":"Organization","site_admin":false},"repo":{"id":6548791,"name":"aseba-target-thymio2","full_name":"aseba-community/aseba-target-thymio2","owner":{"login":"aseba-community","id":973992,"avatar_url":"https://avatars0.githubusercontent.com/u/973992?v=4","gravatar_id":"","url":"https://api.github.com/users/aseba-community","html_url":"https://github.com/aseba-community","followers_url":"https://api.github.com/users/aseba-community/followers","following_url":"https://api.github.com/users/aseba-community/following{/other_user}","gists_url":"https://api.github.com/users/aseba-community/gists{/gist_id}","starred_url":"https://api.github.com/users/aseba-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseba-community/subscriptions","organizations_url":"https://api.github.com/users/aseba-community/orgs","repos_url":"https://api.github.com/users/aseba-community/repos","events_url":"https://api.github.com/users/aseba-community/events{/privacy}","received_events_url":"https://api.github.com/users/aseba-community/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aseba-community/aseba-target-thymio2","description":"Thymio 2 firmware","fork":false,"url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2","forks_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/forks","keys_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/teams","hooks_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/hooks","issue_events_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues/events{/number}","events_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/events","assignees_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/assignees{/user}","branches_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/branches{/branch}","tags_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/tags","blobs_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/git/refs{/sha}","trees_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/statuses/{sha}","languages_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/languages","stargazers_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/stargazers","contributors_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/contributors","subscribers_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/subscribers","subscription_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/subscription","commits_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/commits{/sha}","git_commits_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/git/commits{/sha}","comments_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/comments{/number}","issue_comment_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues/comments{/number}","contents_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/contents/{+path}","compare_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/merges","archive_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/downloads","issues_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues{/number}","pulls_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls{/number}","milestones_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/milestones{/number}","notifications_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/labels{/name}","releases_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/releases{/id}","deployments_url":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/deployments","created_at":"2012-11-05T17:43:46Z","updated_at":"2017-09-04T07:47:25Z","pushed_at":"2017-08-18T12:59:49Z","git_url":"git://github.com/aseba-community/aseba-target-thymio2.git","ssh_url":"git@github.com:aseba-community/aseba-target-thymio2.git","clone_url":"https://github.com/aseba-community/aseba-target-thymio2.git","svn_url":"https://github.com/aseba-community/aseba-target-thymio2","homepage":null,"size":3567,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26"},"html":{"href":"https://github.com/aseba-community/aseba-target-thymio2/pull/26"},"issue":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues/26"},"comments":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/aseba-community/aseba-target-thymio2/statuses/5e8b6074eaa999da3ca5a189020865216417576a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"stephanemagnenat"}}