mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 09:15:49 +03:00
Add anonymous tracking of used features and serial rx provider so we can
better understand what features to focus on.
This commit is contained in:
parent
be58e56b20
commit
587a1025d9
1 changed files with 21 additions and 0 deletions
|
@ -129,6 +129,15 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
);
|
||||
}
|
||||
|
||||
function isFeatureEnabled(featureName) {
|
||||
for (var i = 0; i < features.length; i++) {
|
||||
if (features[i].name == featureName && bit_check(BF_CONFIG.features, features[i].bit)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var radioGroups = [];
|
||||
|
||||
var features_e = $('.features');
|
||||
|
@ -424,6 +433,18 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
_3D.neutral3d = parseInt($('input[name="3dneutral"]').val());
|
||||
_3D.deadband3d_throttle = ($('input[name="3ddeadbandthrottle"]').val());
|
||||
|
||||
// track feature usage
|
||||
if (isFeatureEnabled('RX_SERIAL')) {
|
||||
googleAnalytics.sendEvent('Setting', 'SerialRxProvider', serialRXtypes[BF_CONFIG.serialrx_type]);
|
||||
}
|
||||
|
||||
for (var i = 0; i < features.length; i++) {
|
||||
var featureName = features[i].name;
|
||||
if (isFeatureEnabled(featureName)) {
|
||||
googleAnalytics.sendEvent('Setting', 'Feature', featureName);
|
||||
}
|
||||
}
|
||||
|
||||
function save_serial_config() {
|
||||
if (semver.lt(CONFIG.apiVersion, "1.6.0")) {
|
||||
MSP.send_message(MSP_codes.MSP_SET_CF_SERIAL_CONFIG, MSP.crunch(MSP_codes.MSP_SET_CF_SERIAL_CONFIG), false, save_misc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue