mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 16:25:19 +03:00
Cleanup 2.1.1
This commit is contained in:
parent
79a16a8fe3
commit
d7c8695bf9
1 changed files with 0 additions and 20 deletions
20
tabs/osd.js
20
tabs/osd.js
|
@ -1282,7 +1282,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'MAP_SCALE',
|
name: 'MAP_SCALE',
|
||||||
id: 98,
|
id: 98,
|
||||||
min_version: '2.1.1',
|
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
var scale;
|
var scale;
|
||||||
if (OSD.data.preferences.units === 0) {
|
if (OSD.data.preferences.units === 0) {
|
||||||
|
@ -1296,7 +1295,6 @@ OSD.constants = {
|
||||||
{
|
{
|
||||||
name: 'MAP_REFERENCE',
|
name: 'MAP_REFERENCE',
|
||||||
id: 99,
|
id: 99,
|
||||||
min_version: '2.1.1',
|
|
||||||
preview: FONT.symbol(SYM.DIRECTION) + '\nN',
|
preview: FONT.symbol(SYM.DIRECTION) + '\nN',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -2122,24 +2120,6 @@ OSD.GUI.updateMapPreview = function(mapCenter, name, directionSymbol, centerSymb
|
||||||
if ($('input[name="' + name + '"]').prop('checked')) {
|
if ($('input[name="' + name + '"]').prop('checked')) {
|
||||||
var mapInitialX = OSD.data.display_size.x - 2;
|
var mapInitialX = OSD.data.display_size.x - 2;
|
||||||
OSD.GUI.checkAndProcessSymbolPosition(mapCenter, centerSymbol);
|
OSD.GUI.checkAndProcessSymbolPosition(mapCenter, centerSymbol);
|
||||||
if (semver.lt(CONFIG.flightControllerVersion, '2.1.1')) {
|
|
||||||
// INAV pre 2.1.1 had hardcoded map reference and scale
|
|
||||||
if (directionSymbol) {
|
|
||||||
OSD.GUI.checkAndProcessSymbolPosition(mapInitialX, SYM.DIRECTION);
|
|
||||||
OSD.GUI.checkAndProcessSymbolPosition(mapInitialX + OSD.data.display_size.x, directionSymbol.charCodeAt(0));
|
|
||||||
}
|
|
||||||
var scalePos = 1 + OSD.data.display_size.x * (OSD.data.display_size.y - 2);
|
|
||||||
OSD.GUI.checkAndProcessSymbolPosition(scalePos, SYM.SCALE);
|
|
||||||
var scale;
|
|
||||||
if (OSD.data.preferences.units === 0) {
|
|
||||||
scale = FONT.embed_dot("0.10") + FONT.symbol(SYM.MI);
|
|
||||||
} else {
|
|
||||||
scale = "100" + FONT.symbol(SYM.M);
|
|
||||||
}
|
|
||||||
for (var ii = 0; ii < scale.length; ii++) {
|
|
||||||
OSD.GUI.checkAndProcessSymbolPosition(scalePos + ii + 1, scale.charCodeAt(ii));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue