Skip to content
Closed
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
14 changes: 14 additions & 0 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5325,6 +5325,13 @@
"osdDescTotalFlights": {
"message": "Approximate total number of flights"
},
"osdTextTotalPacks": {
"message": "Total packs",
"description": "One of the elements of the OSD"
},
"osdDescTotalPacks": {
"message": "Number of flown packs"
},
"osdTextElementUpDownReference": {
"message": "Up (Pitch 90 deg)/Down (Pitch -90 deg) Reference",
"description": "OSD Symbol to show when pitch is approaching vertical (90 deg, U) and D for nose down (-90 deg, D)"
Expand Down Expand Up @@ -5508,6 +5515,13 @@
"osdDescStatTotalFlights": {
"message": "Total number of flights"
},
"osdTextStatTotalPacks": {
"message": "Packs count total",
"description": "One of the statistics that can be shown at the end of the flight in the OSD"
},
"osdDescStatTotalPacks": {
"message": "Total number of flown packs"
},
"osdTextStatTotalFlightTime": {
"message": "Fly time total",
"description": "One of the statistics that can be shown at the end of the flight in the OSD"
Expand Down
24 changes: 22 additions & 2 deletions src/js/tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1268,12 +1268,21 @@ OSD.loadDisplayFields = function() {
positionable: true,
preview: "#9876",
},
TOTAL_PACKS: {
name: 'OSD_TOTAL_PACKS',
text: 'osdTextTotalPacks',
desc: 'osdDescTotalPacks',
defaultPosition: -1,
draw_order: 465,
positionable: true,
preview: "#123",
},
OSD_UP_DOWN_REFERENCE: {
name: 'OSD_UP_DOWN_REFERENCE',
text: 'osdTextElementUpDownReference',
desc: 'osdDescUpDownReference',
defaultPosition: 238,
draw_order: 465,
draw_order: 470,
positionable: true,
preview: 'U',
},
Expand All @@ -1282,7 +1291,7 @@ OSD.loadDisplayFields = function() {
text: 'osdTextElementTxUplinkPower',
desc: 'osdDescTxUplinkPower',
defaultPosition: -1,
draw_order: 470,
draw_order: 475,
positionable: true,
preview: `${FONT.symbol(SYM.RSSI)}250MW`,
},
Expand Down Expand Up @@ -1442,6 +1451,11 @@ OSD.constants = {
text: 'osdTextStatTotalFlights',
desc: 'osdDescStatTotalFlights',
},
STAT_TOTAL_PACKS: {
name: 'STAT_TOTAL_PACKS',
text: 'osdTextStatTotalPacks',
desc: 'osdDescStatTotalPacks',
},
STAT_TOTAL_FLIGHT_TIME: {
name: 'STAT_TOTAL_FLIGHT_TIME',
text: 'osdTextStatTotalFlightTime',
Expand Down Expand Up @@ -1710,6 +1724,7 @@ OSD.chooseFields = function() {
F.TOTAL_FLIGHTS,
F.OSD_UP_DOWN_REFERENCE,
F.OSD_TX_UPLINK_POWER,
F.TOTAL_PACKS,
]);
}
}
Expand Down Expand Up @@ -1810,6 +1825,11 @@ OSD.chooseFields = function() {
F.MIN_RSSI_DBM,
]);
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
F.STAT_TOTAL_PACKS,
]);
}
}

// Choose warnings
Expand Down