|
|
|
@ -155,6 +155,7 @@ public:
@@ -155,6 +155,7 @@ public:
|
|
|
|
|
SerialProtocol_Torqeedo = 39, |
|
|
|
|
SerialProtocol_AIS = 40, |
|
|
|
|
SerialProtocol_CoDevESC = 41, |
|
|
|
|
SerialProtocol_MSP_DisplayPort = 42, |
|
|
|
|
SerialProtocol_NumProtocols // must be the last value
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -162,7 +163,7 @@ public:
@@ -162,7 +163,7 @@ public:
|
|
|
|
|
static AP_SerialManager *get_singleton(void) { |
|
|
|
|
return _singleton; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// init_console - initialise console at default baud rate
|
|
|
|
|
void init_console(); |
|
|
|
|
|
|
|
|
@ -181,7 +182,7 @@ public:
@@ -181,7 +182,7 @@ public:
|
|
|
|
|
|
|
|
|
|
// find_portnum - find port number (SERIALn index) for a protocol and instance, -1 for not found
|
|
|
|
|
int8_t find_portnum(enum SerialProtocol protocol, uint8_t instance) const; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// get_mavlink_channel - provides the mavlink channel associated with a given protocol (and instance)
|
|
|
|
|
// instance should be zero if searching for the first instance, 1 for the second, etc
|
|
|
|
|
// returns true if a channel is found, false if not
|
|
|
|
@ -193,7 +194,7 @@ public:
@@ -193,7 +194,7 @@ public:
|
|
|
|
|
// get_mavlink_protocol - provides the specific MAVLink protocol for a
|
|
|
|
|
// given channel, or SerialProtocol_None if not found
|
|
|
|
|
SerialProtocol get_mavlink_protocol(mavlink_channel_t mav_chan) const; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// set_blocking_writes_all - sets block_writes on or off for all serial channels
|
|
|
|
|
void set_blocking_writes_all(bool blocking); |
|
|
|
|
|
|
|
|
@ -217,7 +218,7 @@ public:
@@ -217,7 +218,7 @@ public:
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
static AP_SerialManager *_singleton; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// array of uart info
|
|
|
|
|
struct UARTState { |
|
|
|
|
AP_Int8 protocol; |
|
|
|
|