{"action":"created","comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/129544662","pull_request_review_id":52327330,"id":129544662,"diff_hunk":"@@ -0,0 +1,818 @@\n+/*\n+\n+this library collects points of drone position, records them in memory and eliminates \n+unnecessary data - redundant points and loops, so it always knows \n+the shortest way to home via visited points.\n+ \n+ Copyright night_ghost@ykoctpa.ru 2017\n+ \n+ license GPLV3 or above\n+   \n+*/\n+\n+#include \"AP_WayBack.h\"\n+\n+extern const AP_HAL::HAL& hal;\n+\n+AP_WayBack::Point* AP_WayBack::points;\n+uint16_t          AP_WayBack::max_num_points=0; // size of storage","path":"libraries/AP_WayBack/AP_WayBack.cpp","position":18,"original_position":18,"commit_id":"cb93af469d866bafa87180edd4ceb94f9c72f931","original_commit_id":"cb93af469d866bafa87180edd4ceb94f9c72f931","user":{"login":"night-ghost","id":6255710,"avatar_url":"https://avatars1.githubusercontent.com/u/6255710?v=4","gravatar_id":"","url":"https://api.github.com/users/night-ghost","html_url":"https://github.com/night-ghost","followers_url":"https://api.github.com/users/night-ghost/followers","following_url":"https://api.github.com/users/night-ghost/following{/other_user}","gists_url":"https://api.github.com/users/night-ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/night-ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/night-ghost/subscriptions","organizations_url":"https://api.github.com/users/night-ghost/orgs","repos_url":"https://api.github.com/users/night-ghost/repos","events_url":"https://api.github.com/users/night-ghost/events{/privacy}","received_events_url":"https://api.github.com/users/night-ghost/received_events","type":"User","site_admin":false},"body":"fully-static it can't be because it should work in Ardupilot API. I can add a check to constructor, but this will be the same waste of flash: we have just one AHRS so if anyone (who???) creates 2nd instances then both points will be from one source and will be effectively eliminated. \r\nMoreover this library eats out a lot of memory for points buffer so to allow this memory to be per-instance is a very bad idea.\r\nCodebase is just an existing solutions of some tasks, and not the fact that the ways to solve them will suit all tasks.","created_at":"2017-07-26T11:18:42Z","updated_at":"2017-07-26T11:18:42Z","html_url":"https://github.com/ArduPilot/ardupilot/pull/6675#discussion_r129544662","pull_request_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675","_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/129544662"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/6675#discussion_r129544662"},"pull_request":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675"}}},"pull_request":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675","id":132450538,"html_url":"https://github.com/ArduPilot/ardupilot/pull/6675","diff_url":"https://github.com/ArduPilot/ardupilot/pull/6675.diff","patch_url":"https://github.com/ArduPilot/ardupilot/pull/6675.patch","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/6675","number":6675,"state":"open","locked":false,"title":"wayBack library","user":{"login":"night-ghost","id":6255710,"avatar_url":"https://avatars1.githubusercontent.com/u/6255710?v=4","gravatar_id":"","url":"https://api.github.com/users/night-ghost","html_url":"https://github.com/night-ghost","followers_url":"https://api.github.com/users/night-ghost/followers","following_url":"https://api.github.com/users/night-ghost/following{/other_user}","gists_url":"https://api.github.com/users/night-ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/night-ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/night-ghost/subscriptions","organizations_url":"https://api.github.com/users/night-ghost/orgs","repos_url":"https://api.github.com/users/night-ghost/repos","events_url":"https://api.github.com/users/night-ghost/events{/privacy}","received_events_url":"https://api.github.com/users/night-ghost/received_events","type":"User","site_admin":false},"body":"I can't get working Copter because I can't find a right place to inject points to RTL state machine, but library itself works fine in testing. Needed changes in code can be found by searching \"USE_WAYBACK\"\r\n\r\nUPD. there should be call to wayback.end() somewhere on disarm","created_at":"2017-07-26T07:46:26Z","updated_at":"2017-07-26T11:18:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"393717b99e1655afad74e0f26deb64e5d610ac2f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675/commits","review_comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675/comments","review_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/6675/comments","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/cb93af469d866bafa87180edd4ceb94f9c72f931","head":{"label":"night-ghost:wayBack2","ref":"wayBack2","sha":"cb93af469d866bafa87180edd4ceb94f9c72f931","user":{"login":"night-ghost","id":6255710,"avatar_url":"https://avatars1.githubusercontent.com/u/6255710?v=4","gravatar_id":"","url":"https://api.github.com/users/night-ghost","html_url":"https://github.com/night-ghost","followers_url":"https://api.github.com/users/night-ghost/followers","following_url":"https://api.github.com/users/night-ghost/following{/other_user}","gists_url":"https://api.github.com/users/night-ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/night-ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/night-ghost/subscriptions","organizations_url":"https://api.github.com/users/night-ghost/orgs","repos_url":"https://api.github.com/users/night-ghost/repos","events_url":"https://api.github.com/users/night-ghost/events{/privacy}","received_events_url":"https://api.github.com/users/night-ghost/received_events","type":"User","site_admin":false},"repo":{"id":97218581,"name":"ardupilot","full_name":"night-ghost/ardupilot","owner":{"login":"night-ghost","id":6255710,"avatar_url":"https://avatars1.githubusercontent.com/u/6255710?v=4","gravatar_id":"","url":"https://api.github.com/users/night-ghost","html_url":"https://github.com/night-ghost","followers_url":"https://api.github.com/users/night-ghost/followers","following_url":"https://api.github.com/users/night-ghost/following{/other_user}","gists_url":"https://api.github.com/users/night-ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/night-ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/night-ghost/subscriptions","organizations_url":"https://api.github.com/users/night-ghost/orgs","repos_url":"https://api.github.com/users/night-ghost/repos","events_url":"https://api.github.com/users/night-ghost/events{/privacy}","received_events_url":"https://api.github.com/users/night-ghost/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/night-ghost/ardupilot","description":"ArduPlane, ArduCopter, ArduRover source","fork":true,"url":"https://api.github.com/repos/night-ghost/ardupilot","forks_url":"https://api.github.com/repos/night-ghost/ardupilot/forks","keys_url":"https://api.github.com/repos/night-ghost/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/night-ghost/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/night-ghost/ardupilot/teams","hooks_url":"https://api.github.com/repos/night-ghost/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/night-ghost/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/night-ghost/ardupilot/events","assignees_url":"https://api.github.com/repos/night-ghost/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/night-ghost/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/night-ghost/ardupilot/tags","blobs_url":"https://api.github.com/repos/night-ghost/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/night-ghost/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/night-ghost/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/night-ghost/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/night-ghost/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/night-ghost/ardupilot/languages","stargazers_url":"https://api.github.com/repos/night-ghost/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/night-ghost/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/night-ghost/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/night-ghost/ardupilot/subscription","commits_url":"https://api.github.com/repos/night-ghost/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/night-ghost/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/night-ghost/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/night-ghost/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/night-ghost/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/night-ghost/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/night-ghost/ardupilot/merges","archive_url":"https://api.github.com/repos/night-ghost/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/night-ghost/ardupilot/downloads","issues_url":"https://api.github.com/repos/night-ghost/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/night-ghost/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/night-ghost/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/night-ghost/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/night-ghost/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/night-ghost/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/night-ghost/ardupilot/deployments","created_at":"2017-07-14T09:43:48Z","updated_at":"2017-07-14T21:11:40Z","pushed_at":"2017-07-26T07:39:50Z","git_url":"git://github.com/night-ghost/ardupilot.git","ssh_url":"git@github.com:night-ghost/ardupilot.git","clone_url":"https://github.com/night-ghost/ardupilot.git","svn_url":"https://github.com/night-ghost/ardupilot","homepage":"http://ardupilot.org/","size":140492,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_projects":true,"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":2,"default_branch":"master"}},"base":{"label":"ArduPilot:master","ref":"master","sha":"572df8b8599288d225b9012435ca79edf2cce18a","user":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars3.githubusercontent.com/u/17919847?v=4","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"ArduPilot/ardupilot","owner":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars3.githubusercontent.com/u/17919847?v=4","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArduPilot/ardupilot","description":"ArduPlane, ArduCopter, ArduRover source","fork":false,"url":"https://api.github.com/repos/ArduPilot/ardupilot","forks_url":"https://api.github.com/repos/ArduPilot/ardupilot/forks","keys_url":"https://api.github.com/repos/ArduPilot/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArduPilot/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArduPilot/ardupilot/teams","hooks_url":"https://api.github.com/repos/ArduPilot/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/ArduPilot/ardupilot/events","assignees_url":"https://api.github.com/repos/ArduPilot/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/ArduPilot/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/tags","blobs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/ArduPilot/ardupilot/languages","stargazers_url":"https://api.github.com/repos/ArduPilot/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/ArduPilot/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscription","commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArduPilot/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/ArduPilot/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArduPilot/ardupilot/merges","archive_url":"https://api.github.com/repos/ArduPilot/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArduPilot/ardupilot/downloads","issues_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/ArduPilot/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/ArduPilot/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArduPilot/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/ArduPilot/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/ArduPilot/ardupilot/deployments","created_at":"2013-01-09T00:58:52Z","updated_at":"2017-07-26T06:25:39Z","pushed_at":"2017-07-26T11:02:16Z","git_url":"git://github.com/ArduPilot/ardupilot.git","ssh_url":"git@github.com:ArduPilot/ardupilot.git","clone_url":"https://github.com/ArduPilot/ardupilot.git","svn_url":"https://github.com/ArduPilot/ardupilot","homepage":"http://ardupilot.org/","size":90839,"stargazers_count":2631,"watchers_count":2631,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5470,"mirror_url":null,"open_issues_count":987,"forks":5470,"open_issues":987,"watchers":2631,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/6675"},"issue":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/6675"},"comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/6675/comments"},"review_comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675/comments"},"review_comment":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/6675/commits"},"statuses":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/cb93af469d866bafa87180edd4ceb94f9c72f931"}}}}
{"actor":{"display_login":"night-ghost"}}