1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 16:25:22 +03:00

Update IMU (remove legacy) (#4276)

Update IMU
This commit is contained in:
Mark Haslinghuis 2024-12-31 20:07:52 +01:00 committed by GitHub
parent e31cf536a6
commit 4bdf7fbe17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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