Skip to content

Commit cfdefd9

Browse files
committed
Update IMU
1 parent 15a4040 commit cfdefd9

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/js/tabs/setup.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ setup.initialize = function (callback) {
268268

269269
const showSensorInfo = function() {
270270
const gyroElements = [
271+
'AUTO',
271272
'NONE',
272-
'DEFAULT',
273273
'MPU6050',
274274
'L3G4200D',
275275
'MPU3050',
@@ -292,7 +292,7 @@ setup.initialize = function (callback) {
292292
];
293293

294294
const accElements = [
295-
'DEFAULT',
295+
'AUTO',
296296
'NONE',
297297
'ADXL345',
298298
'MPU6050',
@@ -350,6 +350,17 @@ setup.initialize = function (callback) {
350350
'TF02',
351351
];
352352

353+
// remove deprecated sensors
354+
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
355+
gyroElements.splice(gyroElements.indexOf("L3G4200D"), 1);
356+
gyroElements.splice(gyroElements.indexOf("MPU3050"), 1);
357+
358+
accElements.splice(accElements.indexOf("ADXL345"), 1);
359+
accElements.splice(accElements.indexOf("MMA8452"), 1);
360+
accElements.splice(accElements.indexOf("BMA280"), 1);
361+
accElements.splice(accElements.indexOf("LSM303DLHC"), 1);
362+
}
363+
353364
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
354365
MSP.send_message(MSPCodes.MSP2_SENSOR_CONFIG_ACTIVE, false, false, function() {
355366
// Sensor info

0 commit comments

Comments
 (0)