1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00
This commit is contained in:
cTn 2014-03-29 22:27:21 +01:00
parent 12847de8ba
commit 13ce2dc11b
2 changed files with 4 additions and 4 deletions

View file

@ -511,13 +511,13 @@ function send_message(code, data, callback_sent, callback_msp) {
obj.timer = setInterval(function() {
console.log('MSP data request timed-out: ' + code);
serial.send(bufferOut, function(writeInfo) {});
serial.send(bufferOut, function(sendInfo) {});
}, 1000); // we should be able to define timeout in the future
MSP.callbacks.push(obj);
serial.send(bufferOut, function(writeInfo) {
if (writeInfo.bytesSent > 0) {
serial.send(bufferOut, function(sendInfo) {
if (sendInfo.bytesSent > 0) {
if (callback_sent) callback_sent();
}
});

View file

@ -75,7 +75,7 @@ var serial = {
if (!self.transmitting) {
self.transmitting = true;
var sending = function() {
function sending() {
// store inside separate variables in case array gets destroyed
var data = self.output_buffer[0].data;
var callback = self.output_buffer[0].callback;