extra failsafe to trigger while leaving motor tab

10.3.x-maintenance
cTn 2014-02-03 09:28:10 +01:00
parent 60cdd51dfa
commit 9de5cdcf84
1 changed files with 10 additions and 0 deletions

View File

@ -213,6 +213,16 @@ GUI_control.prototype.tab_switch_cleanup = function(callback) {
case 'motor_outputs':
GUI.interval_remove('motor_poll');
// send data to mcu
var buffer_out = [];
for (var i = 0; i < 8; i++) {
buffer_out.push(lowByte(MISC.minthrottle));
buffer_out.push(highByte(MISC.minthrottle));
}
send_message(MSP_codes.MSP_SET_MOTOR, buffer_out);
if (callback) callback();
break;
case 'sensors':