mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
waf: add sitl_gps support to simulate AP_Periph GPS
This commit is contained in:
parent
e4c5d7b697
commit
48b59973b5
@ -441,9 +441,13 @@ class sitl(Board):
|
|||||||
|
|
||||||
env.AP_LIBRARIES += [
|
env.AP_LIBRARIES += [
|
||||||
'AP_HAL_SITL',
|
'AP_HAL_SITL',
|
||||||
'SITL',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not cfg.env.AP_PERIPH:
|
||||||
|
env.AP_LIBRARIES += [
|
||||||
|
'SITL',
|
||||||
|
]
|
||||||
|
|
||||||
if cfg.options.enable_sfml:
|
if cfg.options.enable_sfml:
|
||||||
if not cfg.check_SFML(env):
|
if not cfg.check_SFML(env):
|
||||||
cfg.fatal("Failed to find SFML libraries")
|
cfg.fatal("Failed to find SFML libraries")
|
||||||
@ -491,6 +495,39 @@ class sitl(Board):
|
|||||||
env.CXXFLAGS += [
|
env.CXXFLAGS += [
|
||||||
'-fno-slp-vectorize' # compiler bug when trying to use SLP
|
'-fno-slp-vectorize' # compiler bug when trying to use SLP
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def srcpath(path):
|
||||||
|
return cfg.srcnode.make_node(path).abspath()
|
||||||
|
env.SRCROOT = srcpath('')
|
||||||
|
|
||||||
|
class sitl_periph_gps(sitl):
|
||||||
|
def configure_env(self, cfg, env):
|
||||||
|
cfg.env.AP_PERIPH = 1
|
||||||
|
cfg.env.DISABLE_SCRIPTING = 1
|
||||||
|
super(sitl_periph_gps, self).configure_env(cfg, env)
|
||||||
|
env.DEFINES.update(
|
||||||
|
HAL_BUILD_AP_PERIPH = 1,
|
||||||
|
PERIPH_FW = 1,
|
||||||
|
CAN_APP_NODE_NAME = '"org.ardupilot.ap_periph_gps"',
|
||||||
|
HAL_PERIPH_ENABLE_GPS = 1,
|
||||||
|
HAL_WITH_DSP = 1,
|
||||||
|
HAL_CAN_DEFAULT_NODE_ID = 0,
|
||||||
|
HAL_RAM_RESERVE_START = 0,
|
||||||
|
APJ_BOARD_ID = 100,
|
||||||
|
HAL_NO_GCS = 1,
|
||||||
|
HAL_NO_LOGGING = 1,
|
||||||
|
)
|
||||||
|
# libcanard is written for 32bit platforms
|
||||||
|
env.CXXFLAGS += [
|
||||||
|
'-m32',
|
||||||
|
]
|
||||||
|
env.CFLAGS += [
|
||||||
|
'-m32',
|
||||||
|
]
|
||||||
|
env.LDFLAGS += [
|
||||||
|
'-m32',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class chibios(Board):
|
class chibios(Board):
|
||||||
abstract = True
|
abstract = True
|
||||||
|
Loading…
Reference in New Issue
Block a user