Skip to content

Commit a791255

Browse files
authored
Merge pull request #732 from DanNixon/osd_stats_rtc_time
Add RTC date/time to OSD stat
2 parents ef67542 + c2178e5 commit a791255

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

_locales/en/messages.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,9 @@
25662566
"osdDescStatTimer2": {
25672567
"message": "Value of timer 2 at time of disarming"
25682568
},
2569+
"osdDescStatRtcDateTime": {
2570+
"message": "Date and time from real time clock"
2571+
},
25692572

25702573
"osdTimerSource": {
25712574
"message": "Source:"

tabs/osd.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,10 @@ OSD.constants = {
702702
TIMER_2: {
703703
name: 'TIMER_2',
704704
desc: 'osdDescStatTimer2'
705+
},
706+
RTC_DATE_TIME: {
707+
name: 'RTC_DATE_TIME',
708+
desc: 'osdDescStatRtcDateTime'
705709
}
706710
},
707711
ALL_WARNINGS: {
@@ -863,6 +867,11 @@ OSD.chooseFields = function () {
863867
F.MAX_DISTANCE,
864868
F.BLACKBOX_LOG_NUMBER
865869
];
870+
if (semver.gte(CONFIG.apiVersion, "1.37.0")) {
871+
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
872+
F.RTC_DATE_TIME
873+
]);
874+
}
866875

867876
// Choose warnings
868877
// Nothing much to do here, I'm preempting there being new warnings

0 commit comments

Comments
 (0)