Skip to content

Commit

Permalink
waf: enable CAN on all SITL builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Aug 26, 2023
1 parent 696f5fe commit 0c39050
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,7 @@ def get_board(ctx):
class sitl(Board):

def __init__(self):
if Utils.unversioned_sys_platform().startswith("linux"):
self.with_can = True
else:
self.with_can = False
self.with_can = True

def configure_env(self, cfg, env):
super(sitl, self).configure_env(cfg, env)
Expand All @@ -654,8 +651,12 @@ def configure_env(self, cfg, env):
cfg.define('HAL_NUM_CAN_IFACES', 2)
env.DEFINES.update(CANARD_MULTI_IFACE=1,
CANARD_IFACE_ALL = 0x3,
CANARD_ENABLE_CANFD = 1,
CANARD_ENABLE_ASSERTS = 1)
CANARD_ENABLE_CANFD = 1,
CANARD_ENABLE_ASSERTS = 1)
if Utils.unversioned_sys_platform().startswith("linux"):
cfg.define('HAL_CAN_WITH_SOCKETCAN', 1)
else:
cfg.define('HAL_CAN_WITH_SOCKETCAN', 0)

env.CXXFLAGS += [
'-Werror=float-equal',
Expand Down

0 comments on commit 0c39050

Please sign in to comment.