Skip to content

Commit

Permalink
Add Link Quality alarm value to the OSD tab (#3609)
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim authored Dec 2, 2023
1 parent ec0ceb6 commit f130edf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6276,6 +6276,10 @@
"message": "Altitude",
"description": "Text of the altitude alarm"
},
"osdTimerAlarmOptionLinkQuality": {
"message": "Link Quality",
"description": "Text of the link quality alarm"
},
"osdWarningTextArmingDisabled": {
"message": "Arming disabled",
"description": "One of the warnings that can be selected to be shown in the OSD"
Expand Down
8 changes: 8 additions & 0 deletions src/js/tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,10 @@ OSD.msp = {
result.push8(OSD.data.parameters.cameraFrameWidth);
result.push8(OSD.data.parameters.cameraFrameHeight);
}

if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
result.push16(OSD.data.alarms.link_quality.value);
}
}
return result;
},
Expand Down Expand Up @@ -2442,6 +2446,10 @@ OSD.msp = {
d.parameters.cameraFrameHeight = view.readU8();
}

if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
d.alarms['link_quality'] = { display_name: i18n.getMessage('osdTimerAlarmOptionLinkQuality'), value: view.readU16() };
}

this.processOsdElements(d, itemsPositionsRead);

OSD.updateDisplaySize();
Expand Down

0 comments on commit f130edf

Please sign in to comment.