1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 00:35:20 +03:00

Merge pull request #1150 from avsaase/avs-shorter-osd-plus-code

Option for local plus codes on osd
This commit is contained in:
Paweł Spychalski 2021-01-08 11:20:28 +01:00 committed by GitHub
commit 6abfd6848c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -3070,6 +3070,12 @@
"osdSettingMainVoltageDecimals": {
"message": "Main voltage decimals"
},
"osdSettingPLUS_CODE_DIGITS_HELP": {
"message": "Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm."
},
"osdSettingPLUS_CODE_SHORT_HELP": {
"message": "Removing 2, 4 and 6 leading digits requires a reference location within, respectively, ~800km, ~40km and ~2km to recover the original coordinates."
},
"osdSettingCRSF_LQ_FORMAT_HELP": {
"message": "TYPE1 shows LQ% as used by TBS hardware. TYPE2 shows RF Profile Modes (2=150Hz, 1=50Hz, 0=4Hz update rates) and LQ % [0..100%]. Tracer shows RFMode 1 (1=250Hz) and LQ % [0..100%]."
},

View file

@ -68,9 +68,14 @@
<label>
<select class="update_preview" data-setting="osd_coordinate_digits" data-live="true"></select> Coordinate Digits
</label>
<div class="helpicon cf_tip" data-i18n_title="osdSettingPLUS_CODE_DIGITS_HELP"></div>
<label>
<select class="update_preview" data-setting="osd_plus_code_digits" data-live="true"></select> Plus Code Digits
</label>
<div class="helpicon cf_tip" data-i18n_title="osdSettingPLUS_CODE_SHORT_HELP"></div>
<label>
<select class="update_preview" data-setting="osd_plus_code_short" data-live="true"></select> Plus Code Remove Leading Digits
</label>
<label>
<select class="update_preview" data-setting="osd_crosshairs_style" data-live="true"></select> Crosshairs Style
</label>

View file

@ -1191,8 +1191,9 @@ OSD.constants = {
id: 97,
preview: function() {
let digits = parseInt(Settings.getInputValue('osd_plus_code_digits')) + 1;
let digitsRemoved = parseInt(Settings.getInputValue('osd_plus_code_short')) * 2;
console.log("DITIS", digits);
return '9547X6PM+VWCCC'.substr(0, digits);
return '9547X6PM+VWCCC'.substr(digitsRemoved, digits-digitsRemoved);
}
},
{