Skip to content

Commit

Permalink
Add CPU LOAD warning to the OSD tab (#4021) (#4022)
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed Jun 19, 2024
1 parent b542569 commit daf55aa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6422,6 +6422,15 @@
"osdWarningRSNR": {
"message": "Warns when RSNR value is below alarm setting"
},
"osdWarningTextLoad": {
"message": "LOAD",
"description": "One of the warnings that can be selected to be shown in the OSD"
},
"osdWarningLoad": {
"message": "Warns if the CPU LOAD of the flight controller is too high",
"description": "Description of one of the warnings that can be selected to be shown in the OSD"
},

"osdWarningTextUnknown": {
"message": "Unknown $1"
},
Expand Down
10 changes: 10 additions & 0 deletions src/js/tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,11 @@ OSD.constants = {
text: 'osdWarningTextRSNR',
desc: 'osdWarningRSNR',
},
LOAD: {
name: 'LOAD',
text: 'osdWarningTextLoad',
desc: 'osdWarningLoad',
},

},
FONT_TYPES: [
Expand Down Expand Up @@ -2096,6 +2101,11 @@ OSD.chooseFields = function() {
F.RSNR,
]);
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([
F.LOAD,
]);
}
};

OSD.updateDisplaySize = function() {
Expand Down

0 comments on commit daf55aa

Please sign in to comment.