From 05a55c5b42eaac4c00996e72a2d2ff3549a75398 Mon Sep 17 00:00:00 2001 From: Asizon <43983086+Asizon@users.noreply.github.com> Date: Fri, 20 Mar 2020 15:57:00 +0100 Subject: [PATCH] Improving osd detection warnings --- locales/en/messages.json | 3 +++ src/css/main.css | 1 + src/js/tabs/osd.js | 7 +++++-- src/tabs/osd.html | 7 +++++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index 9325a1d4..42e8aa08 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -4070,6 +4070,9 @@ "osdSetupTitle": { "message": "OSD" }, + "osdSetupNoOsdChipDetectWarning": { + "message": "WARNING: No OSD chip was detected. Some flight controllers will not properly power the OSD chip unless connected to battery power. Please connect the battery before connecting the USB (PROPS REMOVED!)." + }, "osdSetupPreviewHelp": { "message": "Note: OSD preview may not show the actual font that is installed on the flight controller. The layout of individual elements may look different when older versions of the firmware are used - please check the look through your goggles before flying." }, diff --git a/src/css/main.css b/src/css/main.css index 3bc11517..672d0bcc 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1382,6 +1382,7 @@ dialog { display: block; transition: all ease 0.2s; text-decoration:none; + cursor: pointer; } .default_btn a.disabled { diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 2c71a55e..6f1d6943 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -2244,6 +2244,10 @@ TABS.osd.initialize = function (callback) { OSD.msp.decode(info); + if (!OSD.data.state.haveMax7456Video || !OSD.data.state.isMax7456Detected) { + $('.noOsdChipDetect').show(); + } + if (OSD.data.state.haveSomeOsd == 0) { $('.unsupported').fadeIn(); return; @@ -2466,11 +2470,10 @@ TABS.osd.initialize = function (callback) { if (!OSD.data.state.haveMax7456Video) { $('.requires-max7456').hide(); - $('.requires-detected-max7456').hide(); } if (!OSD.data.state.haveMax7456Video || !OSD.data.state.isMax7456Detected) { - $('.requires-detected-max7456').hide(); + $('.requires-detected-max7456').addClass('disabled'); } if (!OSD.data.state.haveOsdFeature) { diff --git a/src/tabs/osd.html b/src/tabs/osd.html index 35682bc5..1053f89b 100644 --- a/src/tabs/osd.html +++ b/src/tabs/osd.html @@ -6,6 +6,9 @@
+
+

+

@@ -198,8 +201,8 @@
-
- +
+