mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Merge remote-tracking branch 'multiwii/master'
Conflicts: README.md _locales/en/messages.json changelog.html js/backup_restore.js js/data_storage.js js/msp.js js/protocols/stm32.js js/serial_backend.js main.css main.html main.js manifest.json tabs/auxiliary_configuration.css tabs/default.css tabs/firmware_flasher.js tabs/initial_setup.css tabs/initial_setup.html tabs/initial_setup.js tabs/modes.html tabs/modes.js tabs/motor_outputs.css tabs/motors.html tabs/receiver.css tabs/servos.js
This commit is contained in:
commit
a8cf910f51
108 changed files with 12813 additions and 4551 deletions
|
@ -2,11 +2,17 @@
|
|||
|
||||
TABS.logging = {};
|
||||
TABS.logging.initialize = function (callback) {
|
||||
GUI.active_tab_ref = this;
|
||||
GUI.active_tab = 'logging';
|
||||
googleAnalytics.sendAppView('Logging');
|
||||
var self = this;
|
||||
|
||||
var requested_properties = [];
|
||||
if (GUI.active_tab != 'logging') {
|
||||
GUI.active_tab = 'logging';
|
||||
googleAnalytics.sendAppView('Logging');
|
||||
}
|
||||
|
||||
var requested_properties = [],
|
||||
samples = 0,
|
||||
requests = 0,
|
||||
log_buffer = [];
|
||||
|
||||
if (CONFIGURATOR.connectionValid) {
|
||||
var get_motor_data = function () {
|
||||
|
@ -18,20 +24,6 @@ TABS.logging.initialize = function (callback) {
|
|||
}
|
||||
|
||||
MSP.send_message(MSP_codes.MSP_RC, false, false, get_motor_data);
|
||||
} else {
|
||||
CONFIGURATOR.mspPassThrough = true;
|
||||
|
||||
// we will initialize RC.channels array and MOTOR_DATA array manually
|
||||
RC.active_channels = 8;
|
||||
for (var i = 0; i < RC.active_channels; i++) {
|
||||
RC.channels[i] = 0;
|
||||
}
|
||||
|
||||
for (var i = 0; i < 8; i++) {
|
||||
MOTOR_DATA[i] = 0;
|
||||
}
|
||||
|
||||
$('#content').load("./tabs/logging.html", process_html);
|
||||
}
|
||||
|
||||
function process_html() {
|
||||
|
@ -68,10 +60,8 @@ TABS.logging.initialize = function (callback) {
|
|||
}
|
||||
|
||||
// request new
|
||||
if (!CONFIGURATOR.mspPassThrough) {
|
||||
for (var i = 0; i < requested_properties.length; i++, requests++) {
|
||||
MSP.send_message(MSP_codes[requested_properties[i]]);
|
||||
}
|
||||
for (var i = 0; i < requested_properties.length; i++, requests++) {
|
||||
MSP.send_message(MSP_codes[requested_properties[i]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,22 +101,6 @@ TABS.logging.initialize = function (callback) {
|
|||
}
|
||||
});
|
||||
|
||||
if (CONFIGURATOR.mspPassThrough) {
|
||||
$('a.back').show();
|
||||
|
||||
$('a.back').click(function() {
|
||||
if (GUI.connected_to) {
|
||||
$('a.connect').click();
|
||||
} else {
|
||||
GUI.tab_switch_cleanup(function () {
|
||||
CONFIGURATOR.mspPassThrough = false;
|
||||
$('#tabs > ul li').removeClass('active');
|
||||
TABS.default.initialize();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
chrome.storage.local.get('logging_file_entry', function (result) {
|
||||
if (result.logging_file_entry) {
|
||||
chrome.fileSystem.restoreEntry(result.logging_file_entry, function (entry) {
|
||||
|
@ -201,10 +175,6 @@ TABS.logging.initialize = function (callback) {
|
|||
append_to_file(head);
|
||||
}
|
||||
|
||||
var samples = 0,
|
||||
requests = 0,
|
||||
log_buffer = [];
|
||||
|
||||
function crunch_data() {
|
||||
var sample = millitime();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue