mirror of https://github.com/ArduPilot/ardupilot
AP_Networking: added SITL backend
this allows the net tests to run on SITL, and for DDS testing using the SocketAPM API
This commit is contained in:
parent
c54e6ce44b
commit
4a773eabb2
|
@ -18,6 +18,9 @@ extern const AP_HAL::HAL& hal;
|
|||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#if AP_NETWORKING_BACKEND_SITL
|
||||
#include "AP_Networking_SITL.h"
|
||||
#endif
|
||||
|
||||
const AP_Param::GroupInfo AP_Networking::var_info[] = {
|
||||
// @Param: ENABLED
|
||||
|
@ -114,6 +117,9 @@ void AP_Networking::init()
|
|||
#if AP_NETWORKING_BACKEND_CHIBIOS
|
||||
backend = new AP_Networking_ChibiOS(*this);
|
||||
#endif
|
||||
#if AP_NETWORKING_BACKEND_SITL
|
||||
backend = new AP_Networking_SITL(*this);
|
||||
#endif
|
||||
|
||||
if (backend == nullptr) {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "NET: backend failed");
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
#define AP_NETWORKING_BACKEND_CHIBIOS AP_NETWORKING_BACKEND_DEFAULT_ENABLED && CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
#endif
|
||||
|
||||
#ifndef AP_NETWORKING_BACKEND_SITL
|
||||
#define AP_NETWORKING_BACKEND_SITL AP_NETWORKING_BACKEND_DEFAULT_ENABLED && CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
#endif
|
||||
|
||||
#define AP_NETWORKING_SOCKETS_ENABLED (HAL_OS_SOCKETS || AP_NETWORKING_BACKEND_CHIBIOS)
|
||||
|
||||
// ---------------------------
|
||||
|
|
Loading…
Reference in New Issue