diff --git a/src/js/tabs/setup.js b/src/js/tabs/setup.js index 367c8fed05..3de7f50260 100644 --- a/src/js/tabs/setup.js +++ b/src/js/tabs/setup.js @@ -268,8 +268,8 @@ setup.initialize = function (callback) { const showSensorInfo = function() { const gyroElements = [ + 'AUTO', 'NONE', - 'DEFAULT', 'MPU6050', 'L3G4200D', 'MPU3050', @@ -292,7 +292,7 @@ setup.initialize = function (callback) { ]; const accElements = [ - 'DEFAULT', + 'AUTO', 'NONE', 'ADXL345', 'MPU6050', @@ -350,6 +350,17 @@ setup.initialize = function (callback) { 'TF02', ]; + // remove deprecated sensors + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) { + gyroElements.splice(gyroElements.indexOf("L3G4200D"), 1); + gyroElements.splice(gyroElements.indexOf("MPU3050"), 1); + + accElements.splice(accElements.indexOf("ADXL345"), 1); + accElements.splice(accElements.indexOf("MMA8452"), 1); + accElements.splice(accElements.indexOf("BMA280"), 1); + accElements.splice(accElements.indexOf("LSM303DLHC"), 1); + } + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) { MSP.send_message(MSPCodes.MSP2_SENSOR_CONFIG_ACTIVE, false, false, function() { // Sensor info