mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Increased consistency with tracking parameters captured. (#3771)
This commit is contained in:
parent
fef7ca0407
commit
7847de80f1
5 changed files with 13 additions and 11 deletions
|
@ -56,7 +56,7 @@ CliAutoComplete.setEnabled = function(enable) {
|
||||||
};
|
};
|
||||||
|
|
||||||
CliAutoComplete.initialize = function($textarea, sendLine, writeToOutput) {
|
CliAutoComplete.initialize = function($textarea, sendLine, writeToOutput) {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.APPLICATION, 'CliAutoComplete', this.configEnabled);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.APPLICATION, 'CliAutoComplete', { configEnabled: this.configEnabled });
|
||||||
|
|
||||||
this.$textarea = $textarea;
|
this.$textarea = $textarea;
|
||||||
this.forceOpen = false;
|
this.forceOpen = false;
|
||||||
|
|
|
@ -356,7 +356,7 @@ function onOpen(openInfo) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'ConnectionRefusedFirmwareType', FC.CONFIG.flightControllerIdentifier);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'ConnectionRefusedFirmwareType', { identifier: FC.CONFIG.flightControllerIdentifier });
|
||||||
|
|
||||||
const dialog = $('.dialogConnectWarning')[0];
|
const dialog = $('.dialogConnectWarning')[0];
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ function onOpen(openInfo) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'ConnectionRefusedFirmwareVersion', FC.CONFIG.apiVersion);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'ConnectionRefusedFirmwareVersion', { apiVersion: FC.CONFIG.apiVersion });
|
||||||
|
|
||||||
const dialog = $('.dialogConnectWarning')[0];
|
const dialog = $('.dialogConnectWarning')[0];
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ function getCliCommand(command, cliBuffer) {
|
||||||
function copyToClipboard(text) {
|
function copyToClipboard(text) {
|
||||||
function onCopySuccessful() {
|
function onCopySuccessful() {
|
||||||
|
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'CliCopyToClipboard', text.length);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'CliCopyToClipboard', { length: text.length });
|
||||||
const button = TABS.cli.GUI.copyButton;
|
const button = TABS.cli.GUI.copyButton;
|
||||||
const origText = button.text();
|
const origText = button.text();
|
||||||
const origWidth = button.css("width");
|
const origWidth = button.css("width");
|
||||||
|
@ -191,7 +191,7 @@ cli.initialize = function (callback) {
|
||||||
if (self.outputHistory.length > 0 && writer.length === 0) {
|
if (self.outputHistory.length > 0 && writer.length === 0) {
|
||||||
writer.write(new Blob([self.outputHistory], {type: 'text/plain'}));
|
writer.write(new Blob([self.outputHistory], {type: 'text/plain'}));
|
||||||
} else {
|
} else {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'CliSave', self.outputHistory.length);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'CliSave', { length: self.outputHistory.length });
|
||||||
|
|
||||||
console.log('write complete');
|
console.log('write complete');
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ cli.initialize = function (callback) {
|
||||||
function executeSnippet(fileName) {
|
function executeSnippet(fileName) {
|
||||||
const commands = previewArea.val();
|
const commands = previewArea.val();
|
||||||
|
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'CliExecuteFromFile', fileName);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'CliExecuteFromFile', { filename: fileName });
|
||||||
|
|
||||||
executeCommands(commands);
|
executeCommands(commands);
|
||||||
self.GUI.snippetPreviewWindow.close();
|
self.GUI.snippetPreviewWindow.close();
|
||||||
|
|
|
@ -90,6 +90,8 @@ firmware_flasher.initialize = function (callback) {
|
||||||
firmwareSize: self.parsed_hex.bytes_total,
|
firmwareSize: self.parsed_hex.bytes_total,
|
||||||
firmwareName: filename,
|
firmwareName: filename,
|
||||||
firmwareSource: self.localFirmwareLoaded ? 'file' : 'http',
|
firmwareSource: self.localFirmwareLoaded ? 'file' : 'http',
|
||||||
|
selectedTarget: self.targetDetail?.target,
|
||||||
|
selectedRelease: self.targetDetail?.release,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +596,7 @@ firmware_flasher.initialize = function (callback) {
|
||||||
baud = parseInt($('#flash_manual_baud_rate').val());
|
baud = parseInt($('#flash_manual_baud_rate').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLASHING, 'Flashing', self.filename || null);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLASHING, 'Flashing', { filename: self.filename || null });
|
||||||
|
|
||||||
STM32.connect(port, baud, firmware, options);
|
STM32.connect(port, baud, firmware, options);
|
||||||
} else {
|
} else {
|
||||||
|
@ -602,7 +604,7 @@ firmware_flasher.initialize = function (callback) {
|
||||||
gui_log(i18n.getMessage('firmwareFlasherNoValidPort'));
|
gui_log(i18n.getMessage('firmwareFlasherNoValidPort'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLASHING, 'DFU Flashing', self.filename || null);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLASHING, 'DFU Flashing', { filename: self.filename || null });
|
||||||
|
|
||||||
STM32DFU.connect(usbDevices, firmware, options);
|
STM32DFU.connect(usbDevices, firmware, options);
|
||||||
}
|
}
|
||||||
|
@ -1152,7 +1154,7 @@ firmware_flasher.initialize = function (callback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLASHING, 'SaveFirmware', path);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLASHING, 'SaveFirmware', { path: path });
|
||||||
};
|
};
|
||||||
|
|
||||||
writer.write(blob);
|
writer.write(blob);
|
||||||
|
|
|
@ -658,7 +658,7 @@ vtx.initialize = function (callback) {
|
||||||
|
|
||||||
// we get here at the end of the truncate method, change to the new end
|
// we get here at the end of the truncate method, change to the new end
|
||||||
writer.onwriteend = function() {
|
writer.onwriteend = function() {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'VtxTableLuaSave', text.length);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'VtxTableLuaSave', { length: text.length });
|
||||||
console.log('Write VTX table lua file end');
|
console.log('Write VTX table lua file end');
|
||||||
gui_log(i18n.getMessage('vtxSavedLuaFileOk'));
|
gui_log(i18n.getMessage('vtxSavedLuaFileOk'));
|
||||||
};
|
};
|
||||||
|
@ -709,7 +709,7 @@ vtx.initialize = function (callback) {
|
||||||
|
|
||||||
// we get here at the end of the truncate method, change to the new end
|
// we get here at the end of the truncate method, change to the new end
|
||||||
writer.onwriteend = function() {
|
writer.onwriteend = function() {
|
||||||
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'VtxTableSave', text.length);
|
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'VtxTableSave', { length: text.length });
|
||||||
console.log(vtxConfig);
|
console.log(vtxConfig);
|
||||||
console.log('Write VTX file end');
|
console.log('Write VTX file end');
|
||||||
gui_log(i18n.getMessage('vtxSavedFileOk'));
|
gui_log(i18n.getMessage('vtxSavedFileOk'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue