mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
polish
This commit is contained in:
parent
12847de8ba
commit
13ce2dc11b
2 changed files with 4 additions and 4 deletions
|
@ -511,13 +511,13 @@ function send_message(code, data, callback_sent, callback_msp) {
|
||||||
obj.timer = setInterval(function() {
|
obj.timer = setInterval(function() {
|
||||||
console.log('MSP data request timed-out: ' + code);
|
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
|
}, 1000); // we should be able to define timeout in the future
|
||||||
|
|
||||||
MSP.callbacks.push(obj);
|
MSP.callbacks.push(obj);
|
||||||
|
|
||||||
serial.send(bufferOut, function(writeInfo) {
|
serial.send(bufferOut, function(sendInfo) {
|
||||||
if (writeInfo.bytesSent > 0) {
|
if (sendInfo.bytesSent > 0) {
|
||||||
if (callback_sent) callback_sent();
|
if (callback_sent) callback_sent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -75,7 +75,7 @@ var serial = {
|
||||||
if (!self.transmitting) {
|
if (!self.transmitting) {
|
||||||
self.transmitting = true;
|
self.transmitting = true;
|
||||||
|
|
||||||
var sending = function() {
|
function sending() {
|
||||||
// store inside separate variables in case array gets destroyed
|
// store inside separate variables in case array gets destroyed
|
||||||
var data = self.output_buffer[0].data;
|
var data = self.output_buffer[0].data;
|
||||||
var callback = self.output_buffer[0].callback;
|
var callback = self.output_buffer[0].callback;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue