diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 720ca199..0a9d37c1 100755
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -530,7 +530,10 @@
"message": "Configure via the Race Transponder tab after enabling."
},
"featureSUPEREXPO_RATES": {
- "message": "Rate value adds instead of rate also Super Expo. Mid stick stays same. Rc rate is always linear"
+ "message": "Use Super Expo rates curve"
+ },
+ "featureSUPEREXPO_RATESTip": {
+ "message": "Rate value adds instead of rate also Super Expo. Mid stick stays same. Rc rate is always linear. You can modify this setting in the PID tuning tab."
},
"featureAIRMODE": {
"message": "Airmode always enabled!"
@@ -1597,11 +1600,11 @@
"pidTuningYaw": {
"message": "Yaw (Hz)"
},
- "pidTuningShowRatesWithSuperExpo": {
- "message": "Show rates with SuperExpo"
+ "pidTuningSuperExpo": {
+ "message": "Enable SuperExpo"
},
"pidTuningRatesSuperExpoHelp": {
- "message": "To enable SuperExpo, enable 'SUPEREXPO_RATES' in 'Other Features' on the 'Configuration' tab."
+ "message": "This setting controls the feature 'SUPEREXPO_RATES'"
},
"configHelp2": {
"message": "Arbitrary board rotation in degrees, to allow mounting it sideways / upside down / rotated etc. When running external sensors, use the sensor alignments (Gyro, Acc, Mag) to define sensor position independent from board orientation. "
diff --git a/tabs/configuration.js b/tabs/configuration.js
index 3482aa8f..f958b369 100644
--- a/tabs/configuration.js
+++ b/tabs/configuration.js
@@ -157,10 +157,10 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
);
}
- if (CONFIG.flightControllerIdentifier == "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.0")) {
+ if (CONFIG.flightControllerIdentifier === "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.0")) {
features.push(
{bit: 22, group: 'other', name: 'AIRMODE'},
- {bit: 23, group: 'other', name: 'SUPEREXPO_RATES'}
+ {bit: 23, group: 'other', mode: 'readonly', name: 'SUPEREXPO_RATES', haveTip: true}
);
}
@@ -201,13 +201,20 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
+ feature_tip_html + '');
radioGroups.push(features[i].group);
} else {
+ var readonlyModifier = '';
+ if (features[i].mode === 'readonly') {
+ readonlyModifier = ' readonly';
+ }
+
row_e = $('
| | |
+
+
+
+ |
+
|
@@ -282,19 +295,6 @@
|
|
-
-
-
- |
-
diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js
index f101751f..26900104 100755
--- a/tabs/pid_tuning.js
+++ b/tabs/pid_tuning.js
@@ -4,6 +4,8 @@ TABS.pid_tuning = {
controllerChanged: false
};
+var SUPEREXPO_FEATURE_BIT = 23;
+
TABS.pid_tuning.initialize = function (callback) {
var self = this;
if (GUI.active_tab != 'pid_tuning') {
@@ -28,11 +30,24 @@ TABS.pid_tuning.initialize = function (callback) {
return MSP.promise(MSP_codes.MSP_ADVANCED_TUNING);
}).then(function() {
return MSP.promise(MSP_codes.MSP_FILTER_CONFIG);
+ }).then(function() {
+ var promise = true;
+ if (CONFIG.flightControllerIdentifier === "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.0")) {
+ promise = MSP.promise(MSP_codes.MSP_BF_CONFIG);
+ }
+
+ return promise;
}).then(function() {
$('#content').load("./tabs/pid_tuning.html", process_html);
});
function pid_and_rc_to_form() {
+ if (CONFIG.flightControllerIdentifier === "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.0")) {
+ //This will need to be reworked to remove BF_CONFIG reference eventually
+ $('.pid_tuning input[name="show_superexpo_rates"]').prop(
+ 'checked', bit_check(BF_CONFIG.features, SUPEREXPO_FEATURE_BIT));
+ }
+
// Fill in the data from PIDs array
var i = 0;
$('.pid_tuning .ROLL input').each(function () {
@@ -200,6 +215,16 @@ TABS.pid_tuning.initialize = function (callback) {
}
function form_to_pid_and_rc() {
+ if (CONFIG.flightControllerIdentifier === "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.0")) {
+ //This will need to be reworked to remove BF_CONFIG reference eventually
+ if ($('.pid_tuning input[name="show_superexpo_rates"]').is(':checked')) {
+ BF_CONFIG.features = bit_set(BF_CONFIG.features, SUPEREXPO_FEATURE_BIT);
+ } else {
+ BF_CONFIG.features = bit_clear(BF_CONFIG.features, SUPEREXPO_FEATURE_BIT);
+ }
+ }
+
+ // Fill in the data from PIDs array
// Catch all the changes and stuff the inside PIDs array
var i = 0;
$('table.pid_tuning tr.ROLL input').each(function () {
@@ -469,11 +494,11 @@ TABS.pid_tuning.initialize = function (callback) {
var maxAngularVelPitchElement = $('.rc_curve .maxAngularVelPitch');
var maxAngularVelYawElement = $('.rc_curve .maxAngularVelYaw');
- var superExpoElement = $('.rc_curve input[name="show_superexpo_rates"]');
+ var superExpoElement = $('.pid_tuning input[name="show_superexpo_rates"]');
var useLegacyCurve = false;
if (CONFIG.flightControllerIdentifier !== "BTFL" || semver.lt(CONFIG.flightControllerVersion, "2.8.0")) {
- $('.rc_curve .new_rates').hide();
+ $('.new_rates').hide();
useLegacyCurve = true;
}
@@ -637,6 +662,13 @@ TABS.pid_tuning.initialize = function (callback) {
}
}).then(function() {
return MSP.promise(MSP_codes.MSP_SET_RC_TUNING, MSP.crunch(MSP_codes.MSP_SET_RC_TUNING));
+ }).then(function() {
+ var promise = true;
+ if (CONFIG.flightControllerIdentifier === "BTFL" && semver.gte(CONFIG.flightControllerVersion, "2.8.0")) {
+ promise = MSP.promise(MSP_codes.MSP_SET_BF_CONFIG, MSP.crunch(MSP_codes.MSP_SET_BF_CONFIG));
+ }
+
+ return promise;
}).then(function() {
return MSP.promise(MSP_codes.MSP_EEPROM_WRITE);
}).then(function() {