mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Remove Google Analytics (#3148)
This commit is contained in:
parent
96aeab67f4
commit
b6d8efc9f8
24 changed files with 30 additions and 743 deletions
|
@ -2,17 +2,10 @@ import { i18n } from '../localization';
|
|||
|
||||
const power = {
|
||||
supported: false,
|
||||
analyticsChanges: {},
|
||||
};
|
||||
|
||||
power.initialize = function (callback) {
|
||||
const self = this;
|
||||
|
||||
if (GUI.active_tab != 'power') {
|
||||
GUI.active_tab = 'power';
|
||||
// Disabled on merge into betaflight-configurator
|
||||
//googleAnalytics.sendAppView('Power');
|
||||
}
|
||||
GUI.active_tab = 'power';
|
||||
|
||||
if (GUI.calibrationManager) {
|
||||
GUI.calibrationManager.destroy();
|
||||
|
@ -111,14 +104,6 @@ power.initialize = function (callback) {
|
|||
$(`input[name="vbatresdivmultiplier-${index}"]`).val(voltageDataSource[index].vbatresdivmultiplier);
|
||||
}
|
||||
|
||||
$('input[name="vbatscale-0"]').change(function () {
|
||||
const value = parseInt($(this).val());
|
||||
|
||||
if (value !== voltageDataSource[0].vbatscale) {
|
||||
self.analyticsChanges['PowerVBatUpdated'] = value;
|
||||
}
|
||||
});
|
||||
|
||||
// amperage meters
|
||||
if (FC.BATTERY_CONFIG.currentMeterSource == 0) {
|
||||
$('.boxAmperageConfiguration').hide();
|
||||
|
@ -169,26 +154,6 @@ power.initialize = function (callback) {
|
|||
$(`input[name="amperageoffset-${index}"]`).val(currentDataSource[index].offset);
|
||||
}
|
||||
|
||||
$('input[name="amperagescale-0"]').change(function () {
|
||||
if (FC.BATTERY_CONFIG.currentMeterSource === 1) {
|
||||
let value = parseInt($(this).val());
|
||||
|
||||
if (value !== currentDataSource[0].scale) {
|
||||
self.analyticsChanges['PowerAmperageUpdated'] = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name="amperagescale-1"]').change(function () {
|
||||
if (FC.BATTERY_CONFIG.currentMeterSource === 2) {
|
||||
let value = parseInt($(this).val());
|
||||
|
||||
if (value !== currentDataSource[1].scale) {
|
||||
self.analyticsChanges['PowerAmperageUpdated'] = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(FC.BATTERY_CONFIG.voltageMeterSource == 1 || FC.BATTERY_CONFIG.currentMeterSource == 1 || FC.BATTERY_CONFIG.currentMeterSource == 2) {
|
||||
$('.calibration').show();
|
||||
} else {
|
||||
|
@ -432,14 +397,6 @@ power.initialize = function (callback) {
|
|||
$('output[name="amperagenewscale"').val(amperagenewscale);
|
||||
|
||||
$('a.applycalibration').click(function() {
|
||||
if (vbatscalechanged) {
|
||||
self.analyticsChanges['PowerVBatUpdated'] = 'Calibrated';
|
||||
}
|
||||
|
||||
if (amperagescalechanged) {
|
||||
self.analyticsChanges['PowerAmperageUpdated'] = 'Calibrated';
|
||||
}
|
||||
|
||||
calibrationconfirmed = true;
|
||||
GUI.calibrationManagerConfirmation.close();
|
||||
updateDisplay(FC.VOLTAGE_METER_CONFIGS, FC.CURRENT_METER_CONFIGS);
|
||||
|
@ -471,8 +428,6 @@ power.initialize = function (callback) {
|
|||
FC.BATTERY_CONFIG.vbatwarningcellvoltage = parseFloat($('input[name="warningcellvoltage"]').val());
|
||||
FC.BATTERY_CONFIG.capacity = parseInt($('input[name="capacity"]').val());
|
||||
|
||||
analytics.sendSaveAndChangeEvents(analytics.EVENT_CATEGORIES.FLIGHT_CONTROLLER, self.analyticsChanges, 'power');
|
||||
|
||||
save_power_config();
|
||||
});
|
||||
|
||||
|
@ -507,9 +462,6 @@ power.initialize = function (callback) {
|
|||
|
||||
function process_html() {
|
||||
initDisplay();
|
||||
|
||||
self.analyticsChanges = {};
|
||||
|
||||
// translate to user-selected language
|
||||
i18n.localizePage();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue