Skip to content

Commit

Permalink
Merge branch 'master' into delayed_safehome
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/Settings.md
#	src/main/fc/settings.yaml
#	src/main/navigation/navigation.c
  • Loading branch information
avsaase committed Apr 18, 2021
2 parents a89eb8c + 7f04e0f commit e5b2fef
Show file tree
Hide file tree
Showing 381 changed files with 44,196 additions and 5,157 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Alberto García Hierro
Alex Gorbatchev
Alex Zaitsev
Alexander Fedorov
Alexander van Saase
Alexey Stankevich
Andre Bernet
Andreas Tacke
Expand Down
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ endif()

option(COMPILER_VERSION_CHECK "Ensure the compiler matches the expected version" ON)

include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
string(SUBSTRING ${GIT_SHA1} 0 8 GIT_REV)

# Load settings related functions, so the tests can use them
include(main)
include(settings)

if(TOOLCHAIN STREQUAL none)
add_subdirectory(src/test)
else()
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TOOLCHAIN}.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TOOLCHAIN}-checks.cmake")
endif()

project(INAV VERSION 2.7.0)
project(INAV VERSION 3.0.0)

enable_language(ASM)

Expand All @@ -49,10 +57,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebI
set(IS_RELEASE_BUILD ON)
endif()

include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
string(SUBSTRING ${GIT_SHA1} 0 8 GIT_REV)

set(FIRMWARE_VERSION ${PROJECT_VERSION})

option(WARNINGS_AS_ERRORS "Make all warnings into errors")
Expand All @@ -64,10 +68,8 @@ set(COMMON_COMPILE_DEFINITIONS
FC_VERSION_PATCH_LEVEL=${CMAKE_PROJECT_VERSION_PATCH}
)

include(settings)
include(openocd)
include(svd)
include(main)
include(stm32)

add_subdirectory(src)
Expand Down
20 changes: 18 additions & 2 deletions cmake/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set(SETTINGS_GENERATED_H "${SETTINGS_GENERATED}.h")
set(SETTINGS_FILE "${MAIN_SRC_DIR}/fc/settings.yaml")
set(SETTINGS_GENERATOR "${MAIN_UTILS_DIR}/settings.rb")

include(CMakeParseArguments)

function(enable_settings exe name)
get_generated_files_dir(dir ${name})
Expand All @@ -15,11 +16,26 @@ function(enable_settings exe name)
list(APPEND cflags ${options})
list(APPEND cflags ${includes})
list(APPEND cflags ${defs})

cmake_parse_arguments(
args
# Boolean arguments
""
# Single value arguments
"OUTPUTS;SETTINGS_CXX"
# Multi-value arguments
""
# Start parsing after the known arguments
${ARGN}
)

set(output ${dir}/${SETTINGS_GENERATED_H} ${dir}/${SETTINGS_GENERATED_C})
add_custom_command(
OUTPUT ${dir}/${SETTINGS_GENERATED_H} ${dir}/${SETTINGS_GENERATED_C}
OUTPUT ${output}
COMMAND
${CMAKE_COMMAND} -E env CFLAGS="${cflags}" TARGET=${name} PATH=$ENV{PATH}
${CMAKE_COMMAND} -E env CFLAGS="${cflags}" TARGET=${name} PATH=$ENV{PATH} SETTINGS_CXX=${args_SETTINGS_CXX}
${RUBY_EXECUTABLE} ${SETTINGS_GENERATOR} ${MAIN_DIR} ${SETTINGS_FILE} -o "${dir}"
DEPENDS ${SETTINGS_GENERATOR} ${SETTINGS_FILE}
)
set(${args_OUTPUTS} ${output} PARENT_SCOPE)
endfunction()
88 changes: 0 additions & 88 deletions docs/Board - ChebuzzF3.md

This file was deleted.

126 changes: 0 additions & 126 deletions docs/Board - ColibriRace.md

This file was deleted.

Loading

0 comments on commit e5b2fef

Please sign in to comment.