mirror of https://github.com/ArduPilot/ardupilot
AP_SerialManager: added PPP serial type
This commit is contained in:
parent
a5fee135b0
commit
2cb177ef72
|
@ -580,6 +580,13 @@ void AP_SerialManager::init()
|
|||
uart->set_unbuffered_writes(true);
|
||||
break;
|
||||
#endif
|
||||
#if AP_NETWORKING_BACKEND_PPP
|
||||
case SerialProtocol_PPP:
|
||||
uart->begin(state[i].baudrate(),
|
||||
AP_SERIALMANAGER_PPP_BUFSIZE_RX,
|
||||
AP_SERIALMANAGER_PPP_BUFSIZE_TX);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
uart->begin(state[i].baudrate());
|
||||
|
|
|
@ -81,6 +81,7 @@ public:
|
|||
SerialProtocol_DDS_XRCE = 45,
|
||||
SerialProtocol_IMUOUT = 46,
|
||||
// Reserving Serial Protocol 47 for SerialProtocol_IQ
|
||||
SerialProtocol_PPP = 48,
|
||||
SerialProtocol_NumProtocols // must be the last value
|
||||
};
|
||||
|
||||
|
|
|
@ -137,6 +137,11 @@
|
|||
#define AP_SERIALMANAGER_IMUOUT_BUFSIZE_RX 128
|
||||
#define AP_SERIALMANAGER_IMUOUT_BUFSIZE_TX 2048
|
||||
|
||||
// PPP protocol
|
||||
#define AP_SERIALMANAGER_PPP_BAUD 921600
|
||||
#define AP_SERIALMANAGER_PPP_BUFSIZE_RX 4096
|
||||
#define AP_SERIALMANAGER_PPP_BUFSIZE_TX 4096
|
||||
|
||||
#ifndef HAL_HAVE_SERIAL0
|
||||
#define HAL_HAVE_SERIAL0 HAL_NUM_SERIAL_PORTS > 0
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue