Skip to content

Commit

Permalink
Merge pull request #315 from mikeller/hide_gyro_notch_2_for_legacy
Browse files Browse the repository at this point in the history
Hide gyro notch filter 2 settings for firmware < 3.0.1.
  • Loading branch information
mikeller authored Oct 13, 2016
2 parents 037f262 + da02712 commit 433cc04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tabs/pid_tuning.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
</div>
</td>
</tr>
<tr class="newFilter">
<tr class="newFilter gyroNotch2">
<td>
<input type="number" class="nonProfile" name="gyroNotch2Frequency" step="1" min="0" max="500"/>
</td>
Expand All @@ -481,7 +481,7 @@
</div>
</td>
</tr>
<tr class="newFilter">
<tr class="newFilter gyroNotch2">
<td>
<input type="number" class="nonProfile" name="gyroNotch2Cutoff" step="1" min="0" max="500"/>
</td>
Expand Down
11 changes: 7 additions & 4 deletions tabs/pid_tuning.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,16 @@ TABS.pid_tuning.initialize = function (callback) {

$('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
$('input[name="dtermSetpoint-range"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
if (semver.gte(CONFIG.flightControllerVersion, '3.0.1')) {
$('.pid_filter input[name="gyroNotch2Frequency"]').val(FILTER_CONFIG.gyro_soft_notch_hz_2);
$('.pid_filter input[name="gyroNotch2Cutoff"]').val(FILTER_CONFIG.gyro_soft_notch_cutoff_2);
}
} else {
$('.pid_filter .newFilter').hide();
}

if (semver.gte(CONFIG.flightControllerVersion, '3.0.1')) {
$('.pid_filter input[name="gyroNotch2Frequency"]').val(FILTER_CONFIG.gyro_soft_notch_hz_2);
$('.pid_filter input[name="gyroNotch2Cutoff"]').val(FILTER_CONFIG.gyro_soft_notch_cutoff_2);
} else {
$('.pid_filter .gyroNotch2').hide();
}
}

function form_to_pid_and_rc() {
Expand Down

0 comments on commit 433cc04

Please sign in to comment.