AP_Networking: only enable networking on Linux, ChibiOS and SITL

This commit is contained in:
Andrew Tridgell 2023-12-27 17:11:19 +11:00
parent 983a680b2b
commit 702fe9c18d
3 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@
#endif
#ifndef AP_NETWORKING_ENABLED
#define AP_NETWORKING_ENABLED ((CONFIG_HAL_BOARD == HAL_BOARD_LINUX) || (CONFIG_HAL_BOARD == HAL_BOARD_SITL))
#define AP_NETWORKING_ENABLED (((CONFIG_HAL_BOARD == HAL_BOARD_LINUX) || (CONFIG_HAL_BOARD == HAL_BOARD_SITL)) && !defined(__APPLE__))
#endif
#ifndef AP_NETWORKING_BACKEND_DEFAULT_ENABLED

View File

@ -35,7 +35,7 @@ uint32_t AP_Networking_PPP::ppp_output_cb(ppp_pcb *pcb, const void *data, uint32
uint32_t remaining = len;
const uint8_t *ptr = (const uint8_t *)data;
while (remaining > 0) {
auto n = driver.uart->write(ptr, remaining);
const auto n = driver.uart->write(ptr, remaining);
if (n > 0) {
remaining -= n;
ptr += n;

View File

@ -4,6 +4,10 @@ import pathlib
def configure(cfg):
if not cfg.env.BOARD_CLASS in ['SITL', 'LINUX', 'ChibiOS']:
return
extra_src = [
'modules/lwip/src/core/*c',
'modules/lwip/src/core/ipv4/*c',