mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-21 15:25:22 +03:00
Merge pull request #1880 from rvdveen/low-capacity-warning
Add support for the 'mah capacity exceeded' osd warning
This commit is contained in:
commit
44cb725932
2 changed files with 17 additions and 0 deletions
|
@ -5036,6 +5036,13 @@
|
||||||
"osdWarningRssiDbm": {
|
"osdWarningRssiDbm": {
|
||||||
"message": "Warns when RSSI dBm value is below alarm setting"
|
"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": {
|
"osdWarningTextUnknown": {
|
||||||
"message": "Unknown $1"
|
"message": "Unknown $1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1370,6 +1370,11 @@ OSD.constants = {
|
||||||
text: 'osdWarningTextRssiDbm',
|
text: 'osdWarningTextRssiDbm',
|
||||||
desc: 'osdWarningRssiDbm'
|
desc: 'osdWarningRssiDbm'
|
||||||
},
|
},
|
||||||
|
OVER_CAP: {
|
||||||
|
name: 'OVER_CAP',
|
||||||
|
text: 'osdWarningTextOverCap',
|
||||||
|
desc: 'osdWarningOverCap',
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
FONT_TYPES: [
|
FONT_TYPES: [
|
||||||
|
@ -1667,6 +1672,11 @@ OSD.chooseFields = function () {
|
||||||
F.RSSI_DBM,
|
F.RSSI_DBM,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
||||||
|
OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([
|
||||||
|
F.OVER_CAP,
|
||||||
|
]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OSD.updateDisplaySize = function () {
|
OSD.updateDisplaySize = function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue