From 741fd0ce6b312bec6ec5a3d712002321c7091491 Mon Sep 17 00:00:00 2001 From: Andrey Semjonov <50518855+AndreySemjonov@users.noreply.github.com> Date: Mon, 18 May 2020 21:21:06 +0300 Subject: [PATCH] Fixing features for Antigravity and Dynamic_filter (#187) --- src/js/Features.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/js/Features.js b/src/js/Features.js index a5863abf1..bfe7b0936 100644 --- a/src/js/Features.js +++ b/src/js/Features.js @@ -84,14 +84,16 @@ var Features = function (config) { if (semver.gte(CONFIG.apiVersion, "1.36.0")) { //quick & dirty 0.3.0 - if (semver.lt(CONFIG.flightControllerVersion, "0.3.0")) { + if (semver.lt(CONFIG.apiVersion, "1.47.0")) { features.push( - {bit: 28, group: 'other', name: 'ANTI_GRAVITY'} + {bit: 28, group: 'other', name: 'ANTI_GRAVITY'}, + {bit: 29, group: 'other', name: 'DYNAMIC_FILTER'} + ); + } else { + features.push( + {bit: 28, group: 'other', name: 'DYNAMIC_FILTER'} ); } - features.push( - {bit: 29, group: 'other', name: 'DYNAMIC_FILTER'} - ); } if (!semver.gte(CONFIG.apiVersion, "1.36.0")) { @@ -102,9 +104,15 @@ var Features = function (config) { } if (semver.gte(CONFIG.apiVersion, "1.39.0")) { - features.push( - { bit: 30, group: 'other', name: 'LEGACY_SA_SUPPORT', haveTip: true } - ); + if (semver.lt(CONFIG.apiVersion, "1.47.0")) { + features.push( + { bit: 30, group: 'other', name: 'LEGACY_SA_SUPPORT', haveTip: true } + ); + } else { + features.push( + { bit: 29, group: 'other', name: 'LEGACY_SA_SUPPORT', haveTip: true } + ); + } } }