From 829b0b468a474c9d5b8fe7793f86d8c6f516c2cd Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Thu, 29 Jun 2017 10:44:48 +0100 Subject: [PATCH] Added new timer elements and stats Adds array length checking on configurator side (old timers on stats can simply be replaced as the MSP API version has ot changed since they were first added) --- _locales/en/messages.json | 22 ++++ tabs/osd.css | 11 +- tabs/osd.html | 13 ++- tabs/osd.js | 217 +++++++++++++++++++++++++++++++++++--- 4 files changed, 242 insertions(+), 21 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 1e6002de..eb6f430a 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2305,6 +2305,12 @@ "osdDescElementCompassBar": { "message": "Graphical compass bar showing current heading" }, + "osdDescElementTimer1" : { + "message": "Shows the value of timer 1" + }, + "osdDescElementTimer2" : { + "message": "Shows the value of timer 2" + }, "osdDescStatMaxSpeed": { "message": "Maximum recorded speed" @@ -2342,6 +2348,22 @@ "osdDescStatBlackboxLogNumber": { "message": "Log number for this flights Blackbox log" }, + "osdDescStatTimer1": { + "message": "Value of timer 1 at time of disarming" + }, + "osdDescStatTimer2": { + "message": "Value of timer 2 at time of disarming" + }, + + "osdTimerSourceTooltip": { + "message": "Select the timer source, this controls the duration/event that the timer measures" + }, + "osdTimerPrecisionTooltip": { + "message": "Select the timer precision, this controls to what precision the time is reported in" + }, + "osdTimerAlarmTooltip": { + "message": "Select the timer alarm threshold in minutes, when the time exceeds this value the OSD element will blink, setting this to 0 disables the alarm" + }, "mainHelpArmed": { "message": "Motor Arming" diff --git a/tabs/osd.css b/tabs/osd.css index 6560f3c0..a114a703 100644 --- a/tabs/osd.css +++ b/tabs/osd.css @@ -375,12 +375,10 @@ button { padding:2px; margin-top: -2px; display: none; - } .tab-osd .switchable-field label { margin-left: 5px; - } .tab-osd .switchable-fields { @@ -388,7 +386,6 @@ button { margin-top: 5px; margin-bottom: 8px; width: 100%; - } .spacer_box_title span { @@ -450,8 +447,12 @@ button { font-weight: normal; } - - +.timer-option { + float: none !important; + padding: 2px; + margin-left: 10px; + display: inline !important; +} @media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) { .tab-osd .content_wrapper { diff --git a/tabs/osd.html b/tabs/osd.html index 2129fa6c..9b206b78 100755 --- a/tabs/osd.html +++ b/tabs/osd.html @@ -61,6 +61,17 @@
+