From 48c67874f925823164da1ee506c7623a655b825d Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Thu, 29 Mar 2018 18:20:29 +0200 Subject: [PATCH] old mixer section hiden on compatible FC version --- js/fc.js | 3 +++ tabs/configuration.js | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/js/fc.js b/js/fc.js index c8817cbd..215deec2 100644 --- a/js/fc.js +++ b/js/fc.js @@ -60,6 +60,9 @@ var FC = { isRatesInDps: function () { return !!(typeof CONFIG != "undefined" && CONFIG.flightControllerIdentifier == "INAV" && semver.gt(CONFIG.flightControllerVersion, "1.1.0")); }, + isNewMixer: function () { + return !!(typeof CONFIG != "undefined" && semver.gte(CONFIG.flightControllerVersion, "1.9.1")); + }, resetState: function () { SENSOR_STATUS = { isHardwareHealthy: 0, diff --git a/tabs/configuration.js b/tabs/configuration.js index 6add3357..a2bd77ff 100644 --- a/tabs/configuration.js +++ b/tabs/configuration.js @@ -758,6 +758,14 @@ TABS.configuration.initialize = function (callback, scrollPosition) { } $('#batterycurrent').val([ANALOG.amperage.toFixed(2)]); }, 100, true); // 10 fps + + /* + * Hide mixer section + */ + if (FC.isNewMixer()) { + $('.mixer').addClass("is-hidden"); + } + GUI.content_ready(callback); } };