From d4749551da452297d2dd1b7fa3fd038ba2a51c7c Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Wed, 27 May 2015 19:30:05 -0700 Subject: [PATCH 1/3] git_version.* not removed on clean The Build/git_version.* files need to be removed on make clean. Signed-off-by: Mark Charlebois --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 20badf8806..8fc89f48bf 100644 --- a/Makefile +++ b/Makefile @@ -317,6 +317,7 @@ check_format: clean: @echo > /dev/null $(Q) $(RMDIR) $(BUILD_DIR)*.build + $(Q) $(REMOVE) $(BUILD_DIR)git_version.* $(Q) $(REMOVE) $(IMAGE_DIR)*.px4 .PHONY: distclean From 35e0d866eb9dee4ce617407d3a7eaba30450c7c3 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Wed, 27 May 2015 19:43:54 -0700 Subject: [PATCH 2/3] Fix compare of int and uint32 VEHICLE_CMD_START_RX_PAIR is defined as uint32 and is being compared to an int. GCC complains about this and fails. Changed int cast to a unsigned int. Signed-off-by: Mark Charlebois --- src/drivers/px4io/px4io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 6e916fb1c8..59e1824dc8 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1009,7 +1009,7 @@ PX4IO::task_main() orb_copy(ORB_ID(vehicle_command), _t_vehicle_command, &cmd); // Check for a DSM pairing command - if (((int)cmd.command == vehicle_command_s::VEHICLE_CMD_START_RX_PAIR) && ((int)cmd.param1 == 0)) { + if (((unsigned int)cmd.command == vehicle_command_s::VEHICLE_CMD_START_RX_PAIR) && ((int)cmd.param1 == 0)) { dsm_bind_ioctl((int)cmd.param2); } } From 77cc3cdde1e6c02efa0e0cbf92f0a30221ad1bcc Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Wed, 27 May 2015 19:50:39 -0700 Subject: [PATCH 3/3] Remove Build/git_version.* on each make The Build/git_version.d and Build/git_version.o files need to be removed on each make to prevent confusion from a previously generated dependency file for a different target. Signed-off-by: Mark Charlebois --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 8fc89f48bf..0075022892 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,7 @@ endif GIT_DESC_SHORT := $(shell echo $(GIT_DESC) | cut -c1-16) $(shell mkdir -p $(BUILD_DIR)) +$(shell rm -f $(BUILD_DIR)git_version.*) $(shell echo "#include " > $(BUILD_DIR)git_version.c) $(shell echo "const char* px4_git_version = \"$(GIT_DESC)\";" >> $(BUILD_DIR)git_version.c) $(shell echo "const uint64_t px4_git_version_binary = 0x$(GIT_DESC_SHORT);" >> $(BUILD_DIR)git_version.c)