Merge pull request #732 from DanNixon/osd_stats_rtc_time

Add RTC date/time to OSD stat
10.3.x-maintenance
Michael Keller 2017-11-20 01:26:22 +13:00 committed by GitHub
commit a791255d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -2566,6 +2566,9 @@
"osdDescStatTimer2": {
"message": "Value of timer 2 at time of disarming"
},
"osdDescStatRtcDateTime": {
"message": "Date and time from real time clock"
},
"osdTimerSource": {
"message": "Source:"

View File

@ -702,6 +702,10 @@ OSD.constants = {
TIMER_2: {
name: 'TIMER_2',
desc: 'osdDescStatTimer2'
},
RTC_DATE_TIME: {
name: 'RTC_DATE_TIME',
desc: 'osdDescStatRtcDateTime'
}
},
ALL_WARNINGS: {
@ -863,6 +867,11 @@ OSD.chooseFields = function () {
F.MAX_DISTANCE,
F.BLACKBOX_LOG_NUMBER
];
if (semver.gte(CONFIG.apiVersion, "1.37.0")) {
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
F.RTC_DATE_TIME
]);
}
// Choose warnings
// Nothing much to do here, I'm preempting there being new warnings