Add pitch and roll angles to BFOSD

10.3.x-maintenance
Dan Nixon 2017-04-26 13:37:03 +01:00
parent e64bf8a9db
commit 7c4aa831ce
1 changed files with 18 additions and 0 deletions

View File

@ -404,6 +404,18 @@ OSD.constants = {
default_position: 12 << 5,
positionable: true,
preview: '3.98V'
},
PITCH_ANGLE: {
name: 'PITCH_ANGLE',
default_position: -1,
positionable: true,
preview: '-00.0'
},
ROLL_ANGLE: {
name: 'ROLL_ANGLE',
default_position: -1,
positionable: true,
preview: '-00.0'
}
}
};
@ -444,6 +456,12 @@ OSD.chooseFields = function () {
F.BATTERY_WARNING,
F.AVG_CELL_VOLTAGE
]);
if (semver.gte(CONFIG.apiVersion, "1.35.0")) {
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
F.PITCH_ANGLE,
F.ROLL_ANGLE
]);
}
}
}
}