diff --git a/src/js/Features.js b/src/js/Features.js
index 00acb23f..4a120d8e 100644
--- a/src/js/Features.js
+++ b/src/js/Features.js
@@ -109,36 +109,36 @@ Features.prototype.generateElements = function (featuresElements) {
const listElements = [];
- for (let i = 0; i < self._features.length; i++) {
+ for (const feature of self._features) {
let feature_tip_html = '';
- const rawFeatureName = self._features[i].name;
- const featureBit = self._features[i].bit;
+ const featureName = feature.name;
+ const featureBit = feature.bit;
- if (self._features[i].haveTip) {
- feature_tip_html = `
`;
+ if (feature.haveTip) {
+ feature_tip_html = ``;
}
const newElements = [];
- if (self._features[i].mode === 'select') {
+ if (feature.mode === 'select') {
if (listElements.length === 0) {
newElements.push($(''));
}
- const newElement = $(``);
+ const newElement = $(``);
newElements.push(newElement);
listElements.push(newElement);
} else {
- let featureName = '';
- if (!self._features[i].hideName) {
- featureName = `${rawFeatureName} | `;
+ let newFeatureName = '';
+ if (!feature.hideName) {
+ newFeatureName = `${featureName} | `;
}
- let element = ` | ${featureName} `;
- element += ` | `;
- element += ``;
+ let element = ` |
| ${newFeatureName} `;
+ element += ` | `;
+ element += ``;
element += `${feature_tip_html} |
`;
const newElement = $(element);
@@ -152,7 +152,7 @@ Features.prototype.generateElements = function (featuresElements) {
}
featuresElements.each(function () {
- if ($(this).hasClass(self._features[i].group)) {
+ if ($(this).hasClass(feature.group)) {
$(this).append(newElements);
}
});
diff --git a/src/js/tabs/motors.js b/src/js/tabs/motors.js
index 2164e08c..35f59eb5 100644
--- a/src/js/tabs/motors.js
+++ b/src/js/tabs/motors.js
@@ -269,9 +269,9 @@ motors.initialize = async function (callback) {
mixer: FC.MIXER_CONFIG.mixer,
reverseMotorSwitch: FC.MIXER_CONFIG.reverseMotorDir,
escprotocol: FC.PID_ADVANCED_CONFIG.fast_pwm_protocol + 1,
- feature3: FC.FEATURE_CONFIG.features.isEnabled('MOTOR_STOP'),
- feature9: FC.FEATURE_CONFIG.features.isEnabled('3D'),
- feature20: FC.FEATURE_CONFIG.features.isEnabled('ESC_SENSOR'),
+ feature4: FC.FEATURE_CONFIG.features.isEnabled('MOTOR_STOP'),
+ feature12: FC.FEATURE_CONFIG.features.isEnabled('3D'),
+ feature27: FC.FEATURE_CONFIG.features.isEnabled('ESC_SENSOR'),
dshotBidir: FC.MOTOR_CONFIG.use_dshot_telemetry,
motorPoles: FC.MOTOR_CONFIG.motor_poles,
digitalIdlePercent: FC.PID_ADVANCED_CONFIG.digitalIdlePercent,