Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Link Quality alarm value to the OSD tab #3609

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6155,6 +6155,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 @@ -2212,6 +2212,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 @@ -2424,6 +2428,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