AP_Networking: don't build lwip code if not needed

this saves a bit of compile time, but also means devs not doing
networking don't need to update the submodules
This commit is contained in:
Andrew Tridgell 2024-01-04 08:46:59 +11:00
parent e55702fe3c
commit b1f1ea7859
2 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,8 @@
#define AP_NETWORKING_SOCKETS_ENABLED AP_NETWORKING_ENABLED
#endif
#define AP_NETWORKING_NEED_LWIP (AP_NETWORKING_BACKEND_CHIBIOS || AP_NETWORKING_BACKEND_PPP)
// ---------------------------
// IP Features
// ---------------------------

View File

@ -4,6 +4,9 @@
*/
#include <AP_HAL/AP_HAL.h>
#include <AP_Networking/AP_Networking_Config.h>
#if AP_NETWORKING_NEED_LWIP
#include <AP_HAL/Semaphores.h>
#include <AP_Math/AP_Math.h>
@ -385,3 +388,5 @@ sys_arch_unprotect(sys_prot_t pval)
}
}
#endif // AP_NETWORKING_NEED_LWIP