1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

enabling strict in last 2 tabs

This commit is contained in:
cTn 2014-08-09 20:51:06 +02:00 committed by Dominic Clifton
parent a893261e6d
commit cc8ca21cc0
2 changed files with 33 additions and 29 deletions

View file

@ -1,3 +1,5 @@
'use strict';
tabs.firmware_flasher = {}; tabs.firmware_flasher = {};
tabs.firmware_flasher.initialize = function (callback) { tabs.firmware_flasher.initialize = function (callback) {
GUI.active_tab_ref = this; GUI.active_tab_ref = this;
@ -187,7 +189,7 @@ tabs.firmware_flasher.initialize = function(callback) {
if (status) { if (status) {
var flashing_port; var flashing_port;
function start() { var start = function () {
PortHandler.port_detected('flash_next_device', function (result) { PortHandler.port_detected('flash_next_device', function (result) {
flashing_port = result[0]; flashing_port = result[0];
GUI.log('Detected: <strong>' + flashing_port + '</strong> - triggering flash on connect'); GUI.log('Detected: <strong>' + flashing_port + '</strong> - triggering flash on connect');
@ -201,7 +203,7 @@ tabs.firmware_flasher.initialize = function(callback) {
}, false, true); }, false, true);
} }
function end() { var end = function () {
PortHandler.port_removed('flashed_device_removed', function (result) { PortHandler.port_removed('flashed_device_removed', function (result) {
for (var i = 0; i < result.length; i++) { for (var i = 0; i < result.length; i++) {
if (result[i] == flashing_port) { if (result[i] == flashing_port) {

View file

@ -1,3 +1,5 @@
'use strict';
var MSP_pass_through = false; var MSP_pass_through = false;
tabs.logging = {}; tabs.logging = {};
@ -11,11 +13,11 @@ tabs.logging.initialize = function(callback) {
if (configuration_received) { if (configuration_received) {
MSP.send_message(MSP_codes.MSP_RC, false, false, get_motor_data); MSP.send_message(MSP_codes.MSP_RC, false, false, get_motor_data);
function get_motor_data() { var get_motor_data = function () {
MSP.send_message(MSP_codes.MSP_MOTOR, false, false, load_html); MSP.send_message(MSP_codes.MSP_MOTOR, false, false, load_html);
} }
function load_html() { var load_html = function () {
$('#content').load("./tabs/logging.html", process_html); $('#content').load("./tabs/logging.html", process_html);
} }
} else { } else {
@ -61,7 +63,7 @@ tabs.logging.initialize = function(callback) {
// print header for the csv file // print header for the csv file
print_head(); print_head();
function log_data_poll() { var log_data_poll = function () {
if (requests) { if (requests) {
// save current data (only after everything is initialized) // save current data (only after everything is initialized)
crunch_data(); crunch_data();