1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 08:15:22 +03:00

dangerous things that people want...

This commit is contained in:
cTn 2014-06-23 19:50:39 +02:00
parent 8d18b6f10e
commit 86aa6a282c
2 changed files with 34 additions and 34 deletions

View file

@ -230,35 +230,7 @@ GUI_control.prototype.tab_switch_cleanup = function(callback) {
GUI.interval_remove('motor_pull');
GUI.interval_remove('status_pull');
// only enforce mincommand if necessary
if (MOTOR_DATA != undefined) {
var update = false;
for (var i = 0; i < MOTOR_DATA.length; i++) {
if (MOTOR_DATA[i] > MISC.mincommand) {
update = true;
break;
}
}
if (update) {
// send data to mcu
var buffer_out = [];
for (var i = 0; i < 8; i++) {
buffer_out.push(lowByte(MISC.mincommand));
buffer_out.push(highByte(MISC.mincommand));
}
MSP.send_message(MSP_codes.MSP_SET_MOTOR, buffer_out, false, function() {
if (callback) callback();
});
} else {
if (callback) callback();
}
} else {
if (callback) callback();
}
if (callback) callback();
break;
case 'sensors':
GUI.interval_kill_all();