{"action":"reopened","number":1678,"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/1678","id":27712919,"html_url":"https://github.com/PX4/Firmware/pull/1678","diff_url":"https://github.com/PX4/Firmware/pull/1678.diff","patch_url":"https://github.com/PX4/Firmware/pull/1678.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/1678","number":1678,"state":"open","locked":false,"title":"Rework the LIDAR Lite driver (ll40ls) to prevent timeouts and failure.","user":{"login":"sjwilks","id":1179086,"avatar_url":"https://avatars.githubusercontent.com/u/1179086?v=3","gravatar_id":"","url":"https://api.github.com/users/sjwilks","html_url":"https://github.com/sjwilks","followers_url":"https://api.github.com/users/sjwilks/followers","following_url":"https://api.github.com/users/sjwilks/following{/other_user}","gists_url":"https://api.github.com/users/sjwilks/gists{/gist_id}","starred_url":"https://api.github.com/users/sjwilks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjwilks/subscriptions","organizations_url":"https://api.github.com/users/sjwilks/orgs","repos_url":"https://api.github.com/users/sjwilks/repos","events_url":"https://api.github.com/users/sjwilks/events{/privacy}","received_events_url":"https://api.github.com/users/sjwilks/received_events","type":"User","site_admin":false},"body":"**This is a WIP, do not merge.** This is potentially close to a fix or at least a significant improvement on the current state.\r\n\r\nAfter several long running tests this change appears to prevent or at least significantly extend the time until communication fails. Typically communication with the Lidar fails within minutes, especially if another I2C device such as the PX4Flow is on the same I2C bus (need more testing to confirm this).\r\n\r\nThe current state of the Read() function illustrates (will not currently run) what appears to be the correct way of communicating with the device and resulted in 0 errors. The proper implementation in cycle(), collect() and measure() aims for a more practical variant. The ideal delay between writing and reading is 15ms. Shorter times trigger read/write errors. Preventing out of sequence reads/writes is also critical. Multiple attempts sometimes need to be made to write/read but currently always succeed within 8 attempts but this isn't a guarantee and running over will probably still lead to a failure or signal a pending unavoidable failure.\r\n\r\nMore longer running tests, timing refinement and cleanup needed.\r\n","created_at":"2015-01-20T21:16:27Z","updated_at":"2015-01-22T00:48:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de7196e99144ed3fa614e606335ebe4d6690d84b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/1678/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/1678/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments/{number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/1678/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/6c249e260d85cae2f21b017eff2d2c07cb6aa5cd","head":{"label":"sjwilks:ekf_flow_lidar","ref":"ekf_flow_lidar","sha":"6c249e260d85cae2f21b017eff2d2c07cb6aa5cd","user":{"login":"sjwilks","id":1179086,"avatar_url":"https://avatars.githubusercontent.com/u/1179086?v=3","gravatar_id":"","url":"https://api.github.com/users/sjwilks","html_url":"https://github.com/sjwilks","followers_url":"https://api.github.com/users/sjwilks/followers","following_url":"https://api.github.com/users/sjwilks/following{/other_user}","gists_url":"https://api.github.com/users/sjwilks/gists{/gist_id}","starred_url":"https://api.github.com/users/sjwilks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjwilks/subscriptions","organizations_url":"https://api.github.com/users/sjwilks/orgs","repos_url":"https://api.github.com/users/sjwilks/repos","events_url":"https://api.github.com/users/sjwilks/events{/privacy}","received_events_url":"https://api.github.com/users/sjwilks/received_events","type":"User","site_admin":false},"repo":{"id":5685263,"name":"Firmware","full_name":"sjwilks/Firmware","owner":{"login":"sjwilks","id":1179086,"avatar_url":"https://avatars.githubusercontent.com/u/1179086?v=3","gravatar_id":"","url":"https://api.github.com/users/sjwilks","html_url":"https://github.com/sjwilks","followers_url":"https://api.github.com/users/sjwilks/followers","following_url":"https://api.github.com/users/sjwilks/following{/other_user}","gists_url":"https://api.github.com/users/sjwilks/gists{/gist_id}","starred_url":"https://api.github.com/users/sjwilks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjwilks/subscriptions","organizations_url":"https://api.github.com/users/sjwilks/orgs","repos_url":"https://api.github.com/users/sjwilks/repos","events_url":"https://api.github.com/users/sjwilks/events{/privacy}","received_events_url":"https://api.github.com/users/sjwilks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sjwilks/Firmware","description":"PX4 Firmware for PX4FMU autopilot and PX4IO servo / failsafe board","fork":true,"url":"https://api.github.com/repos/sjwilks/Firmware","forks_url":"https://api.github.com/repos/sjwilks/Firmware/forks","keys_url":"https://api.github.com/repos/sjwilks/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sjwilks/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sjwilks/Firmware/teams","hooks_url":"https://api.github.com/repos/sjwilks/Firmware/hooks","issue_events_url":"https://api.github.com/repos/sjwilks/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/sjwilks/Firmware/events","assignees_url":"https://api.github.com/repos/sjwilks/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/sjwilks/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/sjwilks/Firmware/tags","blobs_url":"https://api.github.com/repos/sjwilks/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sjwilks/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sjwilks/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/sjwilks/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sjwilks/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/sjwilks/Firmware/languages","stargazers_url":"https://api.github.com/repos/sjwilks/Firmware/stargazers","contributors_url":"https://api.github.com/repos/sjwilks/Firmware/contributors","subscribers_url":"https://api.github.com/repos/sjwilks/Firmware/subscribers","subscription_url":"https://api.github.com/repos/sjwilks/Firmware/subscription","commits_url":"https://api.github.com/repos/sjwilks/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/sjwilks/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/sjwilks/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/sjwilks/Firmware/issues/comments/{number}","contents_url":"https://api.github.com/repos/sjwilks/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/sjwilks/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sjwilks/Firmware/merges","archive_url":"https://api.github.com/repos/sjwilks/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sjwilks/Firmware/downloads","issues_url":"https://api.github.com/repos/sjwilks/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/sjwilks/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/sjwilks/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/sjwilks/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sjwilks/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/sjwilks/Firmware/releases{/id}","created_at":"2012-09-05T09:38:14Z","updated_at":"2014-12-25T15:09:46Z","pushed_at":"2015-01-21T09:54:40Z","git_url":"git://github.com/sjwilks/Firmware.git","ssh_url":"git@github.com:sjwilks/Firmware.git","clone_url":"https://github.com/sjwilks/Firmware.git","svn_url":"https://github.com/sjwilks/Firmware","homepage":"https://pixhawk.ethz.ch/px4/","size":64726,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"b8b0d1d4ae3c7ced44eb1a6c394ee5877803c309","user":{"login":"PX4","id":2096014,"avatar_url":"https://avatars.githubusercontent.com/u/2096014?v=3","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"repo":{"id":5298790,"name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"avatar_url":"https://avatars.githubusercontent.com/u/2096014?v=3","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PX4/Firmware","description":"PX4 Firmware for PX4FMU autopilot and PX4IO servo / failsafe board","fork":false,"url":"https://api.github.com/repos/PX4/Firmware","forks_url":"https://api.github.com/repos/PX4/Firmware/forks","keys_url":"https://api.github.com/repos/PX4/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/Firmware/teams","hooks_url":"https://api.github.com/repos/PX4/Firmware/hooks","issue_events_url":"https://api.github.com/repos/PX4/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/Firmware/events","assignees_url":"https://api.github.com/repos/PX4/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/Firmware/tags","blobs_url":"https://api.github.com/repos/PX4/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/Firmware/languages","stargazers_url":"https://api.github.com/repos/PX4/Firmware/stargazers","contributors_url":"https://api.github.com/repos/PX4/Firmware/contributors","subscribers_url":"https://api.github.com/repos/PX4/Firmware/subscribers","subscription_url":"https://api.github.com/repos/PX4/Firmware/subscription","commits_url":"https://api.github.com/repos/PX4/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/Firmware/issues/comments/{number}","contents_url":"https://api.github.com/repos/PX4/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/Firmware/merges","archive_url":"https://api.github.com/repos/PX4/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/Firmware/downloads","issues_url":"https://api.github.com/repos/PX4/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/PX4/Firmware/releases{/id}","created_at":"2012-08-04T21:19:36Z","updated_at":"2015-01-21T22:18:57Z","pushed_at":"2015-01-21T22:18:56Z","git_url":"git://github.com/PX4/Firmware.git","ssh_url":"git@github.com:PX4/Firmware.git","clone_url":"https://github.com/PX4/Firmware.git","svn_url":"https://github.com/PX4/Firmware","homepage":"https://pixhawk.ethz.ch/px4/","size":127997,"stargazers_count":231,"watchers_count":231,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":766,"mirror_url":null,"open_issues_count":110,"forks":766,"open_issues":110,"watchers":231,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/1678"},"html":{"href":"https://github.com/PX4/Firmware/pull/1678"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/1678"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/1678/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/1678/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/1678/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/6c249e260d85cae2f21b017eff2d2c07cb6aa5cd"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":11,"review_comments":0,"commits":16,"additions":200,"deletions":124,"changed_files":12}}