1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

removal of char_counter, new port_usage, i18n

added bitrate to serial object, removed last bits of 'port_handler'
interval code forgotten in the kill routines, new port_usage is now
saved in a separate file
This commit is contained in:
cTn 2014-03-29 00:59:39 +01:00
parent 241b44e893
commit 58d43c381b
11 changed files with 73 additions and 27 deletions

View file

@ -1,10 +1,11 @@
var serial = {
connectionId: -1,
connectionId: -1,
bitrate: 0,
bytes_received: 0,
bytes_sent: 0,
bytes_sent: 0,
transmitting: false,
output_buffer: [],
transmitting: false,
output_buffer: [],
connect: function(path, options, callback) {
var self = this;
@ -12,6 +13,7 @@ var serial = {
chrome.serial.connect(path, options, function(connectionInfo) {
if (connectionInfo !== undefined) {
self.connectionId = connectionInfo.connectionId;
self.bitrate = connectionInfo.bitrate;
self.bytes_received = 0;
self.bytes_sent = 0;
@ -48,6 +50,7 @@ var serial = {
console.log('SERIAL: Statistics - Sent: ' + self.bytes_sent + ' bytes, Received: ' + self.bytes_received + ' bytes');
self.connectionId = -1;
self.bitrate = 0;
callback(result);
});