From 29e3de2c25b404c278c06a14b66a0374a8183f32 Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Fri, 12 Nov 2021 20:19:46 +0000 Subject: [PATCH] Update main.js Added reset for the OSD units if the FC is not connected. --- main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.js b/main.js index 232810c4..09407d5f 100644 --- a/main.js +++ b/main.js @@ -65,6 +65,11 @@ $(document).ready(function () { } globalSettings.proxyLayer = result.proxylayer; }); + + // Resets the OSD units used by the unit coversion when the FC is disconnected. + if (!CONFIGURATOR.connectionValid) { + globalSettings.osdUnits = null; + } // alternative - window.navigator.appVersion.match(/Chrome\/([0-9.]*)/)[1]; GUI.log('Running - OS: ' + GUI.operating_system + ', ' +