Skip to content

Commit daf55aa

Browse files
authored
Add CPU LOAD warning to the OSD tab (#4021) (#4022)
1 parent b542569 commit daf55aa

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

locales/en/messages.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6422,6 +6422,15 @@
64226422
"osdWarningRSNR": {
64236423
"message": "Warns when RSNR value is below alarm setting"
64246424
},
6425+
"osdWarningTextLoad": {
6426+
"message": "LOAD",
6427+
"description": "One of the warnings that can be selected to be shown in the OSD"
6428+
},
6429+
"osdWarningLoad": {
6430+
"message": "Warns if the CPU LOAD of the flight controller is too high",
6431+
"description": "Description of one of the warnings that can be selected to be shown in the OSD"
6432+
},
6433+
64256434
"osdWarningTextUnknown": {
64266435
"message": "Unknown $1"
64276436
},

src/js/tabs/osd.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,11 @@ OSD.constants = {
18271827
text: 'osdWarningTextRSNR',
18281828
desc: 'osdWarningRSNR',
18291829
},
1830+
LOAD: {
1831+
name: 'LOAD',
1832+
text: 'osdWarningTextLoad',
1833+
desc: 'osdWarningLoad',
1834+
},
18301835

18311836
},
18321837
FONT_TYPES: [
@@ -2096,6 +2101,11 @@ OSD.chooseFields = function() {
20962101
F.RSNR,
20972102
]);
20982103
}
2104+
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
2105+
OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([
2106+
F.LOAD,
2107+
]);
2108+
}
20992109
};
21002110

21012111
OSD.updateDisplaySize = function() {

0 commit comments

Comments
 (0)