mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
add name to some anonymous functions in data tab
This commit is contained in:
parent
82badeece1
commit
1597de647c
1 changed files with 8 additions and 8 deletions
|
@ -2,7 +2,7 @@ function tab_initialize_sensors() {
|
||||||
ga_tracker.sendAppView('Sensor Page');
|
ga_tracker.sendAppView('Sensor Page');
|
||||||
GUI.active_tab = 'sensors';
|
GUI.active_tab = 'sensors';
|
||||||
|
|
||||||
$('#content').load("./tabs/sensors.html", function() {
|
$('#content').load("./tabs/sensors.html", function load_html() {
|
||||||
// Always start with default/empty sensor data array, clean slate all
|
// Always start with default/empty sensor data array, clean slate all
|
||||||
for (var i = 0; i < 3; i++) SENSOR_DATA.accelerometer[i] = 0;
|
for (var i = 0; i < 3; i++) SENSOR_DATA.accelerometer[i] = 0;
|
||||||
for (var i = 0; i < 3; i++) SENSOR_DATA.gyroscope[i] = 0;
|
for (var i = 0; i < 3; i++) SENSOR_DATA.gyroscope[i] = 0;
|
||||||
|
@ -219,15 +219,15 @@ function tab_initialize_sensors() {
|
||||||
GUI.interval_kill_all(['port_handler', 'port_usage']);
|
GUI.interval_kill_all(['port_handler', 'port_usage']);
|
||||||
|
|
||||||
// data pulling timers
|
// data pulling timers
|
||||||
GUI.interval_add('status_pull', function() {
|
GUI.interval_add('status_pull', function status_data_pull() {
|
||||||
send_message(MSP_codes.MSP_STATUS, MSP_codes.MSP_STATUS);
|
send_message(MSP_codes.MSP_STATUS, MSP_codes.MSP_STATUS);
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
GUI.interval_add('IMU_pull', function() {
|
GUI.interval_add('IMU_pull', function imu_data_pull() {
|
||||||
send_message(MSP_codes.MSP_RAW_IMU, MSP_codes.MSP_RAW_IMU);
|
send_message(MSP_codes.MSP_RAW_IMU, MSP_codes.MSP_RAW_IMU);
|
||||||
}, fastest);
|
}, fastest);
|
||||||
|
|
||||||
GUI.interval_add('altitude_pull', function() {
|
GUI.interval_add('altitude_pull', function altitude_data_pull() {
|
||||||
send_message(MSP_codes.MSP_ALTITUDE, MSP_codes.MSP_ALTITUDE);
|
send_message(MSP_codes.MSP_ALTITUDE, MSP_codes.MSP_ALTITUDE);
|
||||||
|
|
||||||
baro_data[0].push([samples_baro_i, SENSOR_DATA.altitude]);
|
baro_data[0].push([samples_baro_i, SENSOR_DATA.altitude]);
|
||||||
|
@ -243,7 +243,7 @@ function tab_initialize_sensors() {
|
||||||
samples_baro_i++;
|
samples_baro_i++;
|
||||||
}, rates.baro);
|
}, rates.baro);
|
||||||
|
|
||||||
GUI.interval_add('debug_pull', function() {
|
GUI.interval_add('debug_pull', function debug_data_pull() {
|
||||||
send_message(MSP_codes.MSP_DEBUG, MSP_codes.MSP_DEBUG);
|
send_message(MSP_codes.MSP_DEBUG, MSP_codes.MSP_DEBUG);
|
||||||
|
|
||||||
for (var i = 0; i < 4; i++) {
|
for (var i = 0; i < 4; i++) {
|
||||||
|
@ -268,7 +268,7 @@ function tab_initialize_sensors() {
|
||||||
}, rates.debug);
|
}, rates.debug);
|
||||||
|
|
||||||
// processing timers
|
// processing timers
|
||||||
GUI.interval_add('process_gyro', function() {
|
GUI.interval_add('process_gyro', function process_gyro_data() {
|
||||||
gyro_data[0].push([samples_gyro_i, SENSOR_DATA.gyroscope[0]]);
|
gyro_data[0].push([samples_gyro_i, SENSOR_DATA.gyroscope[0]]);
|
||||||
gyro_data[1].push([samples_gyro_i, SENSOR_DATA.gyroscope[1]]);
|
gyro_data[1].push([samples_gyro_i, SENSOR_DATA.gyroscope[1]]);
|
||||||
gyro_data[2].push([samples_gyro_i, SENSOR_DATA.gyroscope[2]]);
|
gyro_data[2].push([samples_gyro_i, SENSOR_DATA.gyroscope[2]]);
|
||||||
|
@ -288,7 +288,7 @@ function tab_initialize_sensors() {
|
||||||
samples_gyro_i++;
|
samples_gyro_i++;
|
||||||
}, rates.gyro, true);
|
}, rates.gyro, true);
|
||||||
|
|
||||||
GUI.interval_add('process_accel', function() {
|
GUI.interval_add('process_accel', function process_accel_data() {
|
||||||
accel_data[0].push([samples_accel_i, SENSOR_DATA.accelerometer[0]]);
|
accel_data[0].push([samples_accel_i, SENSOR_DATA.accelerometer[0]]);
|
||||||
accel_data[1].push([samples_accel_i, SENSOR_DATA.accelerometer[1]]);
|
accel_data[1].push([samples_accel_i, SENSOR_DATA.accelerometer[1]]);
|
||||||
accel_data[2].push([samples_accel_i, SENSOR_DATA.accelerometer[2]]);
|
accel_data[2].push([samples_accel_i, SENSOR_DATA.accelerometer[2]]);
|
||||||
|
@ -308,7 +308,7 @@ function tab_initialize_sensors() {
|
||||||
samples_accel_i++;
|
samples_accel_i++;
|
||||||
}, rates.accel, true);
|
}, rates.accel, true);
|
||||||
|
|
||||||
GUI.interval_add('process_mag', function() {
|
GUI.interval_add('process_mag', function process_mag_data() {
|
||||||
mag_data[0].push([samples_mag_i, SENSOR_DATA.magnetometer[0]]);
|
mag_data[0].push([samples_mag_i, SENSOR_DATA.magnetometer[0]]);
|
||||||
mag_data[1].push([samples_mag_i, SENSOR_DATA.magnetometer[1]]);
|
mag_data[1].push([samples_mag_i, SENSOR_DATA.magnetometer[1]]);
|
||||||
mag_data[2].push([samples_mag_i, SENSOR_DATA.magnetometer[2]]);
|
mag_data[2].push([samples_mag_i, SENSOR_DATA.magnetometer[2]]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue