Browse Source

PX4: added defines for PX4 and NuttX version in logs

master
Andrew Tridgell 11 years ago
parent
commit
7a02c2720b
  1. 6
      mk/px4_targets.mk

6
mk/px4_targets.mk

@ -26,6 +26,12 @@ ifeq ($(wildcard $(NUTTX_SRC)configs),) @@ -26,6 +26,12 @@ ifeq ($(wildcard $(NUTTX_SRC)configs),)
$(error ERROR: NUTTX_SRC not set correctly - no configs directory found)
endif
NUTTX_GIT_VERSION := $(shell cd $(NUTTX_SRC) && git rev-parse HEAD | cut -c1-8)
PX4_GIT_VERSION := $(shell cd $(PX4_ROOT) && git rev-parse HEAD | cut -c1-8)
EXTRAFLAGS += -DNUTTX_GIT_VERSION="\"$(NUTTX_GIT_VERSION)\""
EXTRAFLAGS += -DPX4_GIT_VERSION="\"$(PX4_GIT_VERSION)\""
# we have different config files for V1 and V2
PX4_V1_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v1_APM.mk
PX4_V2_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v2_APM.mk

Loading…
Cancel
Save