Skip to content

Commit

Permalink
Replace thirdparty/GCS_MAVLink with a git submodule (#4556)
Browse files Browse the repository at this point in the history
* Replace thirdparty/GCS_MAVLink with a git submodule

* Try to recover from missing submodules
  • Loading branch information
alteman authored and bsongis committed Mar 5, 2017
1 parent 2af7751 commit cd6eef2
Show file tree
Hide file tree
Showing 224 changed files with 15 additions and 89,521 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "radio/src/thirdparty/GCS_MAVLink/include_v1.0"]
path = radio/src/thirdparty/GCS_MAVLink/include_v1.0
url = https://github.com/mavlink/c_library_v1.git
11 changes: 11 additions & 0 deletions radio/src/targets/common/avr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ elseif(TELEMETRY STREQUAL JETI)
elseif(TELEMETRY STREQUAL MAVLINK)
add_definitions(-DTELEMETRY_MAVLINK)
include_directories(${THIRDPARTY_DIR} gui/${GUI_DIR} targets/common/avr)
if(NOT EXISTS ${THIRDPARTY_DIR}/GCS_MAVLink/include_v1.0/mavlink_types.h)
message(WARNING "Warning: ${THIRDPARTY_DIR}/GCS_MAVLink/include_v1.0 is empty, trying to clone submodules")
execute_process(COMMAND git submodule update --init
RESULT_VARIABLE GIT_SUBMODULE_RESULT
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
if(NOT ${GIT_SUBMODULE_RESULT} EQUAL 0)
message(FATAL_ERROR "Error: Cannot clone submodule at ${THIRDPARTY_DIR}/GCS_MAVLink/include_v1.0
If you downloaded this project as a ZIP file, please instead run
'git clone --recursive https://github.com/opentx/opentx.git'")
endif()
endif()
set(FIRMWARE_SRC
${FIRMWARE_SRC}
targets/common/avr/telemetry_driver.cpp
Expand Down
165 changes: 0 additions & 165 deletions radio/src/thirdparty/GCS_MAVLink/COPYING

This file was deleted.

29 changes: 0 additions & 29 deletions radio/src/thirdparty/GCS_MAVLink/README

This file was deleted.

1 change: 1 addition & 0 deletions radio/src/thirdparty/GCS_MAVLink/include_v1.0
Submodule include_v1.0 added at 21083c
Loading

0 comments on commit cd6eef2

Please sign in to comment.