{"action":"created","comment":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/comments/36657665","id":36657665,"diff_hunk":"@@ -218,47 +231,77 @@ void Tiltrotor::process_mc_data()\n \t\tset_idle_fw();\n \t\tflag_idle_mc = false;\n \t}\n- }\n \n-void Tiltrotor::process_fw_data()\n-{\n-\tfill_att_control_output();\n-}\n+\t_mc_roll_weight = 0.0f;\n+\t_mc_pitch_weight = 0.0f;\n+\t_mc_yaw_weight = 0.0f;\n+ }\n \n void Tiltrotor::update_transition_state()\n {\n+\tif (!_flag_was_in_trans_mode) {\n+\t\t// save desired heading for transition and last thrust value\n+\t\t_yaw_transition = _v_att->yaw;\n+\t\t_throttle_transition = _actuators_mc_in->control[actuator_controls_s::INDEX_THROTTLE];\n+\t\t_flag_was_in_trans_mode = true;\n+\t}\n \tif (_vtol_schedule.flight_mode == TRANSITION_FRONT_P1) {\n+\t\t// for the first part of the transition the rear rotors are enabled\n+\t\tif (_rear_motors != ENABLED) {\n+\t\t\tset_rear_motor_state(ENABLED);\n+\t\t}\n \t\t// tilt rotors forward up to certain angle\n-\t\tif (_params_tiltrotor.front_trans_dur <= 0.0f) {\n-\t\t\t_tilt_control = _params_tiltrotor.tilt_transition;\n-\t\t} else if (_tilt_control <= _params_tiltrotor.tilt_transition) {\n-\t\t\t_tilt_control = _params_tiltrotor.tilt_mc + fabsf(_params_tiltrotor.tilt_transition - _params_tiltrotor.tilt_mc) * \n-\t\t\t\t\t\t(float) hrt_elapsed_time(&_vtol_schedule.transition_start) / (_params_tiltrotor.front_trans_dur * 1000000.0f);\n+\t\tif (_tilt_control <= _params_tiltrotor.tilt_transition) {\n+\t\t\t_tilt_control = _params_tiltrotor.tilt_mc +  fabsf(_params_tiltrotor.tilt_transition - _params_tiltrotor.tilt_mc)*(float)hrt_elapsed_time(&_vtol_schedule.transition_start)/(_params_tiltrotor.front_trans_dur*1000000.0f);","path":"src/modules/vtol_att_control/tiltrotor.cpp","position":237,"original_position":237,"commit_id":"15a02a9944ae491f5c36e5a41ca60a4e74003152","original_commit_id":"15a02a9944ae491f5c36e5a41ca60a4e74003152","user":{"login":"bansiesta","id":10187973,"avatar_url":"https://avatars.githubusercontent.com/u/10187973?v=3","gravatar_id":"","url":"https://api.github.com/users/bansiesta","html_url":"https://github.com/bansiesta","followers_url":"https://api.github.com/users/bansiesta/followers","following_url":"https://api.github.com/users/bansiesta/following{/other_user}","gists_url":"https://api.github.com/users/bansiesta/gists{/gist_id}","starred_url":"https://api.github.com/users/bansiesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansiesta/subscriptions","organizations_url":"https://api.github.com/users/bansiesta/orgs","repos_url":"https://api.github.com/users/bansiesta/repos","events_url":"https://api.github.com/users/bansiesta/events{/privacy}","received_events_url":"https://api.github.com/users/bansiesta/received_events","type":"User","site_admin":false},"body":"Also way too long...","created_at":"2015-08-10T17:18:37Z","updated_at":"2015-08-10T17:18:37Z","html_url":"https://github.com/PX4/Firmware/pull/2664#discussion_r36657665","pull_request_url":"https://api.github.com/repos/PX4/Firmware/pulls/2664","_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments/36657665"},"html":{"href":"https://github.com/PX4/Firmware/pull/2664#discussion_r36657665"},"pull_request":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/2664"}}},"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/2664","id":42026480,"html_url":"https://github.com/PX4/Firmware/pull/2664","diff_url":"https://github.com/PX4/Firmware/pull/2664.diff","patch_url":"https://github.com/PX4/Firmware/pull/2664.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/2664","number":2664,"state":"open","locked":false,"title":"WIP: VTOL transitioning","user":{"login":"tumbili","id":7610489,"avatar_url":"https://avatars.githubusercontent.com/u/7610489?v=3","gravatar_id":"","url":"https://api.github.com/users/tumbili","html_url":"https://github.com/tumbili","followers_url":"https://api.github.com/users/tumbili/followers","following_url":"https://api.github.com/users/tumbili/following{/other_user}","gists_url":"https://api.github.com/users/tumbili/gists{/gist_id}","starred_url":"https://api.github.com/users/tumbili/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tumbili/subscriptions","organizations_url":"https://api.github.com/users/tumbili/orgs","repos_url":"https://api.github.com/users/tumbili/repos","events_url":"https://api.github.com/users/tumbili/events{/privacy}","received_events_url":"https://api.github.com/users/tumbili/received_events","type":"User","site_admin":false},"body":"During a transition of the VTOL the attitude control module should publish the desired attitude setpoint, not any of the fixed wing or multicopter modules. A very simple transition strategy has only been implemented for the tiltrotor now.\r\nThe diff looks big but that's because the vtol_cleanup branch has not been merged into master yet.\r\nThis will need heavy bench testing first!!!","created_at":"2015-08-10T14:34:59Z","updated_at":"2015-08-10T17:18:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc4b07ce18a9c2a53382c72037ed4f5af0f9d98e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/2664/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/2664/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/2664/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/15a02a9944ae491f5c36e5a41ca60a4e74003152","head":{"label":"PX4:vtol_transition","ref":"vtol_transition","sha":"15a02a9944ae491f5c36e5a41ca60a4e74003152","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 Pixhawk Hardware","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-08-10T14:29:01Z","pushed_at":"2015-08-10T17:17:03Z","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://px4.io","size":162127,"stargazers_count":371,"watchers_count":371,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1343,"mirror_url":null,"open_issues_count":188,"forks":1343,"open_issues":188,"watchers":371,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"24fdb5d532810237c2b2fb6338cfa6b74b04be06","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 Pixhawk Hardware","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-08-10T14:29:01Z","pushed_at":"2015-08-10T17:17:03Z","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://px4.io","size":162127,"stargazers_count":371,"watchers_count":371,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1343,"mirror_url":null,"open_issues_count":188,"forks":1343,"open_issues":188,"watchers":371,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/2664"},"html":{"href":"https://github.com/PX4/Firmware/pull/2664"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/2664"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/2664/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/2664/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/2664/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/15a02a9944ae491f5c36e5a41ca60a4e74003152"}}}}