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

Allow the HUD & AHI to be offset from the OSD page #1540

Merged
merged 3 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Updated to work with inav#8226
  • Loading branch information
MrD-RC committed Jul 13, 2022
commit 44dbc3722fd91be686e68bc2cac773588c8a9223
2 changes: 1 addition & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var Settings = (function () {
} else {
input.empty();
let option = null;
if (input.data('invert-select') === true) {
if (input.data('setting-invert-select') === true) {
for (var ii = s.setting.max; ii >= s.setting.min; ii--) {
option = null;
option = self.fillSelectOption(s, ii);
Expand Down
2 changes: 1 addition & 1 deletion tabs/osd.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h1 class="tab_title" data-i18n="tabOSD"></h1>
</label>
<div for="osd_horizon_offset" class="helpicon cf_tip" data-i18n_title="osd_horizon_offset_help"></div>
<label>
<select class="update_preview" id="osd_horizon_offset" data-setting="osd_horizon_offset" data-live="true"></select>
<select class="update_preview" id="osd_horizon_offset" data-setting="osd_horizon_offset" data-setting-invert-select="true" data-live="true"></select>
<span data-i18n="osd_horizon_offset"></span>
</label>
<label>
Expand Down
2 changes: 1 addition & 1 deletion tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2676,7 +2676,7 @@ OSD.GUI.updatePreviews = function() {
centerPosition += OSD.data.display_size.x / 2;
}

let hudCenterPosition = centerPosition + (OSD.constants.VIDEO_COLS[video_type] * $('#osd_horizon_offset').val());
let hudCenterPosition = centerPosition - (OSD.constants.VIDEO_COLS[video_type] * $('#osd_horizon_offset').val());

// artificial horizon
if ($('input[name="ARTIFICIAL_HORIZON"]').prop('checked')) {
Expand Down