AP_SerialManager: added PPP serial type

This commit is contained in:
Andrew Tridgell 2023-12-10 07:11:24 +11:00
parent a5fee135b0
commit 2cb177ef72
3 changed files with 14 additions and 1 deletions

View File

@ -580,7 +580,14 @@ 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());
}

View File

@ -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
};

View File

@ -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