GitHub PullRequestReviewCommentEvent at 2014-11-21 13:04:35
Repository: baseflight
Actor: trollcop
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/multiwii/baseflight/pulls/comments/20713161","id":20713161,"diff_hunk":"@@ -160,12 +162,84 @@ const mixer_t mixers[] = {\n     { 4, 0, mixerVtail4 },         // MULTITYPE_VTAIL4\r\n     { 6, 0, mixerHex6H },          // MULTITYPE_HEX6H\r\n     { 0, 1, NULL },                // * MULTITYPE_PPM_TO_SERVO\r\n-    { 2, 1, mixerDualcopter  },    // MULTITYPE_DUALCOPTER\r\n+    { 2, 1, mixerDualcopter },     // MULTITYPE_DUALCOPTER\r\n     { 1, 1, NULL },                // MULTITYPE_SINGLECOPTER\r\n     { 4, 0, mixerAtail4 },         // MULTITYPE_ATAIL4\r\n     { 0, 0, NULL },                // MULTITYPE_CUSTOM\r\n+    { 1, 1, NULL },                // MULTITYPE_CUSTOM_PLANE\r\n };\r\n \r\n+// mixer rule format servo, input, rate, speed, min, max, box\r\n+static const servoMixer_t servoMixerAirplane[] = {\r\n+    {3, INPUT_ROLL, 100, 0, -480, 500, 0},\r\n+    {4, INPUT_ROLL, 100, 0, -480, 500, 0},\r\n+    {5, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {6, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+};\r\n+\r\n+static const servoMixer_t servoMixerFlyingWing[] = {\r\n+    {3, INPUT_ROLL, 100, 0, -480, 500, 0},\r\n+    {3, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+    {4, INPUT_ROLL, 100, 0, -480, 500, 0},\r\n+    {4, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+};\r\n+\r\n+static const servoMixer_t servoMixerBI[] = {\r\n+    {4, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {4, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+    {5, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {5, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+};\r\n+\r\n+static const servoMixer_t servoMixerTri[] = {\r\n+    {5, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+};\r\n+\r\n+static const servoMixer_t servoMixerDual[] = {\r\n+    {4, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+    {5, INPUT_ROLL, 100, 0, -480, 500, 0},\r\n+};\r\n+\r\n+static const servoMixer_t servoMixerSingle[] = {\r\n+    {3, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {3, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+    {4, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {4, INPUT_PITCH, 100, 0, -480, 500, 0},\r\n+    {5, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {5, INPUT_ROLL, 100, 0, -480, 500, 0},\r\n+    {6, INPUT_YAW, 100, 0, -480, 500, 0},\r\n+    {6, INPUT_ROLL, 100, 0, -480, 500, 0},\r","path":"src/mixer.c","position":65,"original_position":65,"commit_id":"f71f4b8aaf910754a580bde743ea803be027b0e9","original_commit_id":"f71f4b8aaf910754a580bde743ea803be027b0e9","user":{"login":"trollcop","id":4640472,"avatar_url":"https://avatars.githubusercontent.com/u/4640472?v=3","gravatar_id":"","url":"https://api.github.com/users/trollcop","html_url":"https://github.com/trollcop","followers_url":"https://api.github.com/users/trollcop/followers","following_url":"https://api.github.com/users/trollcop/following{/other_user}","gists_url":"https://api.github.com/users/trollcop/gists{/gist_id}","starred_url":"https://api.github.com/users/trollcop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trollcop/subscriptions","organizations_url":"https://api.github.com/users/trollcop/orgs","repos_url":"https://api.github.com/users/trollcop/repos","events_url":"https://api.github.com/users/trollcop/events{/privacy}","received_events_url":"https://api.github.com/users/trollcop/received_events","type":"User","site_admin":false},"body":"Now that I kind of see the reason for 500, etc, is there any reason these numbers are chosen, and not say % of some range? It's not like there's going to be that much accuracy with a $3 servo?","created_at":"2014-11-21T13:04:35Z","updated_at":"2014-11-21T13:04:35Z","html_url":"https://github.com/multiwii/baseflight/pull/205#discussion_r20713161","pull_request_url":"https://api.github.com/repos/multiwii/baseflight/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/multiwii/baseflight/pulls/comments/20713161"},"html":{"href":"https://github.com/multiwii/baseflight/pull/205#discussion_r20713161"},"pull_request":{"href":"https://api.github.com/repos/multiwii/baseflight/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/multiwii/baseflight/pulls/205","id":24781737,"html_url":"https://github.com/multiwii/baseflight/pull/205","diff_url":"https://github.com/multiwii/baseflight/pull/205.diff","patch_url":"https://github.com/multiwii/baseflight/pull/205.patch","issue_url":"https://api.github.com/repos/multiwii/baseflight/issues/205","number":205,"state":"open","locked":false,"title":"New Servomixer","user":{"login":"schugabe","id":138686,"avatar_url":"https://avatars.githubusercontent.com/u/138686?v=3","gravatar_id":"","url":"https://api.github.com/users/schugabe","html_url":"https://github.com/schugabe","followers_url":"https://api.github.com/users/schugabe/followers","following_url":"https://api.github.com/users/schugabe/following{/other_user}","gists_url":"https://api.github.com/users/schugabe/gists{/gist_id}","starred_url":"https://api.github.com/users/schugabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schugabe/subscriptions","organizations_url":"https://api.github.com/users/schugabe/orgs","repos_url":"https://api.github.com/users/schugabe/repos","events_url":"https://api.github.com/users/schugabe/events{/privacy}","received_events_url":"https://api.github.com/users/schugabe/received_events","type":"User","site_admin":false},"body":"This PR replaces the old servo mixing with a new mixer. It unifies the servo mixing to a general rule based servo mixing. For the default mixers the rules are preset - for the new custom plane mixer the user can change the rules via cli (command csmix).\r\n\r\nEach rule adds a certain input (with a rate/speed/min/max/direction setting) to a servo. A simple example would be a aileron with flaperon support: two rules are needed. One for mixing in the roll input and one for mixing in a AUX channel. Examples can be seen in mixer.c\r\n\r\nThe servo direction for pitch/roll/yaw was encoded in the rate field. This has been replaced by a direction field that defines how a servo reacts to a input (can be modified with the servo_direction command).\r\nTo be compatible with the current configurator I implemented a function that translates the old rate encoded direction setting to the new storage.\r\n\r\nEach rule has a min/max limit, can be speed limited and has a rate so the influence of the input can be configured. Additionally the rules can be activated/deactivated with boxes e.g. during RTH no flaps should be used => the flaps rules can be deactivated via the boxes.","created_at":"2014-11-20T17:15:53Z","updated_at":"2014-11-21T13:04:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2224abd4300a596449b8c988dcd61fcf0ffc5d4a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/multiwii/baseflight/pulls/205/commits","review_comments_url":"https://api.github.com/repos/multiwii/baseflight/pulls/205/comments","review_comment_url":"https://api.github.com/repos/multiwii/baseflight/pulls/comments/{number}","comments_url":"https://api.github.com/repos/multiwii/baseflight/issues/205/comments","statuses_url":"https://api.github.com/repos/multiwii/baseflight/statuses/f71f4b8aaf910754a580bde743ea803be027b0e9","head":{"label":"schugabe:servomixer","ref":"servomixer","sha":"f71f4b8aaf910754a580bde743ea803be027b0e9","user":{"login":"schugabe","id":138686,"avatar_url":"https://avatars.githubusercontent.com/u/138686?v=3","gravatar_id":"","url":"https://api.github.com/users/schugabe","html_url":"https://github.com/schugabe","followers_url":"https://api.github.com/users/schugabe/followers","following_url":"https://api.github.com/users/schugabe/following{/other_user}","gists_url":"https://api.github.com/users/schugabe/gists{/gist_id}","starred_url":"https://api.github.com/users/schugabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schugabe/subscriptions","organizations_url":"https://api.github.com/users/schugabe/orgs","repos_url":"https://api.github.com/users/schugabe/repos","events_url":"https://api.github.com/users/schugabe/events{/privacy}","received_events_url":"https://api.github.com/users/schugabe/received_events","type":"User","site_admin":false},"repo":{"id":14199884,"name":"baseflight","full_name":"schugabe/baseflight","owner":{"login":"schugabe","id":138686,"avatar_url":"https://avatars.githubusercontent.com/u/138686?v=3","gravatar_id":"","url":"https://api.github.com/users/schugabe","html_url":"https://github.com/schugabe","followers_url":"https://api.github.com/users/schugabe/followers","following_url":"https://api.github.com/users/schugabe/following{/other_user}","gists_url":"https://api.github.com/users/schugabe/gists{/gist_id}","starred_url":"https://api.github.com/users/schugabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schugabe/subscriptions","organizations_url":"https://api.github.com/users/schugabe/orgs","repos_url":"https://api.github.com/users/schugabe/repos","events_url":"https://api.github.com/users/schugabe/events{/privacy}","received_events_url":"https://api.github.com/users/schugabe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schugabe/baseflight","description":"32 bit fork of the MultiWii RC flight controller firmware","fork":true,"url":"https://api.github.com/repos/schugabe/baseflight","forks_url":"https://api.github.com/repos/schugabe/baseflight/forks","keys_url":"https://api.github.com/repos/schugabe/baseflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schugabe/baseflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schugabe/baseflight/teams","hooks_url":"https://api.github.com/repos/schugabe/baseflight/hooks","issue_events_url":"https://api.github.com/repos/schugabe/baseflight/issues/events{/number}","events_url":"https://api.github.com/repos/schugabe/baseflight/events","assignees_url":"https://api.github.com/repos/schugabe/baseflight/assignees{/user}","branches_url":"https://api.github.com/repos/schugabe/baseflight/branches{/branch}","tags_url":"https://api.github.com/repos/schugabe/baseflight/tags","blobs_url":"https://api.github.com/repos/schugabe/baseflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schugabe/baseflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schugabe/baseflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/schugabe/baseflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schugabe/baseflight/statuses/{sha}","languages_url":"https://api.github.com/repos/schugabe/baseflight/languages","stargazers_url":"https://api.github.com/repos/schugabe/baseflight/stargazers","contributors_url":"https://api.github.com/repos/schugabe/baseflight/contributors","subscribers_url":"https://api.github.com/repos/schugabe/baseflight/subscribers","subscription_url":"https://api.github.com/repos/schugabe/baseflight/subscription","commits_url":"https://api.github.com/repos/schugabe/baseflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/schugabe/baseflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/schugabe/baseflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/schugabe/baseflight/issues/comments/{number}","contents_url":"https://api.github.com/repos/schugabe/baseflight/contents/{+path}","compare_url":"https://api.github.com/repos/schugabe/baseflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schugabe/baseflight/merges","archive_url":"https://api.github.com/repos/schugabe/baseflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schugabe/baseflight/downloads","issues_url":"https://api.github.com/repos/schugabe/baseflight/issues{/number}","pulls_url":"https://api.github.com/repos/schugabe/baseflight/pulls{/number}","milestones_url":"https://api.github.com/repos/schugabe/baseflight/milestones{/number}","notifications_url":"https://api.github.com/repos/schugabe/baseflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schugabe/baseflight/labels{/name}","releases_url":"https://api.github.com/repos/schugabe/baseflight/releases{/id}","created_at":"2013-11-07T09:47:35Z","updated_at":"2014-10-02T22:19:06Z","pushed_at":"2014-11-20T17:34:32Z","git_url":"git://github.com/schugabe/baseflight.git","ssh_url":"git@github.com:schugabe/baseflight.git","clone_url":"https://github.com/schugabe/baseflight.git","svn_url":"https://github.com/schugabe/baseflight","homepage":null,"size":11384,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"multiwii:master","ref":"master","sha":"6f03109a3604565150d4b6944627ae795fa8543c","user":{"login":"multiwii","id":2006666,"avatar_url":"https://avatars.githubusercontent.com/u/2006666?v=3","gravatar_id":"","url":"https://api.github.com/users/multiwii","html_url":"https://github.com/multiwii","followers_url":"https://api.github.com/users/multiwii/followers","following_url":"https://api.github.com/users/multiwii/following{/other_user}","gists_url":"https://api.github.com/users/multiwii/gists{/gist_id}","starred_url":"https://api.github.com/users/multiwii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/multiwii/subscriptions","organizations_url":"https://api.github.com/users/multiwii/orgs","repos_url":"https://api.github.com/users/multiwii/repos","events_url":"https://api.github.com/users/multiwii/events{/privacy}","received_events_url":"https://api.github.com/users/multiwii/received_events","type":"Organization","site_admin":false},"repo":{"id":5689182,"name":"baseflight","full_name":"multiwii/baseflight","owner":{"login":"multiwii","id":2006666,"avatar_url":"https://avatars.githubusercontent.com/u/2006666?v=3","gravatar_id":"","url":"https://api.github.com/users/multiwii","html_url":"https://github.com/multiwii","followers_url":"https://api.github.com/users/multiwii/followers","following_url":"https://api.github.com/users/multiwii/following{/other_user}","gists_url":"https://api.github.com/users/multiwii/gists{/gist_id}","starred_url":"https://api.github.com/users/multiwii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/multiwii/subscriptions","organizations_url":"https://api.github.com/users/multiwii/orgs","repos_url":"https://api.github.com/users/multiwii/repos","events_url":"https://api.github.com/users/multiwii/events{/privacy}","received_events_url":"https://api.github.com/users/multiwii/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/multiwii/baseflight","description":"32 bit fork of the MultiWii RC flight controller firmware","fork":false,"url":"https://api.github.com/repos/multiwii/baseflight","forks_url":"https://api.github.com/repos/multiwii/baseflight/forks","keys_url":"https://api.github.com/repos/multiwii/baseflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/multiwii/baseflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/multiwii/baseflight/teams","hooks_url":"https://api.github.com/repos/multiwii/baseflight/hooks","issue_events_url":"https://api.github.com/repos/multiwii/baseflight/issues/events{/number}","events_url":"https://api.github.com/repos/multiwii/baseflight/events","assignees_url":"https://api.github.com/repos/multiwii/baseflight/assignees{/user}","branches_url":"https://api.github.com/repos/multiwii/baseflight/branches{/branch}","tags_url":"https://api.github.com/repos/multiwii/baseflight/tags","blobs_url":"https://api.github.com/repos/multiwii/baseflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/multiwii/baseflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/multiwii/baseflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/multiwii/baseflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/multiwii/baseflight/statuses/{sha}","languages_url":"https://api.github.com/repos/multiwii/baseflight/languages","stargazers_url":"https://api.github.com/repos/multiwii/baseflight/stargazers","contributors_url":"https://api.github.com/repos/multiwii/baseflight/contributors","subscribers_url":"https://api.github.com/repos/multiwii/baseflight/subscribers","subscription_url":"https://api.github.com/repos/multiwii/baseflight/subscription","commits_url":"https://api.github.com/repos/multiwii/baseflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/multiwii/baseflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/multiwii/baseflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/multiwii/baseflight/issues/comments/{number}","contents_url":"https://api.github.com/repos/multiwii/baseflight/contents/{+path}","compare_url":"https://api.github.com/repos/multiwii/baseflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/multiwii/baseflight/merges","archive_url":"https://api.github.com/repos/multiwii/baseflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/multiwii/baseflight/downloads","issues_url":"https://api.github.com/repos/multiwii/baseflight/issues{/number}","pulls_url":"https://api.github.com/repos/multiwii/baseflight/pulls{/number}","milestones_url":"https://api.github.com/repos/multiwii/baseflight/milestones{/number}","notifications_url":"https://api.github.com/repos/multiwii/baseflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/multiwii/baseflight/labels{/name}","releases_url":"https://api.github.com/repos/multiwii/baseflight/releases{/id}","created_at":"2012-09-05T15:27:39Z","updated_at":"2014-11-19T09:44:35Z","pushed_at":"2014-11-19T09:44:35Z","git_url":"git://github.com/multiwii/baseflight.git","ssh_url":"git@github.com:multiwii/baseflight.git","clone_url":"https://github.com/multiwii/baseflight.git","svn_url":"https://github.com/multiwii/baseflight","homepage":null,"size":30792,"stargazers_count":127,"watchers_count":127,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":156,"mirror_url":null,"open_issues_count":34,"forks":156,"open_issues":34,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/multiwii/baseflight/pulls/205"},"html":{"href":"https://github.com/multiwii/baseflight/pull/205"},"issue":{"href":"https://api.github.com/repos/multiwii/baseflight/issues/205"},"comments":{"href":"https://api.github.com/repos/multiwii/baseflight/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/multiwii/baseflight/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/multiwii/baseflight/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/multiwii/baseflight/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/multiwii/baseflight/statuses/f71f4b8aaf910754a580bde743ea803be027b0e9"}}}}