Skip to content

Commit

Permalink
Only add telemetry when not included in firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Apr 20, 2024
1 parent 83a163a commit a492d15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/Features.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { bit_check, bit_set, bit_clear } from "./bit";
import { API_VERSION_1_44, API_VERSION_1_45 } from './data_storage';
import { API_VERSION_1_44, API_VERSION_1_45, API_VERSION_1_46 } from './data_storage';
import semver from "semver";
import { tracking } from "./Analytics";
import $ from 'jquery';
Expand Down Expand Up @@ -50,7 +50,10 @@ const Features = function (config) {
}
}

// Add TELEMETRY feature if any of the following build options are enabled
}

// Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT
if (semver.gte(config.apiVersion, API_VERSION_1_46)) {
let enableTelemetry = false;
if (config.buildOptions.some(opt => opt.includes('CRSF') || opt.includes('GHST') || opt.includes('FPORT'))) {
enableTelemetry = true;
Expand Down

0 comments on commit a492d15

Please sign in to comment.