Merge pull request #2974 from jonmahoney15/watt-hours-consumed-osd-element
Watt Hours Consumed OSD element and post Flight Stat10.9-maintenance
commit
500dea5b14
|
@ -4968,6 +4968,13 @@
|
||||||
"osdDescElementMahDrawn": {
|
"osdDescElementMahDrawn": {
|
||||||
"message": "Total battery capacity used"
|
"message": "Total battery capacity used"
|
||||||
},
|
},
|
||||||
|
"osdTextElementWhDrawn": {
|
||||||
|
"message": "Battery current Wh drawn",
|
||||||
|
"description": "One of the elements of the OSD"
|
||||||
|
},
|
||||||
|
"osdDescElementWhDrawn": {
|
||||||
|
"message": "Total battery capacity used in Wh"
|
||||||
|
},
|
||||||
"osdTextElementCraftName": {
|
"osdTextElementCraftName": {
|
||||||
"message": "Craft name",
|
"message": "Craft name",
|
||||||
"description": "One of the elements of the OSD"
|
"description": "One of the elements of the OSD"
|
||||||
|
@ -5443,6 +5450,13 @@
|
||||||
"osdDescStatUsedMah": {
|
"osdDescStatUsedMah": {
|
||||||
"message": "Battery capacity used"
|
"message": "Battery capacity used"
|
||||||
},
|
},
|
||||||
|
"osdTextStatUsedWh": {
|
||||||
|
"message": "Battery Wh used",
|
||||||
|
"description": "One of the statistics that can be shown at the end of the flight in the OSD"
|
||||||
|
},
|
||||||
|
"osdDescStatUsedWh": {
|
||||||
|
"message": "Battery capacity used in Wh"
|
||||||
|
},
|
||||||
"osdTextStatMaxAltitude": {
|
"osdTextStatMaxAltitude": {
|
||||||
"message": "Altitude maximum",
|
"message": "Altitude maximum",
|
||||||
"description": "One of the statistics that can be shown at the end of the flight in the OSD"
|
"description": "One of the statistics that can be shown at the end of the flight in the OSD"
|
||||||
|
|
|
@ -742,6 +742,15 @@ OSD.loadDisplayFields = function() {
|
||||||
return semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36) ? ` 690${FONT.symbol(SYM.MAH)}` : `${FONT.symbol(SYM.MAH)}690`;
|
return semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36) ? ` 690${FONT.symbol(SYM.MAH)}` : `${FONT.symbol(SYM.MAH)}690`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
WH_DRAWN: {
|
||||||
|
name: 'WH_DRAWN',
|
||||||
|
text: 'osdTextElementWhDrawn',
|
||||||
|
desc: 'osdDescElementWhDrawn',
|
||||||
|
defaultPosition: -1,
|
||||||
|
draw_order: 145,
|
||||||
|
positionable: true,
|
||||||
|
preview: '1.10 WH',
|
||||||
|
},
|
||||||
CRAFT_NAME: {
|
CRAFT_NAME: {
|
||||||
name: 'CRAFT_NAME',
|
name: 'CRAFT_NAME',
|
||||||
text: 'osdTextElementCraftName',
|
text: 'osdTextElementCraftName',
|
||||||
|
@ -1373,6 +1382,11 @@ OSD.constants = {
|
||||||
text: 'osdTextStatUsedMah',
|
text: 'osdTextStatUsedMah',
|
||||||
desc: 'osdDescStatUsedMah',
|
desc: 'osdDescStatUsedMah',
|
||||||
},
|
},
|
||||||
|
USED_WH: {
|
||||||
|
name: 'USED_WH',
|
||||||
|
text: 'osdTextStatUsedWh',
|
||||||
|
desc: 'osdDescStatUsedWh',
|
||||||
|
},
|
||||||
MAX_ALTITUDE: {
|
MAX_ALTITUDE: {
|
||||||
name: 'MAX_ALTITUDE',
|
name: 'MAX_ALTITUDE',
|
||||||
text: 'osdTextStatMaxAltitude',
|
text: 'osdTextStatMaxAltitude',
|
||||||
|
@ -1645,6 +1659,7 @@ OSD.chooseFields = function() {
|
||||||
F.VTX_CHANNEL,
|
F.VTX_CHANNEL,
|
||||||
F.CURRENT_DRAW,
|
F.CURRENT_DRAW,
|
||||||
F.MAH_DRAWN,
|
F.MAH_DRAWN,
|
||||||
|
F.WH_DRAWN,
|
||||||
F.GPS_SPEED,
|
F.GPS_SPEED,
|
||||||
F.GPS_SATS,
|
F.GPS_SATS,
|
||||||
F.ALTITUDE,
|
F.ALTITUDE,
|
||||||
|
@ -1812,6 +1827,7 @@ OSD.chooseFields = function() {
|
||||||
F.MAX_ALTITUDE,
|
F.MAX_ALTITUDE,
|
||||||
F.BLACKBOX,
|
F.BLACKBOX,
|
||||||
F.BLACKBOX_LOG_NUMBER,
|
F.BLACKBOX_LOG_NUMBER,
|
||||||
|
F.USED_WH,
|
||||||
];
|
];
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_41)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_41)) {
|
||||||
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
|
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
|
||||||
|
|
Loading…
Reference in New Issue