aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLorenz Meier <lorenz@px4.io>2015-04-18 10:01:15 +0200
committerLorenz Meier <lorenz@px4.io>2015-04-18 10:01:15 +0200
commit8d423abb628d57f030b2bab57e4b7613e549ddc3 (patch)
tree02289efc90afd3da68258b5f3da8d13f8de9306c /src/modules
parentc4dc5b2d6ab589cc0cd24455107735e938f7df09 (diff)
parent870c9532a97a506b674001ff297b730b94757553 (diff)
downloadpx4-firmware-8d423abb628d57f030b2bab57e4b7613e549ddc3.tar.gz
px4-firmware-8d423abb628d57f030b2bab57e4b7613e549ddc3.tar.bz2
px4-firmware-8d423abb628d57f030b2bab57e4b7613e549ddc3.zip
Merge pull request #2048 from dagar/travis
travis-ci switch to docker infrastructure
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/sdlog2/module.mk1
-rw-r--r--src/modules/sdlog2/sdlog2.c2
-rw-r--r--src/modules/uavcan/module.mk3
-rw-r--r--src/modules/uavcan/uavcan_main.cpp4
4 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/sdlog2/module.mk b/src/modules/sdlog2/module.mk
index 8fded0bdb..6964acf33 100644
--- a/src/modules/sdlog2/module.mk
+++ b/src/modules/sdlog2/module.mk
@@ -48,3 +48,4 @@ MAXOPTIMIZATION = -Os
EXTRACFLAGS = -Wframe-larger-than=1400
+EXTRADEFINES = -DGIT_VERSION='"$(GIT_DESC)"'
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c
index 2ec733627..ed93a06b1 100644
--- a/src/modules/sdlog2/sdlog2.c
+++ b/src/modules/sdlog2/sdlog2.c
@@ -764,7 +764,7 @@ int write_version(int fd)
};
/* fill version message and write it */
- strncpy(log_msg_VER.body.fw_git, FW_GIT, sizeof(log_msg_VER.body.fw_git));
+ strncpy(log_msg_VER.body.fw_git, GIT_VERSION, sizeof(log_msg_VER.body.fw_git));
strncpy(log_msg_VER.body.arch, HW_ARCH, sizeof(log_msg_VER.body.arch));
return write(fd, &log_msg_VER, sizeof(log_msg_VER));
}
diff --git a/src/modules/uavcan/module.mk b/src/modules/uavcan/module.mk
index f7feeadab..437feb301 100644
--- a/src/modules/uavcan/module.mk
+++ b/src/modules/uavcan/module.mk
@@ -63,7 +63,8 @@ SRCS += $(subst $(PX4_MODULE_SRC),../../,$(LIBUAVCAN_SRC))
INCLUDE_DIRS += $(LIBUAVCAN_INC)
# Since actual compiler mode is C++11, the library will default to UAVCAN_CPP11, but it will fail to compile
# because this platform lacks most of the standard library and STL. Hence we need to force C++03 mode.
-override EXTRADEFINES := $(EXTRADEFINES) -DUAVCAN_CPP_VERSION=UAVCAN_CPP03 -DUAVCAN_NO_ASSERTIONS
+override EXTRADEFINES := $(EXTRADEFINES) -DGIT_VERSION='"$(GIT_DESC)"' -DUAVCAN_CPP_VERSION=UAVCAN_CPP03 -DUAVCAN_NO_ASSERTIONS
+
#
# libuavcan drivers for STM32
diff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp
index 02cde9656..2d5abf959 100644
--- a/src/modules/uavcan/uavcan_main.cpp
+++ b/src/modules/uavcan/uavcan_main.cpp
@@ -210,9 +210,9 @@ void UavcanNode::fill_node_info()
/* software version */
uavcan::protocol::SoftwareVersion swver;
- // Extracting the first 8 hex digits of FW_GIT and converting them to int
+ // Extracting the first 8 hex digits of GIT_VERSION and converting them to int
char fw_git_short[9] = {};
- std::memmove(fw_git_short, FW_GIT, 8);
+ std::memmove(fw_git_short, GIT_VERSION, 8);
assert(fw_git_short[8] == '\0');
char *end = nullptr;
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);