Skip to content

Commit

Permalink
Merge pull request #181 from nerdCopter/20200516_hide_removed_0.3.0_f…
Browse files Browse the repository at this point in the history
…eatures

quick and dirty hide removed features for 0.3.0
  • Loading branch information
nerdCopter authored May 16, 2020
2 parents 786e0ed + b9c863a commit 2f750fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/js/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ var Features = function (config) {
}

if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
//quick & dirty 0.3.0
if (semver.lt(CONFIG.flightControllerVersion, "0.3.0")) {
features.push(
{bit: 28, group: 'other', name: 'ANTI_GRAVITY'}
);
}
features.push(
{bit: 28, group: 'other', name: 'ANTI_GRAVITY'},
{bit: 29, group: 'other', name: 'DYNAMIC_FILTER'}
);
}
Expand Down
9 changes: 8 additions & 1 deletion src/js/tabs/pid_tuning.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ TABS.pid_tuning.initialize = function(callback) {
$('.antigravity input[name="itermThrottleThreshold"]').val(ADVANCED_TUNING.itermThrottleThreshold);
$('.antigravity input[name="itermAcceleratorGain"]').val(ADVANCED_TUNING.itermAcceleratorGain / 1000);

if (FEATURE_CONFIG.features.isEnabled('ANTI_GRAVITY')) {
//quick & dirty 0.3.0
if (FEATURE_CONFIG.features.isEnabled('ANTI_GRAVITY') && semver.lt(CONFIG.flightControllerVersion, "0.3.0")) {
$('.antigravity').show();
} else {
$('.antigravity').hide();
Expand Down Expand Up @@ -568,6 +569,12 @@ TABS.pid_tuning.initialize = function(callback) {
$('#pid-tuning .feedforwardTransition').hide();
}

//quick & dirty 0.3.0
if (semver.gte(CONFIG.flightControllerVersion, "0.3.0")) {
$('.absoluteControlGain').hide();
$('.itermrelax').hide();
}

//smart_dterm_smoothing, witchcraft_, table //first build with legit MSP144 is 0.2.35
if ( semver.gte(CONFIG.apiVersion, "1.44.0") && semver.gte(CONFIG.flightControllerVersion, "0.2.35") ) {
$('.smartDTermWitchBox input[name="smartdTermRoll"]').val(FILTER_CONFIG.smartSmoothing_roll);
Expand Down

0 comments on commit 2f750fa

Please sign in to comment.