Merge pull request #409 from DanNixon/osd_profile_and_battery

Add PID and rate profile and battery warn to OSD
10.3.x-maintenance
Michael Keller 2017-01-29 23:13:25 +13:00 committed by GitHub
commit 1b1d907c08
1 changed files with 18 additions and 0 deletions

View File

@ -386,6 +386,18 @@ OSD.constants = {
default_position: (15 << 5) | 2,
positionable: true,
preview: '142W'
},
PID_RATE_PROFILE: {
name: 'PID_RATE_PROFILE',
default_position: 0x800 | (13 << 5) | 2, // 0x0800 | (y << 5) | x
positionable: true,
preview: '1-2'
},
BATTERY_WARNING: {
name: 'BATTERY_WARNING',
default_position: -1,
positionable: true,
preview: 'LOW VOLTAGE'
}
}
};
@ -420,6 +432,12 @@ OSD.chooseFields = function () {
F.PID_YAW,
F.POWER
]);
if (semver.gte(CONFIG.apiVersion, "1.32.0")) {
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
F.PID_RATE_PROFILE,
F.BATTERY_WARNING
]);
}
}
}
// version 3.0.0