Skip to content

Commit 1b1d907

Browse files
authored
Merge pull request #409 from DanNixon/osd_profile_and_battery
Add PID and rate profile and battery warn to OSD
2 parents 8c47819 + d2a8f9c commit 1b1d907

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tabs/osd.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,18 @@ OSD.constants = {
386386
default_position: (15 << 5) | 2,
387387
positionable: true,
388388
preview: '142W'
389+
},
390+
PID_RATE_PROFILE: {
391+
name: 'PID_RATE_PROFILE',
392+
default_position: 0x800 | (13 << 5) | 2, // 0x0800 | (y << 5) | x
393+
positionable: true,
394+
preview: '1-2'
395+
},
396+
BATTERY_WARNING: {
397+
name: 'BATTERY_WARNING',
398+
default_position: -1,
399+
positionable: true,
400+
preview: 'LOW VOLTAGE'
389401
}
390402
}
391403
};
@@ -420,6 +432,12 @@ OSD.chooseFields = function () {
420432
F.PID_YAW,
421433
F.POWER
422434
]);
435+
if (semver.gte(CONFIG.apiVersion, "1.32.0")) {
436+
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
437+
F.PID_RATE_PROFILE,
438+
F.BATTERY_WARNING
439+
]);
440+
}
423441
}
424442
}
425443
// version 3.0.0

0 commit comments

Comments
 (0)