{"action":"created","comment":{"url":"https://api.github.com/repos/KSP-KOS/KOS/pulls/comments/25129100","id":25129100,"diff_hunk":"@@ -156,6 +160,88 @@ private bool VesselIsValid(Vessel vessel)\n             return vessel != null && vessel.rootPart != null;\n         }\n \n+        public void SelectAutopilotMode(object autopilotMode)\n+        {\n+            if (autopilotMode is Direction)\n+            {\n+                //TODO: implment use of direction subclasses.","path":"src/kOS/Binding/FlightControlManager.cs","position":35,"original_position":35,"commit_id":"f8c6f44f4370cd22e21942b5bdb32f21921a66a0","original_commit_id":"f8c6f44f4370cd22e21942b5bdb32f21921a66a0","user":{"login":"hvacengi","id":2975036,"avatar_url":"https://avatars.githubusercontent.com/u/2975036?v=3","gravatar_id":"","url":"https://api.github.com/users/hvacengi","html_url":"https://github.com/hvacengi","followers_url":"https://api.github.com/users/hvacengi/followers","following_url":"https://api.github.com/users/hvacengi/following{/other_user}","gists_url":"https://api.github.com/users/hvacengi/gists{/gist_id}","starred_url":"https://api.github.com/users/hvacengi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvacengi/subscriptions","organizations_url":"https://api.github.com/users/hvacengi/orgs","repos_url":"https://api.github.com/users/hvacengi/repos","events_url":"https://api.github.com/users/hvacengi/events{/privacy}","received_events_url":"https://api.github.com/users/hvacengi/received_events","type":"User","site_admin":false},"body":"It is where we will implement a parallel route to the current' steering.  @Dunbaratu and I seem to agree that we don't want to choose an exclusive control option.","created_at":"2015-02-22T04:33:36Z","updated_at":"2015-02-22T04:33:36Z","html_url":"https://github.com/KSP-KOS/KOS/pull/512#discussion_r25129100","pull_request_url":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512","_links":{"self":{"href":"https://api.github.com/repos/KSP-KOS/KOS/pulls/comments/25129100"},"html":{"href":"https://github.com/KSP-KOS/KOS/pull/512#discussion_r25129100"},"pull_request":{"href":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512"}}},"pull_request":{"url":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512","id":27529560,"html_url":"https://github.com/KSP-KOS/KOS/pull/512","diff_url":"https://github.com/KSP-KOS/KOS/pull/512.diff","patch_url":"https://github.com/KSP-KOS/KOS/pull/512.patch","issue_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/512","number":512,"state":"closed","locked":false,"title":"Enable built in autopilot","user":{"login":"hvacengi","id":2975036,"avatar_url":"https://avatars.githubusercontent.com/u/2975036?v=3","gravatar_id":"","url":"https://api.github.com/users/hvacengi","html_url":"https://github.com/hvacengi","followers_url":"https://api.github.com/users/hvacengi/followers","following_url":"https://api.github.com/users/hvacengi/following{/other_user}","gists_url":"https://api.github.com/users/hvacengi/gists{/gist_id}","starred_url":"https://api.github.com/users/hvacengi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvacengi/subscriptions","organizations_url":"https://api.github.com/users/hvacengi/orgs","repos_url":"https://api.github.com/users/hvacengi/repos","events_url":"https://api.github.com/users/hvacengi/events{/privacy}","received_events_url":"https://api.github.com/users/hvacengi/received_events","type":"User","site_admin":false},"body":"This pull request implements using the built in SAS autopilot introduced in KSP version 0.90.  It uses the existing toggleflybywire function.  To toggle a feature on or off, pass the name and the bool state to the function (i.e. \"toggleflybywire(\"prograde\", True).\").\r\n\r\nIn order for the existing function to work properly, some small modifications were required on the compiler (to properly allow a return value to be popped).  The actual implementation itself resides in the FlightControlManager class.  I tried to make the operation resemble the existing implementation for steering operations as much as possible.  Since the base KSP autopilot is handling the actual steering, there is no implementation of a callback function in the FlightTrlParam class.  When enabling a feature the implementation does disable a locked steering command, or any of the other built in autopilot features, and the \"unlock steering.\" command will disable any of the built in autopilot settings.\r\n\r\nAlso implemented is enabling/disabling of SAS damping.  I cannot tell if this is actually doing anything, honestly, but further testing may show it provides some use.\r\n\r\nIn the steering helper, the \"lock steering\" function will now use the vessel's SAS autopilot to lock to the heading if SAS is turned on, rather than the adapted mechjeb implementation that is traditional.  In my experience, there are some times where the original implementation is better, other instances where the autopilot implementation is better, and still more instances where neither is robust enough.  I like this option as it gives users two paths to engage the autopilot without requiring a full PID implementation and without making the autopilot too good.  \r\n\r\nI did not want to get into re-writing anything language wise, so these features all fit into the existing code structure.  They can of course be moved to another structure, if it makes it would fit better with the overall structure of the language or if it would simply be a better implementation.  I will leave these modifications to those who maintain the kos language base however.  This is not based on the most recent version of the development branch, but it does not conflict with any of the changes made while I worked on the code.  I did not want to run into a conflict with one of the other features being implemented causing a bug.","created_at":"2015-01-16T19:23:51Z","updated_at":"2015-02-22T04:33:36Z","closed_at":"2015-02-22T04:28:52Z","merged_at":"2015-02-22T04:28:52Z","merge_commit_sha":"ebb3fcce736b9fb34862c8a371f59e940d0bc816","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512/commits","review_comments_url":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512/comments","review_comment_url":"https://api.github.com/repos/KSP-KOS/KOS/pulls/comments/{number}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/512/comments","statuses_url":"https://api.github.com/repos/KSP-KOS/KOS/statuses/f8c6f44f4370cd22e21942b5bdb32f21921a66a0","head":{"label":"hvacengi:Enable-builtin-autopilot","ref":"Enable-builtin-autopilot","sha":"f8c6f44f4370cd22e21942b5bdb32f21921a66a0","user":{"login":"hvacengi","id":2975036,"avatar_url":"https://avatars.githubusercontent.com/u/2975036?v=3","gravatar_id":"","url":"https://api.github.com/users/hvacengi","html_url":"https://github.com/hvacengi","followers_url":"https://api.github.com/users/hvacengi/followers","following_url":"https://api.github.com/users/hvacengi/following{/other_user}","gists_url":"https://api.github.com/users/hvacengi/gists{/gist_id}","starred_url":"https://api.github.com/users/hvacengi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvacengi/subscriptions","organizations_url":"https://api.github.com/users/hvacengi/orgs","repos_url":"https://api.github.com/users/hvacengi/repos","events_url":"https://api.github.com/users/hvacengi/events{/privacy}","received_events_url":"https://api.github.com/users/hvacengi/received_events","type":"User","site_admin":false},"repo":{"id":26549053,"name":"KOS","full_name":"hvacengi/KOS","owner":{"login":"hvacengi","id":2975036,"avatar_url":"https://avatars.githubusercontent.com/u/2975036?v=3","gravatar_id":"","url":"https://api.github.com/users/hvacengi","html_url":"https://github.com/hvacengi","followers_url":"https://api.github.com/users/hvacengi/followers","following_url":"https://api.github.com/users/hvacengi/following{/other_user}","gists_url":"https://api.github.com/users/hvacengi/gists{/gist_id}","starred_url":"https://api.github.com/users/hvacengi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvacengi/subscriptions","organizations_url":"https://api.github.com/users/hvacengi/orgs","repos_url":"https://api.github.com/users/hvacengi/repos","events_url":"https://api.github.com/users/hvacengi/events{/privacy}","received_events_url":"https://api.github.com/users/hvacengi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hvacengi/KOS","description":"Fully programmable autopilot mod for KSP. Originally By Nivekk","fork":true,"url":"https://api.github.com/repos/hvacengi/KOS","forks_url":"https://api.github.com/repos/hvacengi/KOS/forks","keys_url":"https://api.github.com/repos/hvacengi/KOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hvacengi/KOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hvacengi/KOS/teams","hooks_url":"https://api.github.com/repos/hvacengi/KOS/hooks","issue_events_url":"https://api.github.com/repos/hvacengi/KOS/issues/events{/number}","events_url":"https://api.github.com/repos/hvacengi/KOS/events","assignees_url":"https://api.github.com/repos/hvacengi/KOS/assignees{/user}","branches_url":"https://api.github.com/repos/hvacengi/KOS/branches{/branch}","tags_url":"https://api.github.com/repos/hvacengi/KOS/tags","blobs_url":"https://api.github.com/repos/hvacengi/KOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hvacengi/KOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hvacengi/KOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/hvacengi/KOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hvacengi/KOS/statuses/{sha}","languages_url":"https://api.github.com/repos/hvacengi/KOS/languages","stargazers_url":"https://api.github.com/repos/hvacengi/KOS/stargazers","contributors_url":"https://api.github.com/repos/hvacengi/KOS/contributors","subscribers_url":"https://api.github.com/repos/hvacengi/KOS/subscribers","subscription_url":"https://api.github.com/repos/hvacengi/KOS/subscription","commits_url":"https://api.github.com/repos/hvacengi/KOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/hvacengi/KOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/hvacengi/KOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/hvacengi/KOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/hvacengi/KOS/contents/{+path}","compare_url":"https://api.github.com/repos/hvacengi/KOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hvacengi/KOS/merges","archive_url":"https://api.github.com/repos/hvacengi/KOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hvacengi/KOS/downloads","issues_url":"https://api.github.com/repos/hvacengi/KOS/issues{/number}","pulls_url":"https://api.github.com/repos/hvacengi/KOS/pulls{/number}","milestones_url":"https://api.github.com/repos/hvacengi/KOS/milestones{/number}","notifications_url":"https://api.github.com/repos/hvacengi/KOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hvacengi/KOS/labels{/name}","releases_url":"https://api.github.com/repos/hvacengi/KOS/releases{/id}","created_at":"2014-11-12T18:06:19Z","updated_at":"2014-11-21T17:29:09Z","pushed_at":"2015-02-20T04:19:29Z","git_url":"git://github.com/hvacengi/KOS.git","ssh_url":"git@github.com:hvacengi/KOS.git","clone_url":"https://github.com/hvacengi/KOS.git","svn_url":"https://github.com/hvacengi/KOS","homepage":null,"size":24013,"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":"KSP-KOS:develop","ref":"develop","sha":"c11c5e5e40117618bb0b7c2ebd6dd9eee842484a","user":{"login":"KSP-KOS","id":6767371,"avatar_url":"https://avatars.githubusercontent.com/u/6767371?v=3","gravatar_id":"","url":"https://api.github.com/users/KSP-KOS","html_url":"https://github.com/KSP-KOS","followers_url":"https://api.github.com/users/KSP-KOS/followers","following_url":"https://api.github.com/users/KSP-KOS/following{/other_user}","gists_url":"https://api.github.com/users/KSP-KOS/gists{/gist_id}","starred_url":"https://api.github.com/users/KSP-KOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSP-KOS/subscriptions","organizations_url":"https://api.github.com/users/KSP-KOS/orgs","repos_url":"https://api.github.com/users/KSP-KOS/repos","events_url":"https://api.github.com/users/KSP-KOS/events{/privacy}","received_events_url":"https://api.github.com/users/KSP-KOS/received_events","type":"Organization","site_admin":false},"repo":{"id":17217530,"name":"KOS","full_name":"KSP-KOS/KOS","owner":{"login":"KSP-KOS","id":6767371,"avatar_url":"https://avatars.githubusercontent.com/u/6767371?v=3","gravatar_id":"","url":"https://api.github.com/users/KSP-KOS","html_url":"https://github.com/KSP-KOS","followers_url":"https://api.github.com/users/KSP-KOS/followers","following_url":"https://api.github.com/users/KSP-KOS/following{/other_user}","gists_url":"https://api.github.com/users/KSP-KOS/gists{/gist_id}","starred_url":"https://api.github.com/users/KSP-KOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSP-KOS/subscriptions","organizations_url":"https://api.github.com/users/KSP-KOS/orgs","repos_url":"https://api.github.com/users/KSP-KOS/repos","events_url":"https://api.github.com/users/KSP-KOS/events{/privacy}","received_events_url":"https://api.github.com/users/KSP-KOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KSP-KOS/KOS","description":"Fully programmable autopilot mod for KSP. Originally By Nivekk","fork":false,"url":"https://api.github.com/repos/KSP-KOS/KOS","forks_url":"https://api.github.com/repos/KSP-KOS/KOS/forks","keys_url":"https://api.github.com/repos/KSP-KOS/KOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KSP-KOS/KOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KSP-KOS/KOS/teams","hooks_url":"https://api.github.com/repos/KSP-KOS/KOS/hooks","issue_events_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/events{/number}","events_url":"https://api.github.com/repos/KSP-KOS/KOS/events","assignees_url":"https://api.github.com/repos/KSP-KOS/KOS/assignees{/user}","branches_url":"https://api.github.com/repos/KSP-KOS/KOS/branches{/branch}","tags_url":"https://api.github.com/repos/KSP-KOS/KOS/tags","blobs_url":"https://api.github.com/repos/KSP-KOS/KOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KSP-KOS/KOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KSP-KOS/KOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/KSP-KOS/KOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KSP-KOS/KOS/statuses/{sha}","languages_url":"https://api.github.com/repos/KSP-KOS/KOS/languages","stargazers_url":"https://api.github.com/repos/KSP-KOS/KOS/stargazers","contributors_url":"https://api.github.com/repos/KSP-KOS/KOS/contributors","subscribers_url":"https://api.github.com/repos/KSP-KOS/KOS/subscribers","subscription_url":"https://api.github.com/repos/KSP-KOS/KOS/subscription","commits_url":"https://api.github.com/repos/KSP-KOS/KOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/KSP-KOS/KOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/KSP-KOS/KOS/contents/{+path}","compare_url":"https://api.github.com/repos/KSP-KOS/KOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KSP-KOS/KOS/merges","archive_url":"https://api.github.com/repos/KSP-KOS/KOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KSP-KOS/KOS/downloads","issues_url":"https://api.github.com/repos/KSP-KOS/KOS/issues{/number}","pulls_url":"https://api.github.com/repos/KSP-KOS/KOS/pulls{/number}","milestones_url":"https://api.github.com/repos/KSP-KOS/KOS/milestones{/number}","notifications_url":"https://api.github.com/repos/KSP-KOS/KOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KSP-KOS/KOS/labels{/name}","releases_url":"https://api.github.com/repos/KSP-KOS/KOS/releases{/id}","created_at":"2014-02-26T16:43:31Z","updated_at":"2015-02-22T04:28:54Z","pushed_at":"2015-02-22T04:28:52Z","git_url":"git://github.com/KSP-KOS/KOS.git","ssh_url":"git@github.com:KSP-KOS/KOS.git","clone_url":"https://github.com/KSP-KOS/KOS.git","svn_url":"https://github.com/KSP-KOS/KOS","homepage":null,"size":27617,"stargazers_count":73,"watchers_count":73,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":128,"forks":47,"open_issues":128,"watchers":73,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512"},"html":{"href":"https://github.com/KSP-KOS/KOS/pull/512"},"issue":{"href":"https://api.github.com/repos/KSP-KOS/KOS/issues/512"},"comments":{"href":"https://api.github.com/repos/KSP-KOS/KOS/issues/512/comments"},"review_comments":{"href":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512/comments"},"review_comment":{"href":"https://api.github.com/repos/KSP-KOS/KOS/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/KSP-KOS/KOS/pulls/512/commits"},"statuses":{"href":"https://api.github.com/repos/KSP-KOS/KOS/statuses/f8c6f44f4370cd22e21942b5bdb32f21921a66a0"}}}}