Skip to content

Commit

Permalink
sensor-lorawan: only override config if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ppannuto committed Oct 29, 2024
1 parent bc30513 commit bb29403
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

NUM_JOBS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || 4)

export TOCK_BUILDALL=1

set -e
set -u
set -o pipefail
Expand Down
8 changes: 7 additions & 1 deletion examples/lora/sensor-lorawan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ CXX_SRCS := $(wildcard *.cc)

override CPPFLAGS += -DRADIOLIB_CLOCK_DRIFT_MS=9

ifneq ($(CI),)
# If we are building for a testing configuration (e.g. CI) then it's okay to
# use the example config header. However, if someone is doing local testing,
# especially of a different thing, we don't want to accidentally overwrite
# the build obeject here with the example config when a real one exists.
ifneq ($(TOCK_BUILDALL),)
ifeq ($(wildcard radioConfig.h),)
override CPPFLAGS += "-DRADIO_CONFIG_CI=radioConfig_example.h"
endif
endif

# Use the libtock-c Make system
EXTERN_LIBS += $(TOCK_USERLAND_BASE_DIR)/RadioLib
Expand Down

0 comments on commit bb29403

Please sign in to comment.