mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +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() {
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue