diff --git a/locales/en/messages.json b/locales/en/messages.json index 53bb2abf..e460eff7 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -5036,6 +5036,13 @@ "osdWarningRssiDbm": { "message": "Warns when RSSI dBm value is below alarm setting" }, + "osdWarningTextOverCap": { + "message": "Battery over capacity", + "description": "One of the warnings that can be selected to be shown in the OSD" + }, + "osdWarningOverCap": { + "message": "Warns when the consumed mAh exceeds the configured capacity limit" + }, "osdWarningTextUnknown": { "message": "Unknown $1" }, diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index d7408197..3ee343cd 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -1370,6 +1370,11 @@ OSD.constants = { text: 'osdWarningTextRssiDbm', desc: 'osdWarningRssiDbm' }, + OVER_CAP: { + name: 'OVER_CAP', + text: 'osdWarningTextOverCap', + desc: 'osdWarningOverCap', + }, }, FONT_TYPES: [ @@ -1667,6 +1672,11 @@ OSD.chooseFields = function () { F.RSSI_DBM, ]); } + if (semver.gte(CONFIG.apiVersion, "1.43.0")) { + OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([ + F.OVER_CAP, + ]); + } }; OSD.updateDisplaySize = function () {