{"action":"opened","number":1524,"pull_request":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1524","id":34397573,"html_url":"https://github.com/mavlink/qgroundcontrol/pull/1524","diff_url":"https://github.com/mavlink/qgroundcontrol/pull/1524.diff","patch_url":"https://github.com/mavlink/qgroundcontrol/pull/1524.patch","issue_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1524","number":1524,"state":"open","locked":false,"title":"New Custom Command Widget","user":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars.githubusercontent.com/u/5876851?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"body":"This allows you to build your own custom command widgets using Qml. You can access the new widgets from the menu.\r\n\r\nYou must be connected to a vehicle to get this:\r\n![screen shot 2015-04-29 at 12 25 33 pm](https://cloud.githubusercontent.com/assets/5876851/7399495/3a1ca078-ee6b-11e4-8996-1ebc2b2ee78c.png)\r\n\r\nHere is the example file running:\r\n![screen shot 2015-04-29 at 12 26 04 pm](https://cloud.githubusercontent.com/assets/5876851/7399499/4673adb2-ee6b-11e4-93d2-bb79824d6fa6.png)\r\n\r\nIf youre Qml has errors, it shows up in the widget like this:\r\n![screen shot 2015-04-29 at 12 26 53 pm](https://cloud.githubusercontent.com/assets/5876851/7399511/579eec78-ee6b-11e4-8e8a-04aa6d7a275a.png)\r\n\r\nHere is the example Qml file from the wiki:\r\n```javascript\r\n// This is an example Custom Command Qml file. You have full access to the entire Qml language\r\n// for creating any user interface you like. From the ui you can affect the following changes\r\n// with respect to your vehicle:\r\n//    1) Sending COMMAND_LONG commands out over mavlink using QGCButton control\r\n//    2) Modifying parameters\r\n//\r\n// When developing custom Qml file implementations. You must restart QGroundControl to pick up\r\n// the changes. You need to do this even if you select Clear Qml file. Not sure what at the this\r\n// point. Qt must be caching the files somewhere.\r\n\r\nimport QtQuick 2.2\r\n\r\nimport QGroundControl.Controls 1.0\r\nimport QGroundControl.FactSystem 1.0\r\nimport QGroundControl.FactControls 1.0\r\n\r\nItem {\r\n\r\n    // Your own custom changes start here - everything else above is always required\r\n\r\n    Column {\r\n        // The QGCButton control is provided by QGroundControl.Controls. It is a wrapper around\r\n        // the standard Qml Button element which using the default QGC font and color palette.\r\n\r\n        QGCButton {\r\n            text: \"Set Home to current position\"\r\n            onClicked: controller.sendCommand(179, 50, 0, 1, 0, 0, 0, 0, 0, 0)\r\n        }\r\n\r\n        // The FactTextField control is provides by GroundControl.FactControls. It is a wrapper\r\n        // around the Qml TextField element which allows you to bind it directly to any parameter.\r\n        // The parameter is changed automatically when you click enter or click away from the field.\r\n        // Understand that there is currently no value validation. So you may crash your vehicle by\r\n        // setting a parameter to an incorrect value. Validation will come in the future.\r\n\r\n        // Be very careful when referencing parameters. If you specify a parameter which does not exist\r\n        // QGroundControl will warn and shutdown.\r\n\r\n        FactTextField {\r\n            fact: Fact { name: \"MAV_SYS_ID\" }\r\n        }\r\n    }\r\n\r\n    // Your own custom changes end here - everything else below is always required\r\n}\r\n```","created_at":"2015-04-29T19:32:16Z","updated_at":"2015-04-29T19:32:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1524/commits","review_comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1524/comments","review_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1524/comments","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/431c244291a0094af23936e954e2af0a216372a1","head":{"label":"DonLakeFlyer:CommandWidgetWork","ref":"CommandWidgetWork","sha":"431c244291a0094af23936e954e2af0a216372a1","user":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars.githubusercontent.com/u/5876851?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"repo":{"id":14323257,"name":"qgroundcontrol","full_name":"DonLakeFlyer/qgroundcontrol","owner":{"login":"DonLakeFlyer","id":5876851,"avatar_url":"https://avatars.githubusercontent.com/u/5876851?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLakeFlyer","html_url":"https://github.com/DonLakeFlyer","followers_url":"https://api.github.com/users/DonLakeFlyer/followers","following_url":"https://api.github.com/users/DonLakeFlyer/following{/other_user}","gists_url":"https://api.github.com/users/DonLakeFlyer/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLakeFlyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLakeFlyer/subscriptions","organizations_url":"https://api.github.com/users/DonLakeFlyer/orgs","repos_url":"https://api.github.com/users/DonLakeFlyer/repos","events_url":"https://api.github.com/users/DonLakeFlyer/events{/privacy}","received_events_url":"https://api.github.com/users/DonLakeFlyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DonLakeFlyer/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":true,"url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol","forks_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/DonLakeFlyer/qgroundcontrol/releases{/id}","created_at":"2013-11-12T05:24:25Z","updated_at":"2015-04-28T16:41:32Z","pushed_at":"2015-04-29T19:25:14Z","git_url":"git://github.com/DonLakeFlyer/qgroundcontrol.git","ssh_url":"git@github.com:DonLakeFlyer/qgroundcontrol.git","clone_url":"https://github.com/DonLakeFlyer/qgroundcontrol.git","svn_url":"https://github.com/DonLakeFlyer/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":160058,"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":"mavlink:master","ref":"master","sha":"97568cf4bd25591dab5564c5a86f8e69f38905c6","user":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"repo":{"id":2567844,"name":"qgroundcontrol","full_name":"mavlink/qgroundcontrol","owner":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mavlink/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":false,"url":"https://api.github.com/repos/mavlink/qgroundcontrol","forks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/mavlink/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavlink/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavlink/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/mavlink/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/mavlink/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/mavlink/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavlink/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/mavlink/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavlink/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/mavlink/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/mavlink/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavlink/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/mavlink/qgroundcontrol/releases{/id}","created_at":"2011-10-13T07:31:07Z","updated_at":"2015-04-29T02:22:41Z","pushed_at":"2015-04-29T19:20:13Z","git_url":"git://github.com/mavlink/qgroundcontrol.git","ssh_url":"git@github.com:mavlink/qgroundcontrol.git","clone_url":"https://github.com/mavlink/qgroundcontrol.git","svn_url":"https://github.com/mavlink/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":180218,"stargazers_count":204,"watchers_count":204,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":298,"mirror_url":null,"open_issues_count":173,"forks":298,"open_issues":173,"watchers":204,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1524"},"html":{"href":"https://github.com/mavlink/qgroundcontrol/pull/1524"},"issue":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1524"},"comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1524/comments"},"review_comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1524/comments"},"review_comment":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1524/commits"},"statuses":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/431c244291a0094af23936e954e2af0a216372a1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":324,"deletions":0,"changed_files":10}}