{"action":"created","comment":{"url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/comments/69978247","id":69978247,"diff_hunk":"@@ -701,11 +718,8 @@ TABS.pid_tuning.initRatesPreview = function () {\n     this.keepRendering = true;\n     this.model = new Model($('.rates_preview'), $('.rates_preview canvas'));\n \n-    var scale = d3.scale.linear().domain([900, 2100]);\n-\n-    this.rollScale = scale.range([Math.PI * 2, -Math.PI * 2]);\n-    this.pitchScale = scale.range([Math.PI * 2, -Math.PI * 2]);\n-    this.yawScale = scale.range([Math.PI * 2, -Math.PI * 2]);\n+    this.$superExpo = $('.pid_tuning input[name=\"show_superexpo_rates\"]');","path":"tabs/pid_tuning.js","position":93,"original_position":93,"commit_id":"86352b2a61bc2e307fb735ee899be57653d5cd9b","original_commit_id":"86352b2a61bc2e307fb735ee899be57653d5cd9b","user":{"login":"borisbstyle","id":10757508,"avatar_url":"https://avatars.githubusercontent.com/u/10757508?v=3","gravatar_id":"","url":"https://api.github.com/users/borisbstyle","html_url":"https://github.com/borisbstyle","followers_url":"https://api.github.com/users/borisbstyle/followers","following_url":"https://api.github.com/users/borisbstyle/following{/other_user}","gists_url":"https://api.github.com/users/borisbstyle/gists{/gist_id}","starred_url":"https://api.github.com/users/borisbstyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisbstyle/subscriptions","organizations_url":"https://api.github.com/users/borisbstyle/orgs","repos_url":"https://api.github.com/users/borisbstyle/repos","events_url":"https://api.github.com/users/borisbstyle/events{/privacy}","received_events_url":"https://api.github.com/users/borisbstyle/received_events","type":"User","site_admin":false},"body":"I also miss a good IDE for this stuff. I usually just do c or c++ over the\nlast 2 years and really got spoiled by easeness of a good IDE where I\neasily can browse through different files.\nOp 7 jul. 2016 22:03 schreef \"Michael Keller\" <notifications@github.com>:\n\n> In tabs/pid_tuning.js\n> <https://github.com/betaflight/betaflight-configurator/pull/89#discussion_r69976533>\n> :\n>\n> > @@ -701,11 +718,8 @@ TABS.pid_tuning.initRatesPreview = function () {\n> >      this.keepRendering = true;\n> >      this.model = new Model($('.rates_preview'), $('.rates_preview canvas'));\n> >\n> > -    var scale = d3.scale.linear().domain([900, 2100]);\n> > -\n> > -    this.rollScale = scale.range([Math.PI * 2, -Math.PI * 2]);\n> > -    this.pitchScale = scale.range([Math.PI * 2, -Math.PI * 2]);\n> > -    this.yawScale = scale.range([Math.PI * 2, -Math.PI * 2]);\n> > +    this.$superExpo = $('.pid_tuning input[name=\"show_superexpo_rates\"]');\n>\n> Well without code reviews pretty much anything is a recipe for disaster.\n>\n> But this is a very new project, and it was started with the intention of\n> making the 'extra features' that Betaflight has over cleanflight accessible\n> from the GUI. Once this has been achieved (and I think we are close), I\n> would like to add more structure to it and introduce a set of coding style\n> rules and a review process. But ultimately, @borisbstyle\n> <https://github.com/borisbstyle> is the owner of this project and he will\n> have to agree with this course of action.\n>\n> I'm sorry, but I keep noticing that you sound a bit like \"let's not change\n> anything but stick to the current mess,\n>\n> This is not quite the case. However, I believe that cleaning up a codebase\n> has to start with specifying how 'clean code' has to look. Before this is\n> done, introducing new paradigms into the codebase does not do anything to\n> clean it up, it just makes it harder to clean up if these paradigms do not\n> become part of the spec. As I said above, I think we are close to a point\n> where we should be shifting our focus to add more structure, because the\n> user requirements are almost met...\n>\n> I'm used to snake_case for variables and camelCase for methods (which is\n> the case in many JS projects)\n>\n> I have never come across this one. Doesn't this make the code a bit hard\n> to read? For me it's not so much about personal preferences as it is about\n> having a common set of rules and every contributor sticking to it.\n>\n> if (self.currentRates.hasOwnProperty(targetElement.attr('name')) && targetValue) {\n>   self.currentRates[targetElement.attr('name')] = targetValue * 100;\n> }\n>\n> I saw that. I am personally not a huge fan of this sort of 'optimisation',\n> as it tends to break on changes to functionality. Case in point is the code\n> that I've had to add in order to make it not break for non-current versions\n> of the firmware:\n>\n>  if (targetElement.attr('name') === 'rc_rate' && CONFIG.flightControllerIdentifier !== \"BTFL\" || semver.lt(CONFIG.flightControllerVersion, \"2.8.1\")) {\n>      self.currentRates.rc_rate_yaw = targetValue * 100;\n> }\n>\n> if (targetElement.attr('name') === 'roll_pitch_rate' && semver.lt(CONFIG.apiVersion, \"1.7.0\")) {\n>     self.currentRates.roll_rate = targetValue * 100;\n>     self.currentRates.pitch_rate = targetValue * 100;\n> }\n>\n> I agree that the Chrome console is pretty neat for debugging. What I am\n> looking for is a tool that gives me some sort of 'code intelligence', i.e.\n> can reliably find references to objects, and provides assistance for\n> refactoring. I have had some success for this in JS with WebStorm in the\n> past, but this does not come in a free version.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/betaflight/betaflight-configurator/pull/89/files/86352b2a61bc2e307fb735ee899be57653d5cd9b#r69976533>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe/AKQlhIYUwQ9RKzSRDVHivRkPGYqi8moRks5qTVuZgaJpZM4JGjsR>\n> .\n>\n","created_at":"2016-07-07T20:15:24Z","updated_at":"2016-07-07T20:15:24Z","html_url":"https://github.com/betaflight/betaflight-configurator/pull/89#discussion_r69978247","pull_request_url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/comments/69978247"},"html":{"href":"https://github.com/betaflight/betaflight-configurator/pull/89#discussion_r69978247"},"pull_request":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89","id":76511045,"html_url":"https://github.com/betaflight/betaflight-configurator/pull/89","diff_url":"https://github.com/betaflight/betaflight-configurator/pull/89.diff","patch_url":"https://github.com/betaflight/betaflight-configurator/pull/89.patch","issue_url":"https://api.github.com/repos/betaflight/betaflight-configurator/issues/89","number":89,"state":"closed","locked":false,"title":"3D model to respect rates","user":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"body":"This makes rotation of the 3D model to respect rates.","created_at":"2016-07-06T22:14:23Z","updated_at":"2016-07-07T20:15:25Z","closed_at":"2016-07-06T22:16:02Z","merged_at":"2016-07-06T22:16:02Z","merge_commit_sha":"a9f7bafa044cc466cc12339c4a0d086a1722ffde","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89/commits","review_comments_url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89/comments","review_comment_url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/betaflight/betaflight-configurator/issues/89/comments","statuses_url":"https://api.github.com/repos/betaflight/betaflight-configurator/statuses/86352b2a61bc2e307fb735ee899be57653d5cd9b","head":{"label":"antstorm:preview-to-respect-rates","ref":"preview-to-respect-rates","sha":"86352b2a61bc2e307fb735ee899be57653d5cd9b","user":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"repo":{"id":62147750,"name":"betaflight-configurator","full_name":"antstorm/betaflight-configurator","owner":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antstorm/betaflight-configurator","description":"Google chrome/chromium based configuration tool for the cleanflight firmware","fork":true,"url":"https://api.github.com/repos/antstorm/betaflight-configurator","forks_url":"https://api.github.com/repos/antstorm/betaflight-configurator/forks","keys_url":"https://api.github.com/repos/antstorm/betaflight-configurator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antstorm/betaflight-configurator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antstorm/betaflight-configurator/teams","hooks_url":"https://api.github.com/repos/antstorm/betaflight-configurator/hooks","issue_events_url":"https://api.github.com/repos/antstorm/betaflight-configurator/issues/events{/number}","events_url":"https://api.github.com/repos/antstorm/betaflight-configurator/events","assignees_url":"https://api.github.com/repos/antstorm/betaflight-configurator/assignees{/user}","branches_url":"https://api.github.com/repos/antstorm/betaflight-configurator/branches{/branch}","tags_url":"https://api.github.com/repos/antstorm/betaflight-configurator/tags","blobs_url":"https://api.github.com/repos/antstorm/betaflight-configurator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antstorm/betaflight-configurator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antstorm/betaflight-configurator/git/refs{/sha}","trees_url":"https://api.github.com/repos/antstorm/betaflight-configurator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antstorm/betaflight-configurator/statuses/{sha}","languages_url":"https://api.github.com/repos/antstorm/betaflight-configurator/languages","stargazers_url":"https://api.github.com/repos/antstorm/betaflight-configurator/stargazers","contributors_url":"https://api.github.com/repos/antstorm/betaflight-configurator/contributors","subscribers_url":"https://api.github.com/repos/antstorm/betaflight-configurator/subscribers","subscription_url":"https://api.github.com/repos/antstorm/betaflight-configurator/subscription","commits_url":"https://api.github.com/repos/antstorm/betaflight-configurator/commits{/sha}","git_commits_url":"https://api.github.com/repos/antstorm/betaflight-configurator/git/commits{/sha}","comments_url":"https://api.github.com/repos/antstorm/betaflight-configurator/comments{/number}","issue_comment_url":"https://api.github.com/repos/antstorm/betaflight-configurator/issues/comments{/number}","contents_url":"https://api.github.com/repos/antstorm/betaflight-configurator/contents/{+path}","compare_url":"https://api.github.com/repos/antstorm/betaflight-configurator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antstorm/betaflight-configurator/merges","archive_url":"https://api.github.com/repos/antstorm/betaflight-configurator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antstorm/betaflight-configurator/downloads","issues_url":"https://api.github.com/repos/antstorm/betaflight-configurator/issues{/number}","pulls_url":"https://api.github.com/repos/antstorm/betaflight-configurator/pulls{/number}","milestones_url":"https://api.github.com/repos/antstorm/betaflight-configurator/milestones{/number}","notifications_url":"https://api.github.com/repos/antstorm/betaflight-configurator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antstorm/betaflight-configurator/labels{/name}","releases_url":"https://api.github.com/repos/antstorm/betaflight-configurator/releases{/id}","deployments_url":"https://api.github.com/repos/antstorm/betaflight-configurator/deployments","created_at":"2016-06-28T14:28:37Z","updated_at":"2016-06-28T14:28:39Z","pushed_at":"2016-07-07T08:40:30Z","git_url":"git://github.com/antstorm/betaflight-configurator.git","ssh_url":"git@github.com:antstorm/betaflight-configurator.git","clone_url":"https://github.com/antstorm/betaflight-configurator.git","svn_url":"https://github.com/antstorm/betaflight-configurator","homepage":"","size":18949,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"betaflight:master","ref":"master","sha":"9edc49c061c93ec499d6789a09ea48101f708edd","user":{"login":"betaflight","id":19597933,"avatar_url":"https://avatars.githubusercontent.com/u/19597933?v=3","gravatar_id":"","url":"https://api.github.com/users/betaflight","html_url":"https://github.com/betaflight","followers_url":"https://api.github.com/users/betaflight/followers","following_url":"https://api.github.com/users/betaflight/following{/other_user}","gists_url":"https://api.github.com/users/betaflight/gists{/gist_id}","starred_url":"https://api.github.com/users/betaflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betaflight/subscriptions","organizations_url":"https://api.github.com/users/betaflight/orgs","repos_url":"https://api.github.com/users/betaflight/repos","events_url":"https://api.github.com/users/betaflight/events{/privacy}","received_events_url":"https://api.github.com/users/betaflight/received_events","type":"Organization","site_admin":false},"repo":{"id":60735171,"name":"betaflight-configurator","full_name":"betaflight/betaflight-configurator","owner":{"login":"betaflight","id":19597933,"avatar_url":"https://avatars.githubusercontent.com/u/19597933?v=3","gravatar_id":"","url":"https://api.github.com/users/betaflight","html_url":"https://github.com/betaflight","followers_url":"https://api.github.com/users/betaflight/followers","following_url":"https://api.github.com/users/betaflight/following{/other_user}","gists_url":"https://api.github.com/users/betaflight/gists{/gist_id}","starred_url":"https://api.github.com/users/betaflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betaflight/subscriptions","organizations_url":"https://api.github.com/users/betaflight/orgs","repos_url":"https://api.github.com/users/betaflight/repos","events_url":"https://api.github.com/users/betaflight/events{/privacy}","received_events_url":"https://api.github.com/users/betaflight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/betaflight/betaflight-configurator","description":"Google chrome/chromium based configuration tool for the cleanflight firmware","fork":true,"url":"https://api.github.com/repos/betaflight/betaflight-configurator","forks_url":"https://api.github.com/repos/betaflight/betaflight-configurator/forks","keys_url":"https://api.github.com/repos/betaflight/betaflight-configurator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betaflight/betaflight-configurator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betaflight/betaflight-configurator/teams","hooks_url":"https://api.github.com/repos/betaflight/betaflight-configurator/hooks","issue_events_url":"https://api.github.com/repos/betaflight/betaflight-configurator/issues/events{/number}","events_url":"https://api.github.com/repos/betaflight/betaflight-configurator/events","assignees_url":"https://api.github.com/repos/betaflight/betaflight-configurator/assignees{/user}","branches_url":"https://api.github.com/repos/betaflight/betaflight-configurator/branches{/branch}","tags_url":"https://api.github.com/repos/betaflight/betaflight-configurator/tags","blobs_url":"https://api.github.com/repos/betaflight/betaflight-configurator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betaflight/betaflight-configurator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betaflight/betaflight-configurator/git/refs{/sha}","trees_url":"https://api.github.com/repos/betaflight/betaflight-configurator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betaflight/betaflight-configurator/statuses/{sha}","languages_url":"https://api.github.com/repos/betaflight/betaflight-configurator/languages","stargazers_url":"https://api.github.com/repos/betaflight/betaflight-configurator/stargazers","contributors_url":"https://api.github.com/repos/betaflight/betaflight-configurator/contributors","subscribers_url":"https://api.github.com/repos/betaflight/betaflight-configurator/subscribers","subscription_url":"https://api.github.com/repos/betaflight/betaflight-configurator/subscription","commits_url":"https://api.github.com/repos/betaflight/betaflight-configurator/commits{/sha}","git_commits_url":"https://api.github.com/repos/betaflight/betaflight-configurator/git/commits{/sha}","comments_url":"https://api.github.com/repos/betaflight/betaflight-configurator/comments{/number}","issue_comment_url":"https://api.github.com/repos/betaflight/betaflight-configurator/issues/comments{/number}","contents_url":"https://api.github.com/repos/betaflight/betaflight-configurator/contents/{+path}","compare_url":"https://api.github.com/repos/betaflight/betaflight-configurator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betaflight/betaflight-configurator/merges","archive_url":"https://api.github.com/repos/betaflight/betaflight-configurator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betaflight/betaflight-configurator/downloads","issues_url":"https://api.github.com/repos/betaflight/betaflight-configurator/issues{/number}","pulls_url":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls{/number}","milestones_url":"https://api.github.com/repos/betaflight/betaflight-configurator/milestones{/number}","notifications_url":"https://api.github.com/repos/betaflight/betaflight-configurator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betaflight/betaflight-configurator/labels{/name}","releases_url":"https://api.github.com/repos/betaflight/betaflight-configurator/releases{/id}","deployments_url":"https://api.github.com/repos/betaflight/betaflight-configurator/deployments","created_at":"2016-06-08T22:32:34Z","updated_at":"2016-07-05T10:52:48Z","pushed_at":"2016-07-07T12:13:25Z","git_url":"git://github.com/betaflight/betaflight-configurator.git","ssh_url":"git@github.com:betaflight/betaflight-configurator.git","clone_url":"https://github.com/betaflight/betaflight-configurator.git","svn_url":"https://github.com/betaflight/betaflight-configurator","homepage":"","size":19023,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":17,"forks":13,"open_issues":17,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89"},"html":{"href":"https://github.com/betaflight/betaflight-configurator/pull/89"},"issue":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/issues/89"},"comments":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/betaflight/betaflight-configurator/statuses/86352b2a61bc2e307fb735ee899be57653d5cd9b"}}}}
{"actor":{"display_login":"borisbstyle"}}