Merge pull request #1201 from timman2er/add-support-for-max-esc-temp-and-rpm

add support for esc max temp and rpm
10.5.x-maintenance
Michael Keller 2018-10-08 12:52:34 +13:00 committed by GitHub
commit b6f3f11ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -3575,6 +3575,12 @@
"osdDescStatGForce": {
"message": "Max G-Force experienced by the craft"
},
"osdDescStatEscTemperature": {
"message": "Max ESC temperature"
},
"osdDescStatEscRpm": {
"message": "Max ESC RPM"
},
"osdTimerSource": {

View File

@ -893,6 +893,14 @@ OSD.constants = {
MAX_G_FORCE: {
name: 'MAX_G_FORCE',
desc: 'osdDescStatGForce'
},
MAX_ESC_TEMP: {
name: 'MAX_ESC_TEMP',
desc: 'osdDescStatEscTemperature'
},
MAX_ESC_RPM: {
name: 'MAX_ESC_RPM',
desc: 'osdDescStatEscRpm'
}
},
ALL_WARNINGS: {
@ -1125,6 +1133,12 @@ OSD.chooseFields = function () {
F.BLACKBOX_LOG_NUMBER,
F.MAX_G_FORCE
];
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
F.MAX_ESC_TEMP,
F.MAX_ESC_RPM
]);
}
}
// Choose warnings