Add OSD anti gravity element
parent
850f51e345
commit
684c118f23
|
@ -3292,6 +3292,9 @@
|
||||||
"osdDescElementCoreTemperature": {
|
"osdDescElementCoreTemperature": {
|
||||||
"message": "Temperature of the STM32 MCU core"
|
"message": "Temperature of the STM32 MCU core"
|
||||||
},
|
},
|
||||||
|
"osdDescAntiGravity": {
|
||||||
|
"message": "Enables an indicator when the anti gravity is active"
|
||||||
|
},
|
||||||
|
|
||||||
"osdDescStatMaxSpeed": {
|
"osdDescStatMaxSpeed": {
|
||||||
"message": "Maximum recorded speed"
|
"message": "Maximum recorded speed"
|
||||||
|
|
|
@ -517,7 +517,7 @@ OSD.constants = {
|
||||||
name: 'GPS_SPEED',
|
name: 'GPS_SPEED',
|
||||||
desc: 'osdDescElementGPSSpeed',
|
desc: 'osdDescElementGPSSpeed',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 330,
|
draw_order: 430,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
return ' 40' + (osd_data.unit_mode === 0 ? 'M' : 'K');
|
return ' 40' + (osd_data.unit_mode === 0 ? 'M' : 'K');
|
||||||
|
@ -527,7 +527,7 @@ OSD.constants = {
|
||||||
name: 'GPS_SATS',
|
name: 'GPS_SATS',
|
||||||
desc: 'osdDescElementGPSSats',
|
desc: 'osdDescElementGPSSats',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 320,
|
draw_order: 420,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: FONT.symbol(SYM.GPS_SAT_L) + FONT.symbol(SYM.GPS_SAT_R) + '14'
|
preview: FONT.symbol(SYM.GPS_SAT_L) + FONT.symbol(SYM.GPS_SAT_R) + '14'
|
||||||
},
|
},
|
||||||
|
@ -535,7 +535,7 @@ OSD.constants = {
|
||||||
name: 'GPS_LON',
|
name: 'GPS_LON',
|
||||||
desc: 'osdDescElementGPSLon',
|
desc: 'osdDescElementGPSLon',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 350,
|
draw_order: 450,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: FONT.symbol(SYM.ARROW_EAST) + '-000.0000000'
|
preview: FONT.symbol(SYM.ARROW_EAST) + '-000.0000000'
|
||||||
},
|
},
|
||||||
|
@ -543,7 +543,7 @@ OSD.constants = {
|
||||||
name: 'GPS_LAT',
|
name: 'GPS_LAT',
|
||||||
desc: 'osdDescElementGPSLat',
|
desc: 'osdDescElementGPSLat',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 340,
|
draw_order: 440,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: FONT.symbol(SYM.ARROW_NORTH) + '-00.0000000 '
|
preview: FONT.symbol(SYM.ARROW_NORTH) + '-00.0000000 '
|
||||||
},
|
},
|
||||||
|
@ -647,7 +647,7 @@ OSD.constants = {
|
||||||
name: 'HOME_DIRECTION',
|
name: 'HOME_DIRECTION',
|
||||||
desc: 'osdDescElementHomeDirection',
|
desc: 'osdDescElementHomeDirection',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 370,
|
draw_order: 470,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: FONT.symbol(SYM.ARROW_SOUTH + 2)
|
preview: FONT.symbol(SYM.ARROW_SOUTH + 2)
|
||||||
},
|
},
|
||||||
|
@ -655,7 +655,7 @@ OSD.constants = {
|
||||||
name: 'HOME_DISTANCE',
|
name: 'HOME_DISTANCE',
|
||||||
desc: 'osdDescElementHomeDistance',
|
desc: 'osdDescElementHomeDistance',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 360,
|
draw_order: 460,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
return '43' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE) + (semver.gte(CONFIG.apiVersion, "1.37.0")?' ':'');
|
return '43' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE) + (semver.gte(CONFIG.apiVersion, "1.37.0")?' ':'');
|
||||||
|
@ -701,7 +701,7 @@ OSD.constants = {
|
||||||
name: 'ESC_TEMPERATURE',
|
name: 'ESC_TEMPERATURE',
|
||||||
desc: 'osdDescElementEscTemperature',
|
desc: 'osdDescElementEscTemperature',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 380,
|
draw_order: 480,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: FONT.symbol(SYM.TEMP_C) + '45'
|
preview: FONT.symbol(SYM.TEMP_C) + '45'
|
||||||
},
|
},
|
||||||
|
@ -709,7 +709,7 @@ OSD.constants = {
|
||||||
name: 'ESC_RPM',
|
name: 'ESC_RPM',
|
||||||
desc: 'osdDescElementEscRpm',
|
desc: 'osdDescElementEscRpm',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 390,
|
draw_order: 490,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: '226000'
|
preview: '226000'
|
||||||
},
|
},
|
||||||
|
@ -725,7 +725,7 @@ OSD.constants = {
|
||||||
name: 'RTC_DATE_TIME',
|
name: 'RTC_DATE_TIME',
|
||||||
desc: 'osdDescElementRtcDateTime',
|
desc: 'osdDescElementRtcDateTime',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 400,
|
draw_order: 500,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: '2017-11-11 16:20:00'
|
preview: '2017-11-11 16:20:00'
|
||||||
},
|
},
|
||||||
|
@ -733,7 +733,7 @@ OSD.constants = {
|
||||||
name: 'ADJUSTMENT_RANGE',
|
name: 'ADJUSTMENT_RANGE',
|
||||||
desc: 'osdDescElementAdjustmentRange',
|
desc: 'osdDescElementAdjustmentRange',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 410,
|
draw_order: 510,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: 'PITCH/ROLL P: 42'
|
preview: 'PITCH/ROLL P: 42'
|
||||||
},
|
},
|
||||||
|
@ -761,11 +761,19 @@ OSD.constants = {
|
||||||
name: 'CORE_TEMPERATURE',
|
name: 'CORE_TEMPERATURE',
|
||||||
desc: 'osdDescElementCoreTemperature',
|
desc: 'osdDescElementCoreTemperature',
|
||||||
default_position: -1,
|
default_position: -1,
|
||||||
draw_order: 420,
|
draw_order: 520,
|
||||||
positionable: true,
|
positionable: true,
|
||||||
preview: function(osd_data) {
|
preview: function(osd_data) {
|
||||||
return OSD.generateTemperaturePreview(osd_data, 33);
|
return OSD.generateTemperaturePreview(osd_data, 33);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
ANTI_GRAVITY: {
|
||||||
|
name: 'ANTI_GRAVITY',
|
||||||
|
desc: 'osdDescAntiGravity',
|
||||||
|
default_position: -1,
|
||||||
|
draw_order: 320,
|
||||||
|
positionable: true,
|
||||||
|
preview: 'AG'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
UNKNOWN_DISPLAY_FIELD: {
|
UNKNOWN_DISPLAY_FIELD: {
|
||||||
|
@ -976,6 +984,11 @@ OSD.chooseFields = function () {
|
||||||
F.ADJUSTMENT_RANGE,
|
F.ADJUSTMENT_RANGE,
|
||||||
F.CORE_TEMPERATURE
|
F.CORE_TEMPERATURE
|
||||||
]);
|
]);
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||||
|
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
|
||||||
|
F.ANTI_GRAVITY
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue