mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Separation of MSP code into protocol and config parts, will ease further development and readability
This commit is contained in:
parent
3679111878
commit
96115be10e
25 changed files with 2234 additions and 2198 deletions
|
@ -363,25 +363,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);
|
||||
}
|
||||
|
||||
|
@ -447,7 +447,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue