1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 14:25:13 +03:00

MSP refactoring

This commit is contained in:
Pawel Spychalski (DzikuVx) 2016-11-23 17:10:33 +01:00 committed by Pawel Spychalski (DzikuVx)
parent 3311093cb1
commit 18a00dedf8
26 changed files with 2431 additions and 2426 deletions

View file

@ -361,25 +361,25 @@ TABS.sensors.initialize = function (callback) {
// data pulling timers
if (checkboxes[0] || checkboxes[1] || checkboxes[2]) {
GUI.interval_add('IMU_pull', function imu_data_pull() {
MSP.send_message(MSP_codes.MSP_RAW_IMU, false, false, update_imu_graphs);
MSP.send_message(MSPCodes.MSP_RAW_IMU, false, false, update_imu_graphs);
}, fastest, true);
}
if (checkboxes[3]) {
GUI.interval_add('altitude_pull', function altitude_data_pull() {
MSP.send_message(MSP_codes.MSP_ALTITUDE, false, false, update_altitude_graph);
MSP.send_message(MSPCodes.MSP_ALTITUDE, false, false, update_altitude_graph);
}, rates.baro, true);
}
if (checkboxes[4]) {
GUI.interval_add('sonar_pull', function sonar_data_pull() {
MSP.send_message(MSP_codes.MSP_SONAR, false, false, update_sonar_graphs);
MSP.send_message(MSPCodes.MSP_SONAR, false, false, update_sonar_graphs);
}, rates.sonar, true);
}
if (checkboxes[5]) {
GUI.interval_add('debug_pull', function debug_data_pull() {
MSP.send_message(MSP_codes.MSP_DEBUG, false, false, update_debug_graphs);
MSP.send_message(MSPCodes.MSP_DEBUG, false, false, update_debug_graphs);
}, rates.debug, true);
}
@ -445,7 +445,7 @@ TABS.sensors.initialize = function (callback) {
// status data pulled via separate timer with static speed
GUI.interval_add('status_pull', function status_pull() {
MSP.send_message(MSP_codes.MSP_STATUS);
MSP.send_message(MSPCodes.MSP_STATUS);
}, 250, true);
GUI.content_ready(callback);