Compare commits

..

No commits in common. "v1.6.3" and "v1.3.2" have entirely different histories.

1868 changed files with 42401 additions and 199830 deletions

View File

@ -1,558 +0,0 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,
cert-dcl03-c,
#cert-dcl50-cpp,
cert-dcl54-cpp,
cert-dcl59-cpp,
cert-env33-c,
cert-err09-cpp,
## TODO: fix code and enable # cert-err34-c,
cert-err52-cpp,
#cert-err58-cpp,
cert-err60-cpp,
cert-err61-cpp,
cert-fio38-c,
## TODO: fix code and enable # cert-flp30-c,
#cert-msc30-c,
#cert-msc50-cpp,
cert-oop11-cpp,
clang-analyzer-apiModeling.google.GTest,
clang-analyzer-core.builtin.BuiltinFunctions,
clang-analyzer-core.builtin.NoReturnFunctions,
## TODO: fix code and enable # clang-analyzer-core.CallAndMessage,
clang-analyzer-core.DivideZero,
clang-analyzer-core.DynamicTypePropagation,
clang-analyzer-core.NonNullParamChecker,
## TODO: fix code and enable # clang-analyzer-core.NullDereference,
clang-analyzer-core.StackAddressEscape,
#clang-analyzer-core.UndefinedBinaryOperatorResult,
clang-analyzer-core.uninitialized.ArraySubscript,
## TODO: fix code and enable # clang-analyzer-core.uninitialized.Assign,
clang-analyzer-core.uninitialized.Branch,
clang-analyzer-core.uninitialized.CapturedBlockVariable,
clang-analyzer-core.uninitialized.UndefReturn,
## TODO: fix code and enable # clang-analyzer-core.VLASize,
clang-analyzer-cplusplus.NewDelete,
## TODO: fix code and enable # clang-analyzer-cplusplus.NewDeleteLeaks,
clang-analyzer-cplusplus.SelfAssignment,
#clang-analyzer-deadcode.DeadStores,
clang-analyzer-llvm.Conventions,
clang-analyzer-nullability.NullableDereferenced,
clang-analyzer-nullability.NullablePassedToNonnull,
clang-analyzer-nullability.NullableReturnedFromNonnull,
clang-analyzer-nullability.NullPassedToNonnull,
clang-analyzer-nullability.NullReturnedFromNonnull,
## evaluate # clang-analyzer-optin.cplusplus.VirtualCall,
## TODO: fix code and enable # clang-analyzer-optin.performance.Padding,
## TODO: fix code and enable # clang-analyzer-security.FloatLoopCounter,
clang-analyzer-security.insecureAPI.getpw,
clang-analyzer-security.insecureAPI.gets,
clang-analyzer-security.insecureAPI.mkstemp,
clang-analyzer-security.insecureAPI.mktemp,
clang-analyzer-security.insecureAPI.rand,
## evaluate # clang-analyzer-security.insecureAPI.strcpy,
clang-analyzer-security.insecureAPI.UncheckedReturn,
clang-analyzer-security.insecureAPI.vfork,
## TODO: fix code and enable # clang-analyzer-unix.API,
## TODO: fix code and enable # clang-analyzer-unix.Malloc,
## TODO: fix code and enable # clang-analyzer-unix.MallocSizeof,
clang-analyzer-unix.MismatchedDeallocator,
clang-analyzer-unix.StdCLibraryFunctions,
clang-analyzer-unix.Vfork,
## evaluate # clang-analyzer-unix.cstring.BadSizeArg,
## evaluate # clang-analyzer-unix.cstring.NullArg,
cppcoreguidelines-c-copy-assignment-signature,
#cppcoreguidelines-interfaces-global-init,
#cppcoreguidelines-no-malloc,
#cppcoreguidelines-pro-bounds-array-to-pointer-decay,
#cppcoreguidelines-pro-bounds-constant-array-index,
#cppcoreguidelines-pro-bounds-pointer-arithmetic,
## TODO: fix code and enable # cppcoreguidelines-pro-type-const-cast,
#cppcoreguidelines-pro-type-cstyle-cast,
## TODO: fix code and enable # cppcoreguidelines-pro-type-member-init,
#cppcoreguidelines-pro-type-reinterpret-cast,
cppcoreguidelines-pro-type-static-cast-downcast,
#cppcoreguidelines-pro-type-union-access,
#cppcoreguidelines-pro-type-vararg,
cppcoreguidelines-slicing,
## TODO: fix code and enable # cppcoreguidelines-special-member-functions,
google-build-explicit-make-pair,
google-build-namespaces,
# evaluate # google-build-using-namespace,
google-default-arguments,
## TODO: fix code and enable # google-explicit-constructor,
google-global-names-in-headers,
google-readability-braces-around-statements,
#google-readability-casting,
google-readability-function-size,
#google-readability-namespace-comments,
google-readability-redundant-smartptr-get,
#google-readability-todo,
#google-runtime-int,
google-runtime-member-string-references,
google-runtime-memset,
google-runtime-operator,
## evaluate # google-runtime-references,
llvm-header-guard,
## evaluate # llvm-include-order,
#llvm-namespace-comment,
misc-argument-comment,
misc-assert-side-effect,
misc-bool-pointer-implicit-conversion,
misc-dangling-handle,
misc-definitions-in-headers,
misc-fold-init-type,
misc-forward-declaration-namespace,
misc-inaccurate-erase,
#misc-incorrect-roundings,
misc-inefficient-algorithm,
#misc-macro-parentheses,
misc-macro-repeated-side-effects,
misc-misplaced-const,
#misc-misplaced-widening-cast,
misc-move-const-arg,
misc-move-constructor-init,
misc-move-forwarding-reference,
misc-multiple-statement-macro,
misc-new-delete-overloads,
misc-noexcept-move-constructor,
misc-non-copyable-objects,
misc-redundant-expression,
misc-sizeof-container,
misc-sizeof-expression,
misc-static-assert,
misc-string-compare,
misc-string-constructor,
misc-string-integer-assignment,
misc-string-literal-with-embedded-nul,
misc-suspicious-enum-usage,
misc-suspicious-missing-comma,
misc-suspicious-semicolon,
misc-suspicious-string-compare,
misc-swapped-arguments,
misc-throw-by-value-catch-by-reference,
misc-unconventional-assign-operator,
misc-undelegated-constructor,
misc-uniqueptr-reset-release,
misc-unused-alias-decls,
#misc-unused-parameters,
misc-unused-raii,
misc-unused-using-decls,
misc-use-after-move,
misc-virtual-near-miss,
modernize-avoid-bind,
## TODO: fix code and enable # modernize-deprecated-headers,
#modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-shrink-to-fit,
#modernize-use-auto,
#modernize-use-bool-literals,
## TODO: fix code and enable # modernize-use-default-member-init,
## TODO: fix code and enable # modernize-use-emplace,
## TODO: fix code and enable # modernize-use-equals-default,
## TODO: fix code and enable # modernize-use-equals-delete,
modernize-use-nullptr,
## evaluate # modernize-use-override,
modernize-use-transparent-functors,
## evaluate # modernize-use-using,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-cast-in-loop,
## TODO: fix code and enable # performance-inefficient-string-concatenation,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
#readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-container-size-empty,
readability-delete-null-pointer,
readability-deleted-default,
#readability-else-after-return,
readability-function-size,
readability-identifier-naming,
## evaluate # readability-implicit-bool-cast,
#readability-inconsistent-declaration-parameter-name,
readability-misplaced-array-index,
#readability-named-parameter,
#readability-non-const-parameter,
readability-redundant-control-flow,
#readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
## TODO: fix code and enable # readability-redundant-member-init,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-redundant-string-init,
## TODO: fix code and enable # readability-simplify-boolean-expr,
readability-static-definition-in-anonymous-namespace,
readability-uniqueptr-delete-release,
'
WarningsAsErrors: '*'
HeaderFilterRegex: '*.h, *.hpp, *.hh, *.hxx'
AnalyzeTemporaryDtors: false
CheckOptions:
- key: cert-dcl59-cpp.HeaderFileExtensions
value: h,hh,hpp,hxx
- key: cert-err09-cpp.CheckThrowTemporaries
value: '1'
- key: cert-err61-cpp.CheckThrowTemporaries
value: '1'
- key: cert-oop11-cpp.IncludeStyle
value: llvm
- key: google-build-namespaces.HeaderFileExtensions
value: h,hh,hpp,hxx
- key: google-global-names-in-headers.HeaderFileExtensions
value: h
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.BranchThreshold
value: '600'
- key: google-readability-function-size.LineThreshold
value: '4000'
- key: google-readability-function-size.StatementThreshold
value: '4000'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: llvm-header-guard.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: misc-argument-comment.StrictMode
value: '0'
- key: misc-assert-side-effect.AssertMacros
value: assert
- key: misc-assert-side-effect.CheckFunctionCalls
value: '0'
- key: misc-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view'
- key: misc-definitions-in-headers.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: misc-definitions-in-headers.UseHeaderFileExtension
value: '1'
- key: misc-move-constructor-init.IncludeStyle
value: llvm
- key: misc-sizeof-expression.WarnOnSizeOfCompareToConstant
value: '1'
- key: misc-sizeof-expression.WarnOnSizeOfConstant
value: '1'
- key: misc-sizeof-expression.WarnOnSizeOfThis
value: '1'
- key: misc-string-constructor.LargeLengthThreshold
value: '80'
- key: misc-string-constructor.WarnOnLargeLength
value: '1'
- key: misc-suspicious-enum-usage.StrictMode
value: '0'
- key: misc-suspicious-missing-comma.MaxConcatenatedTokens
value: '5'
- key: misc-suspicious-missing-comma.RatioThreshold
value: '0.200000'
- key: misc-suspicious-missing-comma.SizeThreshold
value: '5'
- key: misc-suspicious-string-compare.StringCompareLikeFunctions
value: ''
- key: misc-suspicious-string-compare.WarnOnImplicitComparison
value: '1'
- key: misc-suspicious-string-compare.WarnOnLogicalNotComparison
value: '0'
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
value: '1'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: safe
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-pass-by-value.ValuesOnly
value: '0'
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-transparent-functors.SafeMode
value: '0'
- key: performance-faster-string-find.StringLikeClasses
value: 'std::basic_string'
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: '0'
- key: readability-braces-around-statements.ShortStatementLines
value: '1'
- key: readability-function-size.BranchThreshold
value: '600'
- key: readability-function-size.LineThreshold
value: '4000'
- key: readability-function-size.StatementThreshold
value: '4000'
- key: readability-identifier-naming.AbstractClassCase
value: aNy_CasE
- key: readability-identifier-naming.AbstractClassPrefix
value: ''
- key: readability-identifier-naming.AbstractClassSuffix
value: ''
- key: readability-identifier-naming.ClassCase
value: aNy_CasE
- key: readability-identifier-naming.ClassConstantCase
value: aNy_CasE
- key: readability-identifier-naming.ClassConstantPrefix
value: ''
- key: readability-identifier-naming.ClassConstantSuffix
value: ''
- key: readability-identifier-naming.ClassMemberCase
value: aNy_CasE
- key: readability-identifier-naming.ClassMemberPrefix
value: ''
- key: readability-identifier-naming.ClassMemberSuffix
value: ''
- key: readability-identifier-naming.ClassMethodCase
value: aNy_CasE
- key: readability-identifier-naming.ClassMethodPrefix
value: ''
- key: readability-identifier-naming.ClassMethodSuffix
value: ''
- key: readability-identifier-naming.ClassPrefix
value: ''
- key: readability-identifier-naming.ClassSuffix
value: ''
- key: readability-identifier-naming.ConstantCase
value: aNy_CasE
- key: readability-identifier-naming.ConstantMemberCase
value: aNy_CasE
- key: readability-identifier-naming.ConstantMemberPrefix
value: ''
- key: readability-identifier-naming.ConstantMemberSuffix
value: ''
- key: readability-identifier-naming.ConstantParameterCase
value: aNy_CasE
- key: readability-identifier-naming.ConstantParameterPrefix
value: ''
- key: readability-identifier-naming.ConstantParameterSuffix
value: ''
- key: readability-identifier-naming.ConstantPrefix
value: ''
- key: readability-identifier-naming.ConstantSuffix
value: ''
- key: readability-identifier-naming.ConstexprFunctionCase
value: aNy_CasE
- key: readability-identifier-naming.ConstexprFunctionPrefix
value: ''
- key: readability-identifier-naming.ConstexprFunctionSuffix
value: ''
- key: readability-identifier-naming.ConstexprMethodCase
value: aNy_CasE
- key: readability-identifier-naming.ConstexprMethodPrefix
value: ''
- key: readability-identifier-naming.ConstexprMethodSuffix
value: ''
- key: readability-identifier-naming.ConstexprVariableCase
value: aNy_CasE
- key: readability-identifier-naming.ConstexprVariablePrefix
value: ''
- key: readability-identifier-naming.ConstexprVariableSuffix
value: ''
- key: readability-identifier-naming.EnumCase
value: aNy_CasE
- key: readability-identifier-naming.EnumConstantCase
value: aNy_CasE
- key: readability-identifier-naming.EnumConstantPrefix
value: ''
- key: readability-identifier-naming.EnumConstantSuffix
value: ''
- key: readability-identifier-naming.EnumPrefix
value: ''
- key: readability-identifier-naming.EnumSuffix
value: ''
- key: readability-identifier-naming.FunctionCase
value: aNy_CasE
- key: readability-identifier-naming.FunctionPrefix
value: ''
- key: readability-identifier-naming.FunctionSuffix
value: ''
- key: readability-identifier-naming.GlobalConstantCase
value: aNy_CasE
- key: readability-identifier-naming.GlobalConstantPrefix
value: ''
- key: readability-identifier-naming.GlobalConstantSuffix
value: ''
- key: readability-identifier-naming.GlobalFunctionCase
value: aNy_CasE
- key: readability-identifier-naming.GlobalFunctionPrefix
value: ''
- key: readability-identifier-naming.GlobalFunctionSuffix
value: ''
- key: readability-identifier-naming.GlobalVariableCase
value: aNy_CasE
- key: readability-identifier-naming.GlobalVariablePrefix
value: ''
- key: readability-identifier-naming.GlobalVariableSuffix
value: ''
- key: readability-identifier-naming.IgnoreFailedSplit
value: '0'
- key: readability-identifier-naming.InlineNamespaceCase
value: aNy_CasE
- key: readability-identifier-naming.InlineNamespacePrefix
value: ''
- key: readability-identifier-naming.InlineNamespaceSuffix
value: ''
- key: readability-identifier-naming.LocalConstantCase
value: aNy_CasE
- key: readability-identifier-naming.LocalConstantPrefix
value: ''
- key: readability-identifier-naming.LocalConstantSuffix
value: ''
- key: readability-identifier-naming.LocalVariableCase
value: aNy_CasE
- key: readability-identifier-naming.LocalVariablePrefix
value: ''
- key: readability-identifier-naming.LocalVariableSuffix
value: ''
- key: readability-identifier-naming.MacroDefinitionCase
value: aNy_CasE
- key: readability-identifier-naming.MacroDefinitionPrefix
value: ''
- key: readability-identifier-naming.MacroDefinitionSuffix
value: ''
- key: readability-identifier-naming.MemberCase
value: aNy_CasE
- key: readability-identifier-naming.MemberPrefix
value: ''
- key: readability-identifier-naming.MemberSuffix
value: ''
- key: readability-identifier-naming.MethodCase
value: aNy_CasE
- key: readability-identifier-naming.MethodPrefix
value: ''
- key: readability-identifier-naming.MethodSuffix
value: ''
- key: readability-identifier-naming.NamespaceCase
value: aNy_CasE
- key: readability-identifier-naming.NamespacePrefix
value: ''
- key: readability-identifier-naming.NamespaceSuffix
value: ''
- key: readability-identifier-naming.ParameterCase
value: aNy_CasE
- key: readability-identifier-naming.ParameterPackCase
value: aNy_CasE
- key: readability-identifier-naming.ParameterPackPrefix
value: ''
- key: readability-identifier-naming.ParameterPackSuffix
value: ''
- key: readability-identifier-naming.ParameterPrefix
value: ''
- key: readability-identifier-naming.ParameterSuffix
value: ''
- key: readability-identifier-naming.PrivateMemberCase
value: aNy_CasE
- key: readability-identifier-naming.PrivateMemberPrefix
value: ''
- key: readability-identifier-naming.PrivateMemberSuffix
value: ''
- key: readability-identifier-naming.PrivateMethodCase
value: aNy_CasE
- key: readability-identifier-naming.PrivateMethodPrefix
value: ''
- key: readability-identifier-naming.PrivateMethodSuffix
value: ''
- key: readability-identifier-naming.ProtectedMemberCase
value: aNy_CasE
- key: readability-identifier-naming.ProtectedMemberPrefix
value: ''
- key: readability-identifier-naming.ProtectedMemberSuffix
value: ''
- key: readability-identifier-naming.ProtectedMethodCase
value: aNy_CasE
- key: readability-identifier-naming.ProtectedMethodPrefix
value: ''
- key: readability-identifier-naming.ProtectedMethodSuffix
value: ''
- key: readability-identifier-naming.PublicMemberCase
value: aNy_CasE
- key: readability-identifier-naming.PublicMemberPrefix
value: ''
- key: readability-identifier-naming.PublicMemberSuffix
value: ''
- key: readability-identifier-naming.PublicMethodCase
value: aNy_CasE
- key: readability-identifier-naming.PublicMethodPrefix
value: ''
- key: readability-identifier-naming.PublicMethodSuffix
value: ''
- key: readability-identifier-naming.StaticConstantCase
value: aNy_CasE
- key: readability-identifier-naming.StaticConstantPrefix
value: ''
- key: readability-identifier-naming.StaticConstantSuffix
value: ''
- key: readability-identifier-naming.StaticVariableCase
value: aNy_CasE
- key: readability-identifier-naming.StaticVariablePrefix
value: ''
- key: readability-identifier-naming.StaticVariableSuffix
value: ''
- key: readability-identifier-naming.StructCase
value: aNy_CasE
- key: readability-identifier-naming.StructPrefix
value: ''
- key: readability-identifier-naming.StructSuffix
value: ''
- key: readability-identifier-naming.TemplateParameterCase
value: aNy_CasE
- key: readability-identifier-naming.TemplateParameterPrefix
value: ''
- key: readability-identifier-naming.TemplateParameterSuffix
value: ''
- key: readability-identifier-naming.TemplateTemplateParameterCase
value: aNy_CasE
- key: readability-identifier-naming.TemplateTemplateParameterPrefix
value: ''
- key: readability-identifier-naming.TemplateTemplateParameterSuffix
value: ''
- key: readability-identifier-naming.TypeAliasCase
value: aNy_CasE
- key: readability-identifier-naming.TypeAliasPrefix
value: ''
- key: readability-identifier-naming.TypeAliasSuffix
value: ''
- key: readability-identifier-naming.TypeTemplateParameterCase
value: aNy_CasE
- key: readability-identifier-naming.TypeTemplateParameterPrefix
value: ''
- key: readability-identifier-naming.TypeTemplateParameterSuffix
value: ''
- key: readability-identifier-naming.TypedefCase
value: aNy_CasE
- key: readability-identifier-naming.TypedefPrefix
value: ''
- key: readability-identifier-naming.TypedefSuffix
value: ''
- key: readability-identifier-naming.UnionCase
value: aNy_CasE
- key: readability-identifier-naming.UnionPrefix
value: ''
- key: readability-identifier-naming.UnionSuffix
value: ''
- key: readability-identifier-naming.ValueTemplateParameterCase
value: aNy_CasE
- key: readability-identifier-naming.ValueTemplateParameterPrefix
value: ''
- key: readability-identifier-naming.ValueTemplateParameterSuffix
value: ''
- key: readability-identifier-naming.VariableCase
value: aNy_CasE
- key: readability-identifier-naming.VariablePrefix
value: ''
- key: readability-identifier-naming.VariableSuffix
value: ''
- key: readability-identifier-naming.VirtualMethodCase
value: aNy_CasE
- key: readability-identifier-naming.VirtualMethodPrefix
value: ''
- key: readability-identifier-naming.VirtualMethodSuffix
value: ''
...

20
.gitignore vendored
View File

@ -5,7 +5,6 @@
*.px4log
*.dSYM
*.o
*.gch
*.pyc
*~
.*.swp
@ -20,9 +19,6 @@
Archives/*
Build/*
Testing/
Packages/*
s3deploy-branch/
s3deploy-archive/
build/*
build_*/
core
@ -68,6 +64,7 @@ CMakeLists.txt.user
GPATH
GRTAGS
GTAGS
*.config
*.creator
*.creator.user
*.files
@ -76,18 +73,3 @@ GTAGS
# uavcan firmware
ROMFS/px4fmu_common/uavcan/
vectorcontrol/
# CLion ignores
.idea
cmake-build-*/
# gcov code coverage
coverage-html/
coverage.info
posix-configs/SITL/init/test/*_generated
parameters.md
airframes.md
airframes.xml

12
.gitmodules vendored
View File

@ -1,15 +1,12 @@
[submodule "mavlink/include/mavlink/v1.0"]
path = mavlink/include/mavlink/v1.0
url = https://github.com/mavlink/c_library_v1.git
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
url = git://github.com/mavlink/c_library.git
[submodule "NuttX"]
path = NuttX
url = https://github.com/PX4/PX4NuttX.git
url = git://github.com/PX4/NuttX.git
[submodule "src/modules/uavcan/libuavcan"]
path = src/modules/uavcan/libuavcan
url = https://github.com/UAVCAN/libuavcan.git
url = git://github.com/UAVCAN/libuavcan.git
[submodule "Tools/genmsg"]
path = Tools/genmsg
url = https://github.com/ros/genmsg.git
@ -41,3 +38,6 @@
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/GpsDrivers.git
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = git://github.com/mavlink/c_library.git

View File

@ -3,98 +3,134 @@
language: cpp
git:
depth: 2000
matrix:
fast_finish: true
include:
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=qgc_firmware
sudo: false
env: GCC_VER=4.8
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=check_format
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=tests_linux
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=clang-tidy
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=px4_metadata
sudo: false
env: GCC_VER=4.9
- os: osx
osx_image: xcode7
sudo: true
cache:
ccache: true
directories:
- $HOME/.ccache
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- build-essential
- ccache
- clang-3.5
- cmake
- g++-4.9
- gcc-4.9
- genromfs
- libc6-i386
- libncurses5-dev
- ninja-build
- python-argparse
- python-empy
- s3cmd
- texinfo
- zlib1g-dev
before_install:
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${TRAVIS_BRANCH}" == "coverity" ]]; then sudo apt-get install genromfs && pip install empy jinja2; fi
- cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
pushd .
&& cd ~ && mkdir gcc && cd gcc
&& if [ "$GCC_VER" = "4.8" ]; then GCC_URL="https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2" ; fi
&& if [ "$GCC_VER" = "4.9" ]; then GCC_URL="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2" ; fi
&& wget -O gcc.tar.bz2 ${GCC_URL}
&& tar -jxf gcc.tar.bz2 --strip 1
&& exportline="export PATH=$HOME/gcc/bin:\$PATH"
&& if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
&& . ~/.profile
&& popd
&& git clone git://github.com/PX4/CI-Tools.git
&& ./CI-Tools/s3cmd-configure
&& mkdir -p ~/bin
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
&& astyle --version
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew tap PX4/homebrew-px4
&& brew update; brew update
&& brew install cmake ninja
&& brew install genromfs
&& sudo easy_install pip
&& sudo pip install empy
;
fi
before_script:
# setup ccache
- mkdir -p ~/bin
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-size
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-objcopy
- ln -s /usr/bin/ccache ~/bin/clang++
- ln -s /usr/bin/ccache ~/bin/clang++-3.4
- ln -s /usr/bin/ccache ~/bin/clang++-3.5
- ln -s /usr/bin/ccache ~/bin/clang
- ln -s /usr/bin/ccache ~/bin/clang-3.4
- ln -s /usr/bin/ccache ~/bin/clang-3.5
- export PATH=~/bin:$PATH
env:
global:
# COVERITY KEY
- secure: "NyaJoCGjU0Xc90Y6bxVYWLgjrJX5HlZsm/SPxruZ6I7xkGo19fJIFzGegOHQFR32D4AiKjllfjTUNy+ncckWplind0QwxtF4/kxXrz9XBfiby6X8jLYXIekrB6Ay0mBLGbniDdh+lpWtcyop6Dmkt5bdJCJuKY2nv9ENnhhs07M="
- NINJA_BUILD=1
# AWS KEY: $PX4_AWS_KEY
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
# AWS SECRET: $PX4_AWS_SECRET
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
- PX4_AWS_BUCKET=px4-travis
script:
- if [[ "${TRAVIS_BRANCH}" == "coverity" ]]; then
echo "no script for coverity build";
elif [[ "${BUILD_TARGET}" = "qgc_firmware" ]]; then
./Tools/docker_run.sh 'make qgc_firmware';
elif [[ "${BUILD_TARGET}" = "check_format" ]]; then
./Tools/docker_run.sh 'make check_format';
elif [[ "${BUILD_TARGET}" = "tests_linux" ]]; then
./Tools/docker_run.sh 'make tests';
elif [[ "${BUILD_TARGET}" = "px4_metadata" ]]; then
./Tools/docker_run.sh 'make px4_metadata';
elif [[ "${BUILD_TARGET}" = "clang-tidy" ]]; then
./Tools/docker_run.sh 'make clang-tidy-parallel';
- git submodule update --quiet --init --recursive
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
arm-none-eabi-gcc --version && make check VECTORCONTROL=1;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
make check_posix_sitl_default;
fi
after_success:
# s3 deploy individual firmware files (.px4), Firmware.zip, airframe.xml, and param.xml
- if [[ "${BUILD_TARGET}" = "qgc_firmware" && "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" != "coverity" ]]; then
./Tools/docker_run.sh 'make s3put_firmware AWS_S3_BUCKET="px4-travis/archives/Firmware/${TRAVIS_BRANCH}/${TRAVIS_BUILD_ID}"'
&& ./Tools/docker_run.sh 'make s3put_qgc_firmware AWS_S3_BUCKET="px4-travis/Firmware/${TRAVIS_BRANCH}"';
fi
- if [[ "${BUILD_TARGET}" = "px4_metadata" && "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" != "coverity" ]]; then
./Tools/docker_run.sh 'make s3put_parameters_markdown AWS_S3_BUCKET="px4-travis/Firmware/${TRAVIS_BRANCH}"';
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${GCC_VER}" = "4.8" ]]; then
make package_firmware
&& find . -name \*.px4 -exec cp "{}" . \;
&& find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
&& ./CI-Tools/s3cmd-put `find . -maxdepth 1 -mindepth 1 -type f -name '*_default.px4'` build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
&& ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
&& ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
&& ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
&& ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
&& echo ""
&& echo "Binaries have been posted to:" https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
;
fi
deploy:
# on tags deploy Firmware.zip to Github releases
- provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
condition: $BUILD_TARGET = qgc_firmware
addons:
coverity_scan:
project:
name: PX4/Firmware
notification_email: ci@px4.io
build_command: make posix_sitl_default
branch_pattern: coverity
provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
condition: $GCC_VER = 4.8
notifications:
webhooks:
@ -103,8 +139,6 @@ notifications:
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
slack:
rooms:
- secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
on_pull_requests: false
on_success: never # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always
secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always

View File

@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2017 PX4 Development Team. All rights reserved.
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -117,26 +117,13 @@
#
#=============================================================================
if("${CMAKE_VERSION}" VERSION_LESS 3.1.0)
message("Not a valid CMake version")
message("On Ubuntu >= 16.04, install or upgrade via:")
message(" sudo apt-get install cmake")
message("")
message("Official website: https://cmake.org/download/")
message(FATAL_ERROR "Update CMake and try again" )
endif()
# Warning: Changing this modifies CMake's internal workings
# and leads to wrong toolchain detection
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
execute_process(
COMMAND Tools/check_submodules.sh
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
# Use clang
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
#=============================================================================
# parameters
@ -145,18 +132,12 @@ execute_process(
set(CMAKE_BUILD_TYPE "" CACHE STRING "build type")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS ";Debug;Release;RelWithDebInfo;MinSizeRel")
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
set(CONFIG "nuttx_px4fmu-v2_default" CACHE STRING "desired configuration")
file(GLOB_RECURSE configs RELATIVE cmake/configs "cmake/configs/*.cmake")
set_property(CACHE CONFIG PROPERTY STRINGS ${configs})
set(THREADS "4" CACHE STRING "number of threads to use for external build processes")
set(THREADS "4" CACHE STRING
"number of threads to use for external build processes")
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
endif()
#=============================================================================
# configuration
@ -169,48 +150,14 @@ list(GET config_args 1 BOARD)
list(GET config_args 2 LABEL)
set(target_name "${OS}-${BOARD}-${LABEL}")
# version info from git
execute_process(
COMMAND Tools/tag_to_version.py --root ${PX4_SOURCE_DIR}
OUTPUT_VARIABLE version
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
execute_process(
COMMAND git describe --always --tags
OUTPUT_VARIABLE git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
message(STATUS "PX4 VERSION: ${git_tag}")
message(STATUS "CONFIG: ${target_name}")
message(STATUS "${target_name}")
# The URL for the elf file for crash logging
if (DEFINED ENV{BUILD_URI})
set(BUILD_URI $ENV{BUILD_URI})
else()
set(BUILD_URI "localhost")
endif()
# switch to ros CMake file if building ros
if (${OS} STREQUAL "ros")
include("cmake/ros-CMakeLists.txt")
else() # otherwise use the rest of this file
add_definitions(-DBUILD_URI=${BUILD_URI})
# Define GNU standard installation directories
include(GNUInstallDirs)
# Add support for external project building
include(ExternalProject)
# Setup install paths
if(NOT CMAKE_INSTALL_PREFIX)
if (${OS} STREQUAL "posix")
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
endif()
endif()
if (CMAKE_INSTALL_PREFIX)
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
endif()
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(config_module "configs/${CONFIG}")
include(${config_module})
@ -241,67 +188,38 @@ if(DEFINED config_df_driver_list)
message("DF Drivers: ${config_df_driver_list}")
endif()
# force static lib build
set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# ccache
#
option(CCACHE "Use ccache if available" OFF)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE AND CCACHE_PROGRAM)
message(STATUS "Enabled ccache: ${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
#=============================================================================
# project definition
#
project(px4 CXX C ASM)
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0)
cmake_policy(SET CMP0045 NEW) # error on non-existent target in get prop
cmake_policy(SET CMP0046 NEW) # no non-existent targets as dependencies
cmake_policy(SET CMP0025 OLD) # still report AppleClang as Clang
endif()
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
cmake_policy(SET CMP0054 NEW) # don't dereference quoted variables
endif()
set(version_major 1)
set(version_minor 0)
set(version_patch 1)
set(version "${version_major}.${version_minor}.${version_patch}")
set(package-contact "px4users@googlegroups.com")
#=============================================================================
# find programs and packages
# programs
#
# see if catkin was invoked to build this
if (CATKIN_DEVEL_PREFIX)
message(STATUS "catkin ENABLED")
find_package(catkin REQUIRED)
if (catkin_FOUND)
catkin_package()
else()
message(FATAL_ERROR "catkin not found")
endif()
endif()
find_package(PythonInterp REQUIRED)
px4_find_python_module(jinja2 REQUIRED)
#=============================================================================
# cmake testing
# cmake modules
#
enable_testing()
include(CTest)
#=============================================================================
# generate compile command database
#
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#=============================================================================
# check required toolchain variables
#
# PX4 requires c++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# PX4 requires c99
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(required_variables
CMAKE_C_COMPILER_ID
)
@ -311,42 +229,24 @@ foreach(var ${required_variables})
endif()
endforeach()
# print full c compiler version
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE c_compiler_version
OUTPUT_STRIP_TRAILING_WHITESPACE
)
STRING(REGEX MATCH "[^\n]*" c_compiler_version_short ${c_compiler_version})
message(STATUS "C compiler: ${c_compiler_version_short}")
# print full c++ compiler version
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
OUTPUT_VARIABLE cxx_compiler_version
OUTPUT_STRIP_TRAILING_WHITESPACE
)
STRING(REGEX MATCH "[^\n]*" cxx_compiler_version_short ${cxx_compiler_version})
message(STATUS "C++ compiler: ${cxx_compiler_version_short}")
#=============================================================================
# git
#
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "cmake/cmake_hexagon")
px4_add_git_submodule(TARGET git_genmsg PATH "Tools/genmsg")
px4_add_git_submodule(TARGET git_gencpp PATH "Tools/gencpp")
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
px4_add_git_submodule(TARGET git_gtest PATH "unittets/gtest")
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
px4_add_git_submodule(TARGET git_ecl PATH "src/lib/ecl")
px4_add_git_submodule(TARGET git_gazebo PATH "Tools/sitl_gazebo")
px4_add_git_submodule(TARGET git_gencpp PATH "Tools/gencpp")
px4_add_git_submodule(TARGET git_genmsg PATH "Tools/genmsg")
px4_add_git_submodule(TARGET git_gtest PATH "unittests/gtest")
px4_add_git_submodule(TARGET git_jmavsim PATH "Tools/jMAVSim")
px4_add_git_submodule(TARGET git_gazebo PATH "Tools/sitl_gazebo")
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
px4_add_git_submodule(TARGET git_mavlink2 PATH "mavlink/include/mavlink/v2.0")
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "cmake/cmake_hexagon")
add_custom_target(submodule_clean
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git submodule deinit -f .
COMMAND rm -rf .git/modules/*
)
@ -356,12 +256,12 @@ add_custom_target(submodule_clean
#
add_custom_target(check_format
COMMAND Tools/check_code_style.sh
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(config
COMMAND cmake-gui .
WORKING_DIRECTORY ${PX4_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
#=============================================================================
@ -378,15 +278,14 @@ px4_os_add_flags(
BOARD ${BOARD}
C_FLAGS c_flags
CXX_FLAGS cxx_flags
OPTIMIZATION_FLAGS optimization_flags
EXE_LINKER_FLAGS exe_linker_flags
INCLUDE_DIRS include_dirs
LINK_DIRS link_dirs
DEFINITIONS definitions)
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${exe_linker_flags}" GLUE " ")
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags};${optimization_flags}" GLUE " ")
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags};${optimization_flags}" GLUE " ")
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags}" GLUE " ")
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags}" GLUE " ")
include_directories(${include_dirs})
#message("INCLUDE_DIRS=${include_dirs}")
@ -396,34 +295,22 @@ add_definitions(${definitions})
#=============================================================================
# source code generation
#
add_subdirectory(msg)
px4_generate_messages(TARGET msg_gen
MSG_FILES ${msg_files}
OS ${OS}
INCLUDES ${msg_include_paths}
DEPENDS git_genmsg git_gencpp prebuild_targets
)
px4_generate_parameters_xml(OUT parameters.xml
BOARD ${BOARD}
MODULES ${config_module_list}
OVERRIDES ${PARAM_DEFAULT_OVERRIDES})
px4_generate_parameters_xml(OUT parameters.xml BOARD ${BOARD})
px4_generate_airframes_xml(OUT airframes.xml BOARD ${BOARD})
add_custom_target(xml_gen
DEPENDS parameters.xml airframes.xml)
if(NOT "${config_nuttx_config}" STREQUAL "bootloader")
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/airframes.xml
${CMAKE_CURRENT_BINARY_DIR}/parameters.xml
DESTINATION .)
endif()
#=============================================================================
# external projects
#
set(ep_base ${PX4_BINARY_DIR}/external)
set(ep_base ${CMAKE_BINARY_DIR}/external)
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
# add external project install folders to build
@ -443,24 +330,6 @@ foreach(driver ${config_df_driver_list})
message("Adding DF driver: ${driver}")
endforeach()
#=============================================================================
# external modules
#
if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
message(STATUS "External modules: ${EXTERNAL_MODULES_LOCATION}")
add_subdirectory("${EXTERNAL_MODULES_LOCATION}/src" external_modules_src)
set(config_module_list_external_expanded)
foreach(external_module ${config_module_list_external})
list(APPEND config_module_list_external_expanded
${EXTERNAL_MODULES_LOCATION}/src/${external_module})
endforeach()
set(config_module_list
${config_module_list}
${config_module_list_external_expanded}
)
endif()
#=============================================================================
# subdirectories
#
@ -470,7 +339,7 @@ foreach(module ${config_module_list})
if(external_module)
STRING(REGEX REPLACE "//" "/" EXT_MODULE ${module})
STRING(REGEX REPLACE "/" "__" EXT_MODULE_PREFIX ${EXT_MODULE})
add_subdirectory(${module} ${PX4_BINARY_DIR}/${EXT_MODULE_PREFIX})
add_subdirectory(${module} ${CMAKE_BINARY_DIR}/${EXT_MODULE_PREFIX})
else()
add_subdirectory(src/${module})
endif()
@ -484,7 +353,7 @@ set(module_external_libraries "${module_external_libraries}" CACHE INTERNAL "mod
add_subdirectory(src/firmware/${OS})
#add_dependencies(df_driver_framework nuttx_export_${CONFIG})
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
if (NOT "${OS}" STREQUAL "nuttx")
endif()
@ -492,49 +361,22 @@ if (config_io_board)
add_subdirectory(src/modules/px4iofirmware)
endif()
#=============================================================================
# generate custom target to print for all executable and module cmake targets
#
if(all_posix_cmake_targets)
list(SORT all_posix_cmake_targets)
px4_join(OUT posix_cmake_target_list LIST ${all_posix_cmake_targets} GLUE "\\n")
add_custom_target(list_cmake_targets
COMMAND sh -c "printf \"${posix_cmake_target_list}\\n\""
COMMENT "List of cmake targets that can be matched by PX4_NO_OPTIMIZATION:"
VERBATIM
)
endif()
#=============================================================================
# generate git version
#
px4_create_git_hash_header()
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
#=============================================================================
# packaging
#
# Important to having packaging at end of cmake file.
#
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
set(CPACK_PACKAGE_VERSION ${version})
set(CPACK_PACKAGE_CONTACT ${package-contact})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(short-description "The px4 autopilot.")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${short-description})
set(CPACK_PACKAGE_CONTACT ${package_contact})
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${version}")
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
set(CPACK_PACKAGING_INSTALL_PREFIX "")
set(CPACK_SET_DESTDIR "OFF")
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
list (APPEND CPACK_GENERATOR "DEB")
endif()
endif()
set(CPACK_SOURCE_GENERATOR "ZIP")
include(CPack)
endif() # ros alternative endif
# vim: set noet fenc=utf-8 ff=unix ft=cmake :

View File

@ -1,15 +0,0 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "PX4 Firmware")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=PX4+Firmware")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -1,20 +1,12 @@
#!/bin/bash
#
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
#
# Poor man's sampling profiler for NuttX.
#
# Usage: Install flamegraph.pl in your PATH, configure your .gdbinit, run the script with proper arguments and go
# have a coffee. When you're back, you'll see the flamegraph. Note that frequent calls to GDB significantly
# interfere with normal operation of the target, which means that you can't profile real-time tasks with it.
# For best results, ensure that the PC is not overloaded, the USB host controller to which the debugger is
# connected is not congested. You should also allow the current user to set negative nice values.
#
# The FlameGraph script can be downloaded from https://github.com/brendangregg/FlameGraph. Thanks Mr. Gregg.
#
# Requirements: ARM GDB with Python support. You can get one by downloading the sources from
# https://launchpad.net/gcc-arm-embedded and building them with correct flags.
# Note that Python support is not required if no per-task sampling is needed.
# Requirements: ARM GDB with Python support
#
set -e
@ -41,7 +33,7 @@ which flamegraph.pl > /dev/null || die "Install flamegraph.pl first"
nsamples=0
sleeptime=0.1 # Doctors recommend 7-8 hours a day
taskname=
elf=
elf=$root/Build/px4fmu-v2_default.build/firmware.elf
append=0
fgfontsize=10
fgwidth=1900
@ -77,8 +69,6 @@ do
shift
done
[[ -z "$elf" ]] && die "Please specify the ELF file location, e.g.: build_px4fmu-v4_default/src/firmware/nuttx/firmware_nuttx"
#
# Temporary files
#
@ -247,8 +237,8 @@ for s, f in sorted(stacks.items(), key=lambda (s, f): s):
print('Total stack frames:', num_stack_frames, file=sys.stderr)
print('Top consumers (distribution of the stack tops):', file=sys.stderr)
for name,num in sorted(stack_tops.items(), key=lambda (name, num): num, reverse=True)[:300]:
print('% 7.3f%% ' % (100 * num / num_stack_frames), name, file=sys.stderr)
for name,num in sorted(stack_tops.items(), key=lambda (name, num): num, reverse=True)[:10]:
print('% 5.1f%% ' % (100 * num / num_stack_frames), name, file=sys.stderr)
EOF
cat $stacksfile | python /tmp/pmpn-folder.py > $foldfile

View File

@ -66,8 +66,8 @@ Linux or Eagle with a working IP interface (?? does this need further instructio
> adb shell
# bash
root@linaro-developer:/# cd ???
root@linaro-developer:/# ./px4
App name: px4
root@linaro-developer:/# ./mainapp
App name: mainapp
Enter a command and its args:
uorb start
muorb start

View File

@ -25,8 +25,7 @@
[
".settings",
"nuttx/arch/arm/src/board",
"nuttx/arch/arm/src/chip",
"build_*"
"nuttx/arch/arm/src/chip"
]
}
],

View File

@ -1,12 +0,0 @@
{
"board_id": 98,
"magic": "AeroCore2",
"description": "Firmware for the Gumstix AeroCore2 board",
"image": "",
"build_time": 0,
"summary": "AEROCORE2",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 65,
"magic": "PX4FWv1",
"description": "Firmware for the Intel Aero FC board",
"image": "",
"build_time": 0,
"summary": "AEROFCv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 33,
"magic": "PX4FWv1",
"description": "Firmware for the AUAV X2.1 board",
"image": "",
"build_time": 0,
"summary": "AUAV X2.1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 12,
"magic": "Crazyflie",
"description": "Firmware for the Crazyflie 2.0",
"image": "",
"build_time": 0,
"summary": "CRAZYFLIE",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 27,
"magic": "ESC35v1",
"description": "Firmware for the ESC35V1 board",
"image": "",
"build_time": 0,
"summary": "ESC35v1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 22,
"magic": "CANNODEFWv1",
"description": "Firmware for the PX4CANNODE board",
"image": "",
"build_time": 0,
"summary": "PX4CANNODEv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 25,
"magic": "ESCv1",
"description": "Firmware for the PX4ESCV1 board",
"image": "",
"build_time": 0,
"summary": "PX4ESCv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 24,
"magic": "FLOWv1",
"description": "Firmware for the PX4FLowV1 board",
"image": "",
"build_time": 0,
"summary": "PX4FLOWv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 9,
"magic": "PX4FWv1",
"description": "Firmware for the PX4FMUv3 board",
"image": "",
"build_time": 0,
"summary": "PX4FMUv3",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 13,
"magic": "PX4FWv1",
"description": "Firmware for the PX4FMUv4PRO board, based on STM32F469",
"image": "",
"build_time": 0,
"summary": "PX4FMUv4PRO",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 50,
"magic": "PX4FWv1",
"description": "Firmware for the PX4FMUv5 board",
"image": "",
"build_time": 0,
"summary": "PX4FMUv5",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

12
Images/px4iov2.prototype Normal file
View File

@ -0,0 +1,12 @@
{
"board_id": 10,
"magic": "PX4FWv2",
"description": "Firmware for the PX4IOv2 board",
"image": "",
"build_time": 0,
"summary": "PX4IOv2",
"version": "2.0",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 90,
"magic": "PX4FWv1",
"description": "Firmware for the ST nucleo-144 with STM32FF767ZI-v1 board",
"image": "",
"build_time": 0,
"summary": "PX4NUCLEOF767ZIv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 23,
"magic": "S2740VCblv1",
"description": "Firmware for the S2740VC board",
"image": "",
"build_time": 0,
"summary": "S2740VCv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 64,
"magic": "PX4FWv1",
"description": "Firmware for the TAPv1 board",
"image": "",
"build_time": 0,
"summary": "TAPv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,12 +0,0 @@
{
"board_id": 26,
"magic": "ZUBAXGNSSFWv1",
"description": "Firmware for the ZUBAXGNSS board",
"image": "",
"build_time": 0,
"summary": "ZUBAXGNSSv1",
"version": "0.0",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

463
Makefile
View File

@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2015 - 2017 PX4 Development Team. All rights reserved.
# Copyright (c) 2015 - 2016 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -39,6 +39,26 @@ ifeq ($(wildcard .git),)
$(error YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.)
endif
CMAKE_VER := $(shell Tools/check_cmake.sh; echo $$?)
ifneq ($(CMAKE_VER),0)
$(warning Not a valid CMake version or CMake not installed.)
$(warning On Ubuntu, install or upgrade via:)
$(warning )
$(warning 3rd party PPA:)
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
$(warning sudo apt-get update)
$(warning sudo apt-get install cmake)
$(warning )
$(warning Official website:)
$(warning wget https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.sh)
$(warning chmod +x cmake-3.3.2-Linux-x86_64.sh)
$(warning sudo mkdir /opt/cmake-3.3.2)
$(warning sudo ./cmake-3.3.2-Linux-x86_64.sh --prefix=/opt/cmake-3.3.2 --exclude-subdir)
$(warning export PATH=/opt/cmake-3.3.2/bin:$$PATH)
$(warning )
$(error Fatal)
endif
# Help
# --------------------------------------------------------------------
# Don't be afraid of this makefile, it is just passing
@ -57,181 +77,199 @@ endif
# in that directory with the target upload.
# explicity set default build target
all: posix_sitl_default
all: px4fmu-v2_default
# Parsing
# --------------------------------------------------------------------
# assume 1st argument passed is the main target, the
# rest are arguments to pass to the makefile generated
# by cmake in the subdirectory
FIRST_ARG := $(firstword $(MAKECMDGOALS))
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
j ?= 4
NINJA_BIN := ninja
ifndef NO_NINJA_BUILD
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
ifndef NINJA_BUILD
NINJA_BIN := ninja-build
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
endif
endif
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
ifdef NINJA_BUILD
PX4_CMAKE_GENERATOR := Ninja
PX4_MAKE := $(NINJA_BIN)
ifdef VERBOSE
PX4_MAKE_ARGS := -v
else
PX4_MAKE_ARGS :=
endif
PX4_CMAKE_GENERATOR ?= "Ninja"
PX4_MAKE = ninja
PX4_MAKE_ARGS =
else
ifdef SYSTEMROOT
# Windows
PX4_CMAKE_GENERATOR := "MSYS\ Makefiles"
else
PX4_CMAKE_GENERATOR := "Unix\ Makefiles"
endif
PX4_MAKE = $(MAKE)
PX4_MAKE_ARGS = -j$(j) --no-print-directory
endif
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# check if replay env variable is set & set build dir accordingly
ifdef replay
BUILD_DIR_SUFFIX := _replay
ifdef SYSTEMROOT
# Windows
PX4_CMAKE_GENERATOR ?= "MSYS Makefiles"
else
BUILD_DIR_SUFFIX :=
PX4_CMAKE_GENERATOR ?= "Unix Makefiles"
endif
# NuttX verbose output
ifdef VN
export PX4_NUTTX_BUILD_VERBOSE=1
export V=1
PX4_MAKE = make
PX4_MAKE_ARGS = -j$(j) --no-print-directory
endif
# NuttX verbose patches output
ifdef VNP
export PX4_NUTTX_PATCHES_VERBOSE=1
endif
# additional config parameters passed to cmake
CMAKE_ARGS :=
ifdef EXTERNAL_MODULES_LOCATION
CMAKE_ARGS := -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
endif
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(2) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=$(1) $(CMAKE_ARGS) || (rm -rf $(BUILD_DIR)); fi
+@(cd $(BUILD_DIR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
+@Tools/check_submodules.sh
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
endef
define cmake-build-other
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake $(2) -G$(PX4_CMAKE_GENERATOR) || (cd .. && rm -rf $(PWD)/build_$@); fi
+@(cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
endef
# create empty targets to avoid msgs for targets passed to cmake
define cmake-targ
$(1):
@#
.PHONY: $(1)
endef
define colorecho
+@tput setaf 6
+@echo $1
+@tput sgr0
@tput setaf 6
@echo $1
@tput sgr0
endef
# Get a list of all config targets.
ALL_CONFIG_TARGETS := $(basename $(shell find "$(SRC_DIR)/cmake/configs" ! -name '*_common*' ! -name '*_sdflight_*' -name '*.cmake' -print | sed -e 's:^.*/::' | sort))
# Strip off leading nuttx_
NUTTX_CONFIG_TARGETS := $(patsubst nuttx_%,%,$(filter nuttx_%,$(ALL_CONFIG_TARGETS)))
# ADD CONFIGS HERE
# --------------------------------------------------------------------
# Do not put any spaces between function arguments.
# All targets.
$(ALL_CONFIG_TARGETS):
$(call cmake-build,$@,$(SRC_DIR))
px4fmu-v1_default:
$(call cmake-build,nuttx_px4fmu-v1_default)
# Abbreviated config targets.
px4fmu-v2_default:
$(call cmake-build,nuttx_px4fmu-v2_default)
px4fmu-v2_test:
$(call cmake-build,nuttx_px4fmu-v2_test)
# nuttx_ is left off by default; provide a rule to allow that.
$(NUTTX_CONFIG_TARGETS):
$(call cmake-build,nuttx_$@,$(SRC_DIR))
px4fmu-v4_default:
$(call cmake-build,nuttx_px4fmu-v4_default)
all_nuttx_targets: $(NUTTX_CONFIG_TARGETS)
px4-stm32f4discovery_default:
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
px4fmu-v2_ekf2:
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
mindpx-v2_default:
$(call cmake-build,nuttx_mindpx-v2_default)
posix_sitl_default:
$(call cmake-build,$@)
posix_sitl_test:
$(call cmake-build,$@)
posix_sitl_replay:
$(call cmake-build,$@)
posix_sitl_broadcast:
$(call cmake-build,$@)
ros_sitl_default:
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
qurt_eagle_travis:
$(call cmake-build,$@)
qurt_eagle_default:
$(call cmake-build,$@)
posix_eagle_default:
$(call cmake-build,$@)
eagle_default: posix_eagle_default qurt_eagle_default
eagle_legacy_default: posix_eagle_legacy_driver_default qurt_eagle_legacy_driver_default
qurt_eagle_legacy_driver_default:
$(call cmake-build,$@)
posix_eagle_legacy_driver_default:
$(call cmake-build,$@)
qurt_excelsior_default:
$(call cmake-build,$@)
posix_excelsior_default:
$(call cmake-build,$@)
excelsior_default: posix_excelsior_default qurt_excelsior_default
posix_rpi2_default:
$(call cmake-build,$@)
posix_rpi2_release:
$(call cmake-build,$@)
posix_bebop_default:
$(call cmake-build,$@)
posix: posix_sitl_default
broadcast: posix_sitl_broadcast
# Multi- config targets.
eagle_default: posix_eagle_default qurt_eagle_default
eagle_legacy_default: posix_eagle_legacy qurt_eagle_legacy
excelsior_default: posix_excelsior_default qurt_excelsior_default
excelsior_legacy_default: posix_excelsior_legacy qurt_excelsior_legacy
sitl_deprecation:
@echo "Deprecated. Use 'make posix_sitl_default jmavsim' or"
@echo "'make posix_sitl_default gazebo' if Gazebo is preferred."
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all posix broadcast eagle_default eagle_legacy_default excelsior_legacy_default excelsior_default all_nuttx_targets
run_sitl_quad: sitl_deprecation
run_sitl_plane: sitl_deprecation
run_sitl_ros: sitl_deprecation
# Other targets
# --------------------------------------------------------------------
.PHONY: qgc_firmware alt_firmware checks_bootloaders uavcan_firmware sizes check quick_check
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
# QGroundControl flashable NuttX firmware
qgc_firmware: \
check_aerocore2_default \
check_aerofc-v1_default \
check_auav-x21_default \
check_crazyflie_default \
check_mindpx-v2_default \
check_px4fmu-v1_default \
check_px4fmu-v2_default \
check_px4fmu-v2_lpe \
check_px4fmu-v3_default \
check_px4fmu-v4_default \
check_px4fmu-v4pro_default \
check_px4fmu-v5_default \
check_tap-v1_default \
check_sizes
# Other NuttX firmware
alt_firmware: \
check_px4-stm32f4discovery_default \
check_px4cannode-v1_default \
check_px4esc-v1_default \
check_px4fmu-v4pro_default \
check_px4fmu-v5_default \
check_px4nucleoF767ZI-v1_default \
check_s2740vc-v1_default \
check_sizes
checks_bootloaders: \
check_esc35-v1_bootloader \
check_px4cannode-v1_bootloader \
check_px4esc-v1_bootloader \
check_px4flow-v2_bootloader \
check_s2740vc-v1_bootloader \
# not fitting in flash check_zubaxgnss-v1_bootloader \
check_sizes
gazebo_build:
@mkdir -p build_gazebo
@if [ ! -e $(PWD)/build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) $(PWD)/Tools/sitl_gazebo; fi
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
uavcan_firmware:
ifeq ($(VECTORCONTROL),1)
$(call colorecho,"Downloading and building Vector control (FOC) firmware for the S2740VC and PX4ESC 1.6")
@rm -rf vectorcontrol
@git clone --quiet --depth 1 https://github.com/thiemar/vectorcontrol.git && cd vectorcontrol
@BOARD=s2740vc_1_0 make --silent --no-print-directory
@BOARD=px4esc_1_6 make --silent --no-print-directory && $(SRC_DIR)/Tools/uavcan_copy.sh)
@(rm -rf vectorcontrol && git clone --quiet --depth 1 https://github.com/thiemar/vectorcontrol.git && cd vectorcontrol && BOARD=s2740vc_1_0 make --silent --no-print-directory && BOARD=px4esc_1_6 make --silent --no-print-directory && ../Tools/uavcan_copy.sh)
endif
sizes:
@-find build_* -name firmware_nuttx -type f | xargs size 2> /dev/null || :
checks_defaults: \
check_px4fmu-v1_default \
check_px4fmu-v2_default \
check_mindpx-v2_default \
check_px4-stm32f4discovery_default \
# All default targets that don't require a special build environment
check: check_posix_sitl_default qgc_firmware alt_firmware checks_bootloaders tests check_format
checks_bootloaders: \
# quick_check builds a single nuttx and posix target, runs testing, and checks the style
quick_check: check_posix_sitl_default check_px4fmu-v3_default tests check_format
checks_tests: \
check_px4fmu-v2_test
checks_alts: \
check_px4fmu-v2_ekf2 \
checks_uavcan: \
check_px4fmu-v4_default_and_uavcan
checks_sitls: \
check_posix_sitl_default \
check_posix_sitl_test \
checks_last: \
check_unittest \
check_format \
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_sitls checks_last
check_format:
$(call colorecho,"Checking formatting with astyle")
@./Tools/fix_code_style.sh
@./Tools/check_code_style_all.sh
check_%:
@echo
@ -239,139 +277,48 @@ check_%:
@$(MAKE) --no-print-directory $(subst check_,,$@)
@echo
# Documentation
# --------------------------------------------------------------------
.PHONY: parameters_metadata airframe_metadata px4_metadata
check_px4fmu-v4_default: uavcan_firmware
check_px4fmu-v4_default_and_uavcan: check_px4fmu-v4_default
@echo
ifeq ($(VECTORCONTROL),1)
@echo "Cleaning up vectorcontrol firmware"
@rm -rf vectorcontrol
@rm -rf ROMFS/px4fmu_common/uavcan
endif
parameters_metadata: posix_sitl_default
@python $(SRC_DIR)/Tools/px_process_params.py -s $(SRC_DIR)/src --markdown
unittest: posix_sitl_test
@export CC=clang
@export CXX=clang++
@export ASAN_OPTIONS=symbolize=1
$(call cmake-build-other,unittest, ../unittests)
@(cd build_unittest && ctest -j2 --output-on-failure)
test_onboard_sitl:
@HEADLESS=1 make posix_sitl_test gazebo_iris
airframe_metadata:
@python ${SRC_DIR}/Tools/px_process_airframes.py -v -a ${SRC_DIR}/ROMFS/px4fmu_common/init.d --markdown
@python ${SRC_DIR}/Tools/px_process_airframes.py -v -a ${SRC_DIR}/ROMFS/px4fmu_common/init.d --xml
px4_metadata: parameters_metadata airframe_metadata
# S3 upload helpers
# --------------------------------------------------------------------
# s3cmd uses these ENV variables
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# AWS_S3_BUCKET
.PHONY: s3put_firmware s3put_qgc_firmware
Firmware.zip:
@rm -rf Firmware.zip
package_firmware:
@zip --junk-paths Firmware.zip `find . -name \*.px4`
s3put_firmware: Firmware.zip
$(SRC_DIR)/Tools/s3put.sh Firmware.zip
s3put_qgc_firmware: qgc_firmware
@find $(SRC_DIR)/build_* -name "*.px4" -exec $(SRC_DIR)/Tools/s3put.sh "{}" \;
s3put_metadata: px4_metadata
@$(SRC_DIR)/Tools/s3put.sh airframes.md
@$(SRC_DIR)/Tools/s3put.sh airframes.xml
@$(SRC_DIR)/Tools/s3put.sh build_posix_sitl_default/parameters.xml
@$(SRC_DIR)/Tools/s3put.sh parameters.md
# Astyle
# --------------------------------------------------------------------
.PHONY: check_format format
check_format:
$(call colorecho,"Checking formatting with astyle")
@$(SRC_DIR)/Tools/check_code_style_all.sh
@git diff --check
format:
$(call colorecho,"Formatting with astyle")
@$(SRC_DIR)/Tools/check_code_style_all.sh --fix
# Testing
# --------------------------------------------------------------------
.PHONY: unittest run_tests_posix tests tests_coverage
unittest: posix_sitl_default
$(call cmake-build,unittest,$(SRC_DIR)/unittests)
@(cd build_unittest && ctest -j2 --output-on-failure)
run_tests_posix:
$(MAKE) --no-print-directory posix_sitl_default test_results
tests: unittest run_tests_posix
tests_coverage:
@lcov --zerocounters --directory $(SRC_DIR) --quiet
@lcov --capture --initial --directory $(SRC_DIR) --quiet --output-file coverage.info
@$(MAKE) --no-print-directory unittest PX4_CODE_COVERAGE=1 CCACHE_DISABLE=1
@$(MAKE) --no-print-directory posix_sitl_default test_results PX4_CODE_COVERAGE=1 CCACHE_DISABLE=1
@lcov --no-checksum --directory $(SRC_DIR) --capture --quiet --output-file coverage.info
@lcov --remove coverage.info '/usr/*' 'unittests/googletest/*' --quiet --output-file coverage.info
@genhtml --legend --show-details --function-coverage --quiet --output-directory coverage-html coverage.info
@$(MAKE) --no-print-directory posix_sitl_default test_results_junit
# Clang analyzers
# --------------------------------------------------------------------
.PHONY: scan-build clang-check clang-tidy
scan-build:
@export CCACHE_DISABLE=1
@mkdir -p $(SRC_DIR)/build_posix_sitl_default_scan-build
@cd $(SRC_DIR)/build_posix_sitl_default_scan-build && scan-build cmake .. -GNinja -DCONFIG=posix_sitl_default
@scan-build cmake --build $(SRC_DIR)/build_posix_sitl_default_scan-build
clang-check:
@CC=clang CXX=clang++ $(MAKE) --no-print-directory posix_sitl_default
@$(SRC_DIR)/Tools/clang-tool.sh -b build_posix_sitl_default -t clang-check
clang-tidy:
rm -rf $(SRC_DIR)/build_posix_sitl_default
@CC=clang CXX=clang++ $(MAKE) --no-print-directory posix_sitl_default
@$(SRC_DIR)/Tools/clang-tool.sh -b build_posix_sitl_default -t clang-tidy
clang-tidy-parallel:
rm -rf $(SRC_DIR)/build_posix_sitl_default
@CC=clang CXX=clang++ $(MAKE) --no-print-directory posix_sitl_default
@$(SRC_DIR)/Tools/run-clang-tidy.py -j$(j) -p $(SRC_DIR)/build_posix_sitl_default
clang-tidy-fix:
rm -rf $(SRC_DIR)/build_posix_sitl_default
@CC=clang CXX=clang++ $(MAKE) --no-print-directory posix_sitl_default
@run-clang-tidy.py -fix -j$(j) -p $(SRC_DIR)/build_posix_sitl_default
# Cleanup
# --------------------------------------------------------------------
.PHONY: clean submodulesclean distclean
clean:
@rm -rf $(SRC_DIR)/build_*/
-@$(MAKE) --no-print-directory -C NuttX/nuttx clean
@rm -rf build_*/
@(cd NuttX/nuttx && make clean)
submodulesclean:
@git submodule foreach --quiet --recursive git clean -ff -x -d
@git submodule update --quiet --init --recursive --force || true
@git submodule sync --recursive
@git submodule deinit -f .
@git submodule update --init --recursive --force
submodulesupdate:
@git submodule update --quiet --init --recursive || true
@git submodule sync --recursive
@git submodule update --init --recursive
distclean: submodulesclean
@git clean -ff -x -d -e ".project" -e ".cproject"
gazeboclean:
@rm -rf ~/.gazebo/*
# targets handled by cmake
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim replay \
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane gazebo_solo
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
distclean: submodulesclean gazeboclean
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea"
# --------------------------------------------------------------------
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
%:
$(if $(filter $(FIRST_ARG),$@), \
$(error "$@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
.PHONY: clean
CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
@ -380,21 +327,3 @@ CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
# @echo "build configurations."
# @echo
empty :=
space := $(empty) $(empty)
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
help:
@echo "Usage: $(MAKE) <target>"
@echo "Where <target> is one of:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS) $(NUTTX_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
@echo
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
# Print a list of all config targets.
list_config_targets:
@for targ in $(patsubst nuttx_%,[nuttx_]%,$(ALL_CONFIG_TARGETS)); do echo $$targ; done

2
NuttX

@ -1 +1 @@
Subproject commit 44ad7e224c1ef17911ab8b4101fd624ad9ee4177
Subproject commit f0f4bdc872d324f64e9d93d6f8989d3c1dfa2633

101
README.md
View File

@ -1,98 +1,35 @@
## PX4 Pro Drone Autopilot ##
[![Releases](https://img.shields.io/github/release/PX4/Firmware.svg)](https://github.com/PX4/Firmware/releases) [![DOI](https://zenodo.org/badge/22634/PX4/Firmware.svg)](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware) [![Build Status](https://travis-ci.org/PX4/Firmware.svg?branch=master)](https://travis-ci.org/PX4/Firmware) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Build Status](https://travis-ci.org/PX4/Firmware.svg?branch=master)](https://travis-ci.org/PX4/Firmware) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the src/modules directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes:
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
* [Fixed wing](http://px4.io/portfolio_category/plane/)
* [VTOL](http://px4.io/portfolio_category/vtol/)
* many more experimental types (Rovers, Blimps, Boats, Submarines, etc)
* Releases: [Downloads](https://github.com/PX4/Firmware/releases)
* Official Website: http://px4.io
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes (more experimental are supported):
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
* [Fixed wing](http://px4.io/portfolio_category/plane/)
* [VTOL](http://px4.io/portfolio_category/vtol/)
* Releases
* [Downloads](https://github.com/PX4/Firmware/releases)
Please refer to the [user documentation](https://docs.px4.io/en/) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
### Users ###
### Weekly Dev Call
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribute/).
* [Wednesday 17:00 Central European Time, 11:00 Eastern Time, 08:00 Pacific Standard Time](https://www.google.com/calendar/embed?src=bGludXhmb3VuZGF0aW9uLm9yZ19nMjF0dmFtMjRtN3BtN2poZXYwMWJ2bHFoOEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t)
* [Uber conference (dial-in or web client)](https://www.uberconference.com/lf-dronecode)
* The agenda is announced in advance on the [PX4 Discuss](http://discuss.px4.io/c/weekly-dev-call)
* Issues and PRs may be labelled [devcall](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3Adevcall) to flag them for discussion
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
### Developers ###
* [Developer Guide](https://dev.px4.io/)
* [Build instructions](https://dev.px4.io/en/setup/building_px4.html)
* [Guide for Contributions](https://dev.px4.io/en/contribute/)
## Maintenance Team
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
* [Developer guide](http://dev.px4.io)
* Project / Founder - [Lorenz Meier](https://github.com/LorenzMeier)
* [Dev Call](https://github.com/PX4/Firmware/labels/devcall) - [Ramon Roche](https://github.com/mrpollo)
* Communication Architecture
* [Beat Kueng](https://github.com/bkueng)
* [Julian Oes](https://github.com/JulianOes)
* UI / UX
* [Donald Gagne](https://github.com/DonLakeFlyer)
* [Gus Grubba](https://github.com/dogmaphobic)
* [Multicopter Flight Control](https://github.com/PX4/Firmware/labels/multicopter)
* [Dennis Mannhart](https://github.com/Stifael)
* [Matthias Grob](https://github.com/MaEtUgR)
* [VTOL Flight Control](https://github.com/PX4/Firmware/labels/vtol)
* [Daniel Agar](https://github.com/dagar)
* [Mathieu Bresciani](https://github.com/bresch)
* [Sander Smeets](https://github.com/sanderux)
* [Roman Bapst](https://github.com/tumbili)
* [Andreas Antener](https://github.com/AndreasAntener)
* [Fixed Wing Flight Control](https://github.com/PX4/Firmware/labels/fixedwing)
* [Daniel Agar](https://github.com/dagar)
* [Paul Riseborough](https://github.com/priseborough)
* Racers - [Matthias Grob](https://github.com/MaEtUgR)
* OS / drivers - [David Sidrane](https://github.com/davids5)
* [UAVCAN](https://github.com/PX4/Firmware/labels/uavcan) / Industrial - [Pavel Kirienko](https://github.com/pavel-kirienko)
* [State Estimation](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3A%22state+estimation%22) - [James Goppert](https://github.com/jgoppert), [Paul Riseborough](https://github.com/priseborough)
* Vision based navigation
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mohammed Kabir](https://github.com/mhkabir)
* Obstacle Avoidance - [Vilhjalmur Vilhjalmsson](https://github.com/vilhjalmur89)
* [Snapdragon](https://github.com/PX4/Firmware/labels/snapdragon)
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mark Charlebois](https://github.com/mcharleb)
* [Intel Aero](https://github.com/PX4/Firmware/labels/intel%20aero)
* [Lucas De Marchi](https://github.com/lucasdemarchi)
* [José Roberto de Souza](https://github.com/zehortigoza)
* [Raspberry Pi / Navio](https://github.com/PX4/Firmware/labels/raspberry_pi) - [Beat Kueng](https://github.com/bkueng)
* [Parrot Bebop](https://github.com/PX4/Firmware/labels/bebop) - [Michael Schaeuble](https://github.com/eyeam3)
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
## Supported Hardware
This repository contains code supporting these boards:
* [Snapdragon Flight](https://dev.px4.io/en/flight_controller/snapdragon_flight.html)
* [Intel Aero](https://dev.px4.io/en/flight_controller/intel_aero.html)
* [Raspberry PI with Navio 2](https://dev.px4.io/en/flight_controller/raspberry_pi.html)
* [Parrot Bebop 2](https://dev.px4.io/en/advanced/parrot_bebop.html)
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
* FMUv1.x
* FMUv2.x
* [Pixhawk](https://dev.px4.io/en/flight_controller/pixhawk.html)
* Pixhawk Mini
* [Pixfalcon](https://dev.px4.io/en/flight_controller/pixfalcon.html)
* FMUv3.x [Pixhawk 2](https://pixhawk.org/modules/pixhawk2)
* FMUv4.x
* [Pixracer](https://dev.px4.io/en/flight_controller/pixracer.html)
* Pixhawk 3 Pro
* FMUv5.x (ARM Cortex M7, future Pixhawk)
* FMUv2.x ([Pixhawk](http://dev.px4.io/hardware-pixhawk.html), Pixhawk 2 and [Pixfalcon](http://dev.px4.io/hardware-pixfalcon.html))
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
* AeroCore (v1 and v2)
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
* Gumstix AeroCore (v1 and v2)
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
* [Bitcraze Crazyflie 2.0](https://dev.px4.io/en/flight_controller/crazyflie2.html)
## Project Milestones
The PX4 software and Pixhawk hardware (which has been designed for it) has been created in 2011 by [Lorenz Meier](https://github.com/LorenzMeier).

View File

@ -4,18 +4,6 @@
#
# @type Quadrotor Wide
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Anton Babushkin <anton@px4.io>, Simon Wilks <simon@px4.io>
#

View File

@ -4,16 +4,6 @@
#
# @type Quadrotor Wide
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Anton Babushkin <anton@px4.io>
#
@ -39,6 +29,6 @@ then
param set BAT_A_PER_V 15.39103
fi
set MIXER quad_dc
set MIXER quad_w
set PWM_OUT 1234

View File

@ -4,18 +4,6 @@
#
# @type Quadrotor Wide
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Thomas Gubler <thomas@px4.io>
#

View File

@ -4,18 +4,6 @@
#
# @type Quadrotor Wide
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Simon Wilks <simon@px4.io>
#
@ -41,9 +29,9 @@ then
param set MPC_XY_FF 0.2
param set MPC_XY_VEL_MAX 2
param set PWM_MIN 1080
fi
set MIXER quad_w
set PWM_OUT 1234
set PWM_MIN 1080

View File

@ -0,0 +1,39 @@
#!nsh
#
# @name HobbyKing SK450 DeadCat modification
#
# @type Quadrotor Wide
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.0
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.03
param set MC_ROLLRATE_D 0.0015
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.03
param set MC_PITCHRATE_D 0.0015
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.1
param set MC_YAWRATE_I 0.07
param set MC_YAWRATE_D 0.0
fi
set MIXER sk450_deadcat
set PWM_OUT 1234
set PWM_AUX_OUT 1234
# set PWM_AUX_MIN 900
# set PWM_AUX_MAX 2100
set PWM_AUX_RATE 100
gimbal start

View File

@ -7,7 +7,7 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/4001_quad_x
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
@ -21,3 +21,10 @@ then
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_MIN 1100
set PWM_MAX 1950

View File

@ -1,26 +0,0 @@
#!nsh
#
# @name H4 680mm with Z1 Tiny2 Gimbal
#
# @type Quadrotor x
#
# @maintainer Leon Mueller <thedevleon>
#
sh /etc/init.d/4002_quad_x_mount
# The Z1 Tiny2 can handle up to 400Hz
# and works with min 1020us, middle 1520us, max 2020us
# see http://www.zhiyun-tech.com/uploadfile/datedown/instruction/Tiny2_English_instructionV1.03.pdf
# under Gimbal Connection Instruction
set PWM_AUX_RATE 400
set PWM_AUX_DISARMED 1520
set PWM_AUX_MIN 1020
set PWM_AUX_MAX 2020
# Start FrSky telemetry on SERIAL4 (ttyS6, designated "SERIAL4/5" on the case)
frsky_telemetry start -d /dev/ttyS6
# GPIO LED
gpio_led start -p 6

View File

@ -0,0 +1,14 @@
#!nsh
#
# @name HIL Rascal 110 (Flightgear)
#
# @type Simulation
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
sh /etc/init.d/rc.fw_defaults
set HIL yes
set MIXER AERT

View File

@ -0,0 +1,41 @@
#!nsh
#
# @name HIL Malolo 1 (Flightgear)
#
# @type Simulation
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
then
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 25
param set FW_AIRSPD_MAX 40
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.8
param set FW_PR_I 0.05
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.1
param set FW_P_ROLLFF 0
param set FW_RR_FF 0.6
param set FW_RR_I 0.02
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.1
param set FW_R_LIM 45
param set FW_R_RMAX 0
param set FW_YR_FF 0.0
param set FW_YR_I 0
param set FW_YR_IMAX 0.2
param set FW_YR_P 0.0
fi
set HIL yes
# Set the AERT mixer for HIL (even if the malolo is a flying wing)
set MIXER AERT

View File

@ -4,15 +4,6 @@
#
# @type Octorotor Coaxial
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#

View File

@ -4,15 +4,6 @@
#
# @type Octo Coax Wide
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
@ -40,7 +31,7 @@ then
param set MPC_HOLD_MAX_XY 0.25
param set MPC_THR_MIN 0.15
param set MPC_Z_VEL_MAX_DN 2.0
param set MPC_Z_VEL_MAX 2.0
param set BAT_N_CELLS 4
fi

View File

@ -4,10 +4,10 @@
#
# @type VTOL Duo Tailsitter
#
# @output MAIN1 motor right
# @output MAIN2 motor left
# @output MAIN5 elevon right
# @output MAIN6 elevon left
# @output MAIN1 motor left
# @output MAIN2 motor right
# @output MAIN5 elevon left
# @output MAIN6 elevon right
#
# @maintainer Roman Bapst <roman@px4.io>
#

View File

@ -1,18 +1,10 @@
#!nsh
#
# @name BirdsEyeView Aerobotics FireFly6
#
# @type VTOL Tiltrotor
# @maintainer Roman Bapst <roman@uaventure.com>
# @output MAIN1 Front right motor bottom
# @output MAIN2 Front right motor top
# @output MAIN3 Back motor bottom
# @output MAIN4 Back motor top
# @output MAIN5 Front left motor bottom
# @output MAIN6 Front left motor top
# @output AUX1 Tilt servo
# @output AUX2 Elevon 1
# @output AUX3 Elevon 2
# @output AUX4 Gear
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
@ -20,16 +12,16 @@ sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.19
param set MC_ROLLRATE_P 0.17
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.005
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 4.0
param set MC_YAW_P 3.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02

View File

@ -4,15 +4,6 @@
#
# @type VTOL Quad Tailsitter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 4
# @output MAIN4 motor 5
# @output MAIN5 elevon left
# @output MAIN6 elevon right
# @output MAIN7 canard surface
# @output MAIN8 rudder
#
# @maintainer Roman Bapst <roman@px4.io>
#

View File

@ -1,17 +1,10 @@
#!nsh
#
# @name Fun Cub Quad VTOL
# @name Fun Cub Quad VTOL.
#
# @type Standard VTOL
#
# @maintainer Simon Wilks <simon@uaventure.com>
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output AUX1 Aileron 1
# @output AUX2 Aileron 2
# @output AUX3 Elevator
# @output AUX4 Rudder
# @output AUX5 Throttle
#
sh /etc/init.d/rc.vtol_defaults
@ -40,8 +33,6 @@ then
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 40
param set MC_YAWRAUTO_MAX 40
param set FW_PR_FF 0.5
param set FW_PR_I 0.02

View File

@ -1,15 +1,10 @@
#!nsh
#
# @name Generic quad delta VTOL
# @name Generic quad delta VTOL.
#
# @type Standard VTOL
#
# @maintainer Simon Wilks <simon@uaventure.com>
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output AUX1 Right elevon
# @output AUX2 Left elevon
# @output AUX3 Motor
#
sh /etc/init.d/rc.vtol_defaults
@ -20,28 +15,22 @@ then
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set MC_ROLL_P 6.5
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.01
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.01
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.12
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 3.5
param set MC_YAW_P 2.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 50
param set MC_YAWRAUTO_MAX 20
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.1
param set MPC_ACC_HOR_MAX 2.0
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080

View File

@ -31,8 +31,6 @@ then
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 40
param set MC_YAWRAUTO_MAX 40
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080

View File

@ -34,11 +34,9 @@ then
param set MC_YAWRATE_I 0.04
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 40.0
param set MC_YAWRAUTO_MAX 40.0
param set MPC_ACC_HOR_MAX 2.0
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_MAX 1.5
param set MPC_TKO_SPEED 1.5
param set MPC_LAND_SPEED 0.8

View File

@ -45,7 +45,6 @@ then
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_MAX 40.0
param set MC_YAWRATE_P 0.18
param set MC_YAWRATE_MAX 40.0
param set MC_YAWRAUTO_MAX 40.0
param set MIS_TAKEOFF_ALT 2.5
@ -67,6 +66,7 @@ then
param set MPC_XY_VEL_P 0.05
param set MPC_Z_FF 0.3
param set MPC_Z_P 0.5
param set MPC_Z_VEL_MAX 1.0
param set MPC_Z_VEL_P 0.1
param set NAV_ACC_RAD 3.0

View File

@ -1,37 +0,0 @@
#!nsh
#
# @name CruiseAder Claire
#
# @type VTOL Tiltrotor
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 1
param set VT_TILT_MC 0.08
param set VT_TILT_TRANS 0.5
param set VT_TILT_FW 0.9
param set VT_MOT_COUNT 4
param set VT_FW_MOT_OFFID 13
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
fi
set MIXER claire
set PWM_OUT 1234
set PWM_RATE 400
set PWM_MAX 2000
set MIXER_AUX claire
set PWM_AUX_RATE 50
set PWM_AUX_RATE 123
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set PWM_AUX_DISARMED 1000
set MAV_TYPE 21

View File

@ -1,79 +0,0 @@
#!nsh
#
# @name E-flite Convergence
# @type VTOL Tiltrotor
# @maintainer Andreas Antener <andreas@uaventure.com>
# @output MAIN1 Motor right
# @output MAIN2 Motor left
# @output MAIN3 Motor back
# @output MAIN4 empty
# @output MAIN5 Tilt servo right
# @output MAIN6 Tilt servo left
# @output MAIN7 Elevon right
# @output MAIN8 Elevon left
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 3
param set VT_FW_MOT_OFFID 3
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
param set VT_B_TRANS_DUR 1.0
param set VT_FW_DIFTHR_EN 1
param set VT_FW_DIFTHR_SC 0.17
param set VT_FW_PERM_STAB 0
param set VT_F_TRANS_DUR 1.2
param set VT_F_TR_OL_TM 4.0
param set VT_TILT_FW 1.0
param set VT_TILT_MC 0.0
param set VT_TILT_TRANS 0.45
param set VT_TRANS_MIN_TM 1.2
param set VT_TRANS_P2_DUR 1.3
param set FW_L1_PERIOD 17
param set FW_MAN_R_MAX 50.0
param set FW_ACRO_X_MAX 270
param set FW_ACRO_Y_MAX 270
param set FW_ACRO_Z_MAX 180
param set FW_PR_FF 0.5
param set FW_PR_P 0.08
param set FW_PSP_OFF 5.0
param set FW_P_LIM_MAX 30
param set FW_P_LIM_MIN -30
param set FW_P_RMAX_NEG 60
param set FW_P_RMAX_POS 60
param set FW_RR_FF 0.33
param set FW_RR_P 0.11
param set FW_YR_FF 0.3
param set FW_YR_P 0.05
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_P 0.15
param set MC_PITCH_P 6.0
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_P 0.15
param set MC_ROLL_P 6.0
param set MC_YAWRATE_MAX 120
param set MC_YAWRATE_P 0.27
param set MC_YAW_FF 0.35
param set MC_YAW_P 2.5
param set MC_YAWRATE_P 0.3
param set MPC_LAND_SPEED 1.2
param set MPC_TKO_SPEED 2.5
param set MPC_Z_VEL_MAX_UP 3.0
param set CBRK_AIRSPD_CHK 162128
param set FW_ARSP_MODE 2
param set SENS_BOARD_ROT 8
fi
set MIXER vtol_convergence
set PWM_OUT 1234
set PWM_RATE 400
set MAV_TYPE 21

View File

@ -1,114 +0,0 @@
#!nsh
#
# @name DeltaQuad
# @type Standard VTOL
# @maintainer Sander Smeets <sander@droneslab.com>
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output AUX1 Right elevon
# @output AUX2 Left elevon
# @output AUX3 Motor
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 1
param set VT_DWN_PITCH_MAX 8
param set VT_FW_QC_P 55
param set VT_FW_QC_R 55
param set VT_TRANS_MIN_TM 8
param set VT_B_TRANS_DUR 5
param set VT_WV_LND_EN 1
param set VT_WV_LTR_EN 1
param set VT_FWD_THRUST_SC 2
param set VT_F_TRANS_DUR 1
param set VT_IDLE_PWM_MC 1025
param set FW_ARSP_MODE 2
param set FW_L1_PERIOD 25
param set FW_PR_FF 0.7
param set FW_PR_I 0.18
param set FW_PR_P 0.15
param set FW_P_TC 0.5
param set FW_PSP_OFF 5
param set FW_R_LIM 35
param set FW_RR_FF 0.9
param set FW_RR_I 0.08
param set FW_RR_P 0.18
param set FW_T_HRATE_FF 0.5
param set FW_T_CLMB_MAX 3
param set FW_T_SINK_MAX 3
param set FW_T_SINK_MIN 1
param set FW_T_VERT_ACC 6
param set FW_THR_CRUISE 0.68
param set FW_THR_SLEW_MAX 1
param set FW_MAN_P_MAX 30
param set FW_P_LIM_MAX 20
param set FW_P_LIM_MIN -25
param set FW_P_RMAX_NEG 45
param set FW_P_RMAX_POS 45
param set FW_R_RMAX 50
param set LNDMC_ALT_MAX 9999
param set LNDMC_XY_VEL_MAX 1
param set LNDMC_Z_VEL_MAX 0.7
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.16
param set MC_ROLLRATE_I 0.01
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_ROLLRATE_MAX 80
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_PITCHRATE_MAX 80
param set MC_YAW_P 3.5
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 20
param set MC_YAWRAUTO_MAX 20
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.1
param set MPC_XY_VEL_MAX 4
param set MPC_ACC_HOR_MAX 2.0
param set MPC_LAND_SPEED 1.5
param set MPC_MAN_R_MAX 30
param set MPC_TILTMAX_LND 35
param set MPC_Z_VEL_MAX 1.5
param set MPC_Z_VEL_MAX_UP 1.5
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_HOLD_MAX_XY 0.5
param set MPC_HOLD_MAX_Z 0.5
param set CBRK_AIRSPD_CHK 162128
param set CBRK_IO_SAFETY 22027
param set EKF2_GPS_POS_X -0.12
param set EKF2_IMU_POS_X -0.12
param set EKF2_TAU_VEL 0.5
param set SYS_COMPANION 57600
fi
set MIXER vtol_quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_delta
set PWM_ACHDIS 3
set PWM_AUX_DISARMED 950
set MAV_TYPE 22

View File

@ -4,11 +4,6 @@
#
# @type Tricopter Y+
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 yaw servo
#
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#

View File

@ -4,11 +4,6 @@
#
# @type Tricopter Y-
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 yaw servo
#
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#

View File

@ -17,6 +17,11 @@ set MIXER coax
if [ $AUTOCNF == yes ]
then
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.35
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.25
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
@ -46,8 +51,14 @@ fi
# use PWM parameters for throttle channel
set PWM_OUT 34
set PWM_RATE 400
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
# This is the gimbal pass mixer
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000

View File

@ -1,57 +0,0 @@
#!nsh
#
# @name Blade 130X
#
# @type Helicopter
#
# @maintainer Bart Slinger <bartslinger@gmail.com>
# @output MAIN1 main motor
# @output MAIN2 front swashplate servo
# @output MAIN3 right swashplate servo
# @output MAIN4 left swashplate servo
# @output MAIN5 tail-rotor servo
#
sh /etc/init.d/rc.mc_defaults
# Configure as helicopter (number 4 defined in commander_helper.cpp)
set MAV_TYPE 4
set MIXER blade130
#set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 5.0
param set MC_ROLLRATE_P 0.0
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0
param set MC_ROLLRATE_FF 0.15
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.0
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.0
param set MC_PITCHRATE_FF 0.15
param set MC_YAW_P 3.0
param set MC_YAWRATE_P 0.1
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.0
param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set ATT_BIAS_MAX 0.0
param set CBRK_IO_SAFETY 22027
fi
set HIL no

View File

@ -4,13 +4,6 @@
#
# @type custom
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Julian Oes <julian@oes.ch>
#
# This startup can be used on Pixhawk/Pixfalcon/Pixracer for the

View File

@ -4,11 +4,6 @@
#
# @type Standard Plane
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN3 rudder
# @output MAIN4 throttle
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#

View File

@ -23,3 +23,6 @@ set MIXER AERT
# use PWM parameters for throttle channel
set PWM_OUT 4
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX

View File

@ -45,3 +45,6 @@ set MIXER AAERTWF
# use PWM parameters for throttle channel
set PWM_OUT 5
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX

View File

@ -46,3 +46,6 @@ set MIXER AAVVTWFF
# use PWM parameters for throttle channel
set PWM_OUT 5
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX

View File

@ -11,45 +11,36 @@ sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 12.5
param set FW_AIRSPD_TRIM 16.5
param set LNDFW_AIRSPD_MAX 6
param set LNDFW_VELI_MAX 4
param set LNDFW_VEL_XY_MAX 3
param set LNDFW_VEL_Z_MAX 5
param set FW_R_TC 0.4
param set FW_P_TC 0.4
param set FW_THR_CRUISE 0.55
param set FW_L1_DAMPING 0.75
param set FW_L1_PERIOD 15
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 16
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
param set FW_LND_FLALT 8
param set FW_LND_FLALT 5
param set FW_LND_HHDIST 15
param set FW_LND_HVIRT 13
param set FW_LND_TLALT 10
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_P_LIM_MAX 20
param set FW_P_LIM_MIN -30
param set FW_R_LIM 45
param set FW_PR_FF 0.45
param set FW_PR_FF 0.35
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.005
param set FW_RR_FF 0.45
param set FW_PR_P 0.08
param set FW_RR_FF 0.6
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.013
param set FW_P_RMAX_NEG 70
param set FW_P_RMAX_POS 70
param set FW_R_RMAX 70
param set FW_RR_P 0.04
param set SYS_COMPANION 157600
param set PWM_MAIN_REV0 1
param set PWM_MAIN_REV1 1
param set PWM_MAIN_REV2 1
param set PWM_DISARMED 0
param set PWM_MIN 900
param set PWM_MAX 2100
param set MIS_TAKEOFF_ALT 50
param set NAV_LOITER_RAD 30
fi
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
set MIXER caipi
set PWM_OUT 1234

View File

@ -4,17 +4,9 @@
#
# @type Quadrotor x
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#

View File

@ -1,31 +0,0 @@
#!nsh
#
# @name Generic Quadrotor X config with mount (e.g. gimbal)
#
# @type Quadrotor x
#
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 Mount pitch
# @output AUX2 Mount roll
# @output AUX3 Mount yaw
# @output AUX4 Mount retract
#
# @maintainer Leon Mueller <thedevleon>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
set MIXER_AUX mount
set PWM_AUX_OUT 123456
set PWM_AUX_RATE 50

View File

@ -1,35 +0,0 @@
#!nsh
#
# @name Lumenier QAV-R (raceblade) 5" arms
#
# @type Quadrotor x
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
#
# @maintainer James Goppert <james.goppert@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.16
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.15
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_TPA_BREAK_P 0.7
param set MC_TPA_RATE_P 0.3
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
fi

View File

@ -4,13 +4,6 @@
#
# @type Quadrotor x
#
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
@ -36,7 +29,7 @@ then
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.8
param set BAT_V_DIV 34.32838
param set BAT_V_SCALING 0.00838095238
fi
set OUTPUT_MODE ardrone

View File

@ -4,6 +4,10 @@
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Mark Whitehorn <kd0aij@gmail.com>
#
@ -29,6 +33,4 @@ then
param set MPC_MANTHR_MIN 0.06
param set CBRK_IO_SAFETY 22027
param set ATT_BIAS_MAX 0.0
param set MC_TPA_BREAK_P 0.5
param set MC_TPA_RATE_P 0.5
fi

View File

@ -4,6 +4,10 @@
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#

View File

@ -4,6 +4,10 @@
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#

View File

@ -25,5 +25,4 @@ then
param set MC_YAWRATE_D 0.0
fi
set MIXER quad_x_can
set OUTPUT_MODE uavcan_esc

View File

@ -1,43 +0,0 @@
#!nsh
#
# @name Parrot Bebop Frame
#
# @type Quadrotor x
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Michael Schaeuble
#
sh /etc/init.d/rc.mc_defaults
#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
then
# Set all params here, then disable autoconfig
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.109999999403953552
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0006
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.000799999
param set MC_YAW_P 1.049999
param set MC_YAWRATE_P 0.05
param set MC_YAWRATE_I 0.001
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.7
fi
set OUTPUT_MODE bebop
set USE_IO no
set MIXER bebop

View File

@ -4,13 +4,6 @@
#
# @type Quadrotor x
#
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
@ -30,5 +23,6 @@ then
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set PWM_MIN 1200
fi
set PWM_MIN 1200

View File

@ -4,13 +4,6 @@
#
# @type Quadrotor x
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
@ -23,7 +16,7 @@ then
param set MC_ROLLRATE_P 0.11
param set MPC_MANTHR_MIN 0.08
param set MPC_XY_VEL_MAX 3.0
param set MPC_Z_VEL_MAX_DN 2.0
param set MPC_Z_VEL_MAX 2.0
# INAV: higher GPS weights for better altitude control
param set INAV_W_Z_BARO 0.3
@ -86,7 +79,7 @@ then
param set RC5_TRIM 1500
fi
set MIXER quad_x
set MIXER solo
set PWM_OUT 1234
set MIXER_AUX none

View File

@ -24,17 +24,19 @@ then
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set PWM_MIN 1100
param set PWM_MAX 1900
param set PWM_AUX_DISARMED 950
fi
set MIXER quad_h
set PWM_RATE 50
set PWM_OUT 1234
set PWM_MIN 1100
set PWM_MAX 1900
set PWM_DISARMED 1500
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set PWM_AUX_DISARMED 950

View File

@ -4,6 +4,10 @@
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Mark Whitehorn <kd0aij@gmail.com>
#
@ -16,9 +20,9 @@ then
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.0055
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_P 0.24
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0055
param set MC_PITCHRATE_D 0.0065
param set MC_YAW_P 4.0
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
@ -29,8 +33,6 @@ then
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set MC_TPA_BREAK_P 0.5
param set MC_TPA_RATE_P 0.5
param set PWM_MIN 1075

View File

@ -1,64 +0,0 @@
#!nsh
#
# @name Spedix S250AQ
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
#
# @type Quadrotor asymmetric
#
# @output MAIN1 motor1 (front right: CCW)
# @output MAIN2 motor2 (back left: CCW)
# @output MAIN3 motor3 (front left: CW)
# @output MAIN4 motor4 (back right: CW)
#
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @maintainer Mark Whitehorn <kd0aij@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_s250aq
set MAV_TYPE 2
set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.19
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.0055
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0055
param set MC_YAW_P 4.0
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set MC_TPA_BREAK_D 0.3
param set MC_TPA_BREAK_I 1.0
param set MC_TPA_BREAK_P 0.3
param set MC_TPA_RATE_D 1.0
param set MC_TPA_RATE_I 0.0
param set MC_TPA_RATE_P 1.0
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set ATT_BIAS_MAX 0.0
param set CBRK_IO_SAFETY 22027
fi

View File

@ -4,6 +4,10 @@
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer James Goppert <james.goppert@gmail.com>
#
@ -11,17 +15,9 @@ sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.05
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.001
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.05
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.001
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set BAT_N_CELLS 6
param set PWM_MIN 1200
fi

View File

@ -1,78 +0,0 @@
#!nsh
#
# @name Intel Aero RTF
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
#
# @type Quadrotor x
sh /etc/init.d/rc.mc_defaults
#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
then
# Set all params here, then disable autoconfig
param set COM_DISARM_LAND 3
param set LNDMC_MAN_DWNTHR 0.2500
param set LNDMC_POS_UPTHR 0.5500
param set LNDMC_Z_VEL_MAX 2.0000
param set MC_ROLL_P 8.0000
param set MC_ROLLRATE_P 0.1300
param set MC_ROLLRATE_I 0.07
param set MC_ROLLRATE_D 0.0012
param set MC_ROLLRATE_MAX 360
param set MC_PITCH_P 8.0000
param set MC_PITCHRATE_P 0.1300
param set MC_PITCHRATE_I 0.07
param set MC_PITCHRATE_D 0.0012
param set MC_PITCHRATE_MAX 360
param set MC_YAW_P 4.0
param set MC_YAWRATE_P 0.119999997317790985
param set MC_YAWRATE_I 0.050000000745058060
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MPC_LAND_SPEED 0.7000
param set MPC_MANTHR_MIN 0.0400
param set MPC_THR_HOVER 0.5000
param set MPC_THR_MAX 0.9400
param set MPC_THR_MIN 0.1000
param set MPC_XY_CRUISE 8.0000
param set MPC_XY_P 1.5000
param set MPC_XY_VEL_P 0.1500
param set MPC_Z_P 1.5000
param set MPC_Z_VEL_I 0.1500
param set MPC_Z_VEL_MAX_DN 4.0000
param set MPC_Z_VEL_MAX_UP 5.0000
param set MPC_Z_VEL_P 0.8000
param set EKF2_GPS_POS_X -0.0600
param set EKF2_GPS_POS_Z -0.1000
param set EKF2_MIN_OBS_DT 50
param set EKF2_BARO_GATE 10.0
param set EKF2_BARO_NOISE 5.0
param set EKF2_ACC_NOISE 0.7
param set SYS_LOGGER 1
fi
tap_esc start -d /dev/ttyS0 -n 4
usleep 300000
set OUTPUT_MODE tap_esc
set MIXER quad_x
set USE_IO no
param set SYS_COMPANION 460800
set MAVLINK_COMPANION_DEVICE /dev/ttyS1

View File

@ -1,55 +0,0 @@
#!nsh
#
# @name ZMR250 Racer
#
# @type Quadrotor x
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
set MIXER zmr250
set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 2.0
param set MC_ROLLRATE_P 0.05
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_D 0.0015
param set MC_ROLL_TC 0.18
param set MC_PITCH_P 2.0
param set MC_PITCHRATE_P 0.05
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.0015
param set MC_PITCH_TC 0.18
param set MC_YAW_P 1.0
param set MC_YAWRATE_P 0.15
param set MC_YAWRATE_I 0.2
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_ACRO_R_MAX 1080.0
param set MC_ACRO_P_MAX 1080.0
param set MC_ACRO_Y_MAX 1080.0
param set MC_TPA_BREAK_P 0.5
param set MC_TPA_BREAK_D 0.7
param set MC_TPA_RATE_P 0.5
param set MC_TPA_RATE_D 0.5
param set PWM_MIN 1075
param set PWM_RATE 400
param set PWM_DISARMED 900
param set FAILSAFE 100
# param set NAV_RCL_ACT 6 # Lockdown
param set CBRK_IO_SAFETY 22027
fi

View File

@ -1,41 +0,0 @@
#!nsh
#
# @name NanoMind 110 Quad
#
# @type Quadrotor x
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Henry Zhang <zhanghui629@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.19
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.0055
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0055
param set MC_YAW_P 4.0
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set BAT_N_CELLS 1
param set PWM_DISARMED 0
param set PWM_MIN 500
param set PWM_MAX 2200
fi

View File

@ -1,50 +0,0 @@
#!nsh
#
# @name Crazyflie 2.0
#
# @board px4fmu-v1 exclude
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @type Quadrotor x
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set COM_RC_IN_MODE 2
param set BAT_N_CELLS 1
param set BAT_CAPACITY 240
param set BAT_SOURCE 1
param set PWM_DISARMED 0
param set PWM_MIN 0
param set PWM_MAX 255
param set SYS_COMPANION 20
param set MC_PITCHRATE_D 0.0015
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_P 0.045
param set MC_PITCH_P 6.5
param set MC_ROLLRATE_D 0.0015
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_P 0.045
param set MC_ROLL_P 6.5
param set MC_YAW_P 3.0
param set CBRK_SUPPLY_CHK 894281
param set CBRK_USB_CHK 197848
fi
set PWM_MIN none
set PWM_MAX none
set PWM_DISARMED none
# Will run the motors at 328.125 kHz (recommended)
set PWM_RATE 3921

View File

@ -4,15 +4,6 @@
#
# @type Rover
#
# @output MAIN1 pass-through of control group 0, channel 0
# @output MAIN2 pass-through of control group 0, channel 1
# @output MAIN3 pass-through of control group 0, channel 2
# @output MAIN4 pass-through of control group 0, channel 3
# @output MAIN5 pass-through of control group 0, channel 4
# @output MAIN6 pass-through of control group 0, channel 5
# @output MAIN7 pass-through of control group 0, channel 6
# @output MAIN8 pass-through of control group 0, channel 7
#
sh /etc/init.d/rc.axialracing_ax10_defaults

View File

@ -4,18 +4,6 @@
#
# @type Quadrotor +
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Anton Babushkin <anton@px4.io>
#

View File

@ -4,13 +4,6 @@
#
# @type Hexarotor x
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel

View File

@ -4,13 +4,6 @@
#
# @type Hexarotor +
#
# @output MAIN1 motor1
# @output MAIN2 motor2
# @output MAIN3 motor3
# @output MAIN4 motor4
# @output MAIN5 motor5
# @output MAIN6 motor6
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel

View File

@ -4,15 +4,6 @@
#
# @type Octorotor x
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel

View File

@ -4,15 +4,6 @@
#
# @type Octorotor +
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel

View File

@ -4,7 +4,7 @@
# att & pos estimator, rover steering control
#
ekf2 start
ekf_att_pos_estimator start
# disabled the start of steering control app due to use of offboard mode only
# rover_steering_control start

View File

@ -4,22 +4,24 @@ set VEHICLE_TYPE rover
# This section can be enabled once tuning parameters for this particular
# rover model are known. It allows to configure default gains via the GUI
if [ $AUTOCNF == yes ]
then
# PWM default value for "disarmed" mode
# this centers the steering and throttle, which means no motion
# for a rover
param set PWM_DISARMED 1500
# PWM range
param set PWM_MIN 1200
param set PWM_MAX 1800
fi
#if [ $AUTOCNF == yes ]
#then
# # param set MC_ROLL_P 7.0
#fi
# PWM Hz - 50 Hz is the normal rate in RC cars, higher rates
# may damage analog servos.
set PWM_RATE 50
# PWM default value for "disarmed" mode
# this centers the steering and throttle, which means no motion
# for a rover
set PWM_DISARMED 1500
# PWM range
set PWM_MIN 1200
set PWM_MAX 1800
# Enable servo output on pins 3 and 4 (steering and thrust)
# but also include 1+2 as they form together one output group
# and need to be set together.

View File

@ -6,7 +6,7 @@
#
# Start the attitude and position estimator
#
ekf2 start
ekf_att_pos_estimator start
#
# Start attitude controller
@ -18,3 +18,7 @@ fw_pos_control_l1 start
# Start Land Detector
#
land_detector start fixedwing
#
# Misc apps
#

View File

@ -11,15 +11,18 @@ then
param set RTL_DESCEND_ALT 100
param set RTL_LAND_DELAY -1
# FW uses L1 distance for acceptance radius
# set a smaller NAV_ACC_RAD for vertical acceptance distance
param set NAV_ACC_RAD 10
param set NAV_ACC_RAD 50
param set MIS_LTRMIN_ALT 25
param set MIS_TAKEOFF_ALT 25
param set PE_VELNE_NOISE 0.3
param set PE_VELD_NOISE 0.35
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.0
fi
# This is the gimbal pass mixer
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000

View File

@ -2,12 +2,6 @@
#
# Script to configure control interface
#
#
# NOTE: environment variable references:
# If the dollar sign ('$') is followed by a left bracket ('{') then the
# variable name is terminated with the right bracket character ('}').
# Otherwise, the variable name goes to the end of the argument.
#
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
@ -19,21 +13,21 @@ then
if [ $MIXER_AUX == none -a $USE_IO == yes ]
then
set MIXER_AUX ${MIXER}
set MIXER_AUX $MIXER.aux
fi
# Use the mixer file from the SD-card if it exists
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix ]
if [ -f $SDCARD_MIXERS_PATH/$MIXER.main.mix ]
then
set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.main.mix
# Try out the old convention, for backward compatibility
else
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.mix ]
if [ -f $SDCARD_MIXERS_PATH/$MIXER.mix ]
then
set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.mix
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.mix
else
set MIXER_FILE /etc/mixers/${MIXER}.main.mix
set MIXER_FILE /etc/mixers/$MIXER.main.mix
fi
fi
@ -49,27 +43,22 @@ then
set OUTPUT_DEV /dev/uavcan/esc
fi
if [ $OUTPUT_MODE == tap_esc ]
if mixer load $OUTPUT_DEV $MIXER_FILE
then
set OUTPUT_DEV /dev/tap_esc
fi
if mixer load ${OUTPUT_DEV} ${MIXER_FILE}
then
echo "INFO [init] Mixer: ${MIXER_FILE} on ${OUTPUT_DEV}"
echo "INFO [init] Mixer: $MIXER_FILE on $OUTPUT_DEV"
else
echo "ERROR [init] Failed loading mixer: ${MIXER_FILE}"
echo "ERROR [init] Failed loading mixer: ${MIXER_FILE}" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
echo "ERROR [init] Error loading mixer: $MIXER_FILE"
echo "ERROR:[init] Could not load mixer: $MIXER_FILE" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
unset MIXER_FILE
else
if [ $MIXER != skip ]
then
echo "ERROR [init] Mixer undefined"
echo "ERROR [init] Mixer undefined" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
echo "ERROR [init] Mixer not defined"
echo "ERROR [init] Mixer not defined" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@ -82,7 +71,7 @@ then
#
if [ $PWM_RATE != none ]
then
pwm rate -c ${PWM_OUT} -r ${PWM_RATE}
pwm rate -c $PWM_OUT -r $PWM_RATE
fi
#
@ -90,21 +79,21 @@ then
#
if [ $PWM_DISARMED != none ]
then
pwm disarmed -c ${PWM_OUT} -p ${PWM_DISARMED}
pwm disarmed -c $PWM_OUT -p $PWM_DISARMED
fi
if [ $PWM_MIN != none ]
then
pwm min -c ${PWM_OUT} -p ${PWM_MIN}
pwm min -c $PWM_OUT -p $PWM_MIN
fi
if [ $PWM_MAX != none ]
then
pwm max -c ${PWM_OUT} -p ${PWM_MAX}
pwm max -c $PWM_OUT -p $PWM_MAX
fi
fi
if [ $FAILSAFE != none ]
then
pwm failsafe -d ${OUTPUT_DEV} ${FAILSAFE}
pwm failsafe -d $OUTPUT_DEV $FAILSAFE
fi
fi
@ -117,22 +106,7 @@ fi
#MindPX has not aux mixer
if ver hwcmp MINDPX_V2
then
set MIXER_AUX none
fi
if ver hwcmp CRAZYFLIE
then
set MIXER_AUX none
fi
if ver hwcmp AEROFC_V1
then
set MIXER_AUX none
fi
if ver hwcmp PX4FMU_V5
then
set MIXER_AUX none
set MIXER_AUX none
fi
if [ $MIXER_AUX != none -a $AUX_MODE != none ]
@ -144,40 +118,29 @@ then
set MIXER_AUX_FILE none
set OUTPUT_AUX_DEV /dev/pwm_output1
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER_AUX}.aux.mix ]
if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix ]
then
set MIXER_AUX_FILE ${SDCARD_MIXERS_PATH}/${MIXER_AUX}.aux.mix
set MIXER_AUX_FILE $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix
else
if [ -f /etc/mixers/${MIXER_AUX}.aux.mix ]
if [ -f /etc/mixers/$MIXER_AUX.aux.mix ]
then
set MIXER_AUX_FILE /etc/mixers/${MIXER_AUX}.aux.mix
set MIXER_AUX_FILE /etc/mixers/$MIXER_AUX.aux.mix
fi
fi
if [ $MIXER_AUX_FILE != none ]
then
if fmu mode_${AUX_MODE}
if fmu mode_$AUX_MODE
then
# Append aux mixer to main device
if [ $OUTPUT_MODE == hil ]
if [ -e $OUTPUT_AUX_DEV ]
then
if mixer append ${OUTPUT_DEV} ${MIXER_AUX_FILE}
if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE
then
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} appended to ${OUTPUT_DEV}"
echo "INFO [init] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
else
echo "ERROR [init] Failed appending mixer: ${MIXER_AUX_FILE}"
echo "ERROR [init] Failed appending mixer: ${MIXER_AUX_FILE}" >> $LOG_FILE
fi
fi
if [ -e $OUTPUT_AUX_DEV -a $OUTPUT_MODE != hil ]
then
if mixer load ${OUTPUT_AUX_DEV} ${MIXER_AUX_FILE}
then
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} on ${OUTPUT_AUX_DEV}"
else
echo "ERROR [init] Failed loading mixer: ${MIXER_AUX_FILE}"
echo "ERROR [init] Failed loading mixer: ${MIXER_AUX_FILE}" >> $LOG_FILE
echo "ERROR [init] Error loading mixer: $MIXER_AUX_FILE"
echo "ERROR [init] Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
fi
else
set PWM_AUX_OUT none
@ -185,7 +148,7 @@ then
fi
else
echo "ERROR: Could not start: fmu mode_pwm" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
tone_alarm $TUNE_ERR
set PWM_AUX_OUT none
set FAILSAFE_AUX none
fi
@ -198,16 +161,16 @@ then
#
if [ $PWM_AUX_RATE != none ]
then
pwm rate -e -c ${PWM_AUX_OUT} -r ${PWM_AUX_RATE} -d ${OUTPUT_AUX_DEV}
pwm rate -c $PWM_AUX_OUT -r $PWM_AUX_RATE -d $OUTPUT_AUX_DEV
fi
if [ $PWM_AUX_MIN != none ]
then
pwm min -e -c ${PWM_AUX_OUT} -p ${PWM_AUX_MIN} -d ${OUTPUT_AUX_DEV}
pwm min -c $PWM_AUX_OUT -p $PWM_AUX_MIN -d $OUTPUT_AUX_DEV
fi
if [ $PWM_AUX_MAX != none ]
then
pwm max -e -c ${PWM_AUX_OUT} -p ${PWM_AUX_MAX} -d ${OUTPUT_AUX_DEV}
pwm max -c $PWM_AUX_OUT -p $PWM_AUX_MAX -d $OUTPUT_AUX_DEV
fi
fi
@ -225,12 +188,12 @@ then
#
if [ $PWM_AUX_DISARMED != none -a $PWM_ACHDIS != none ]
then
pwm disarmed -e -c ${PWM_ACHDIS} -p ${PWM_AUX_DISARMED} -d ${OUTPUT_AUX_DEV}
pwm disarmed -c $PWM_ACHDIS -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
fi
if [ $FAILSAFE_AUX != none ]
then
pwm failsafe -e -d ${OUTPUT_AUX_DEV} ${FAILSAFE}
pwm failsafe -d $OUTPUT_AUX_DEV $FAILSAFE
fi
fi

View File

@ -16,6 +16,6 @@ then
set PX4IO_LIMIT 200
fi
if px4io limit ${PX4IO_LIMIT}
if px4io limit $PX4IO_LIMIT
then
fi

View File

@ -8,25 +8,18 @@
#---------------------------------------
# Estimator group selction
#
# INAV (deprecated)
# INAV
if param compare SYS_MC_EST_GROUP 0
then
echo "ERROR [init] Estimator INAV deprecated. Using LPE"
param set SYS_MC_EST_GROUP 1
param save
attitude_estimator_q start
position_estimator_inav start
fi
# LPE
if param compare SYS_MC_EST_GROUP 1
then
# Try to start LPE. If it fails, start EKF2 as a default
# Unfortunately we do not build it on px4fmu-v2 due to a limited flash.
if attitude_estimator_q start
then
local_position_estimator start
else
ekf2 start
fi
attitude_estimator_q start
local_position_estimator start
fi
# EKF
@ -36,9 +29,19 @@ then
fi
#---------------------------------------
mc_att_control start
if mc_att_control start
then
else
# try the multiplatform version
mc_att_control_m start
fi
mc_pos_control start
if mc_pos_control start
then
else
# try the multiplatform version
mc_pos_control_m start
fi
#
# Start Land Detector

View File

@ -4,17 +4,46 @@ set VEHICLE_TYPE mc
if [ $AUTOCNF == yes ]
then
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.35
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.25
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set PWM_DISARMED 900
param set PWM_MIN 1075
param set PWM_MAX 1950
param set PWM_RATE 400
param set RTL_LAND_DELAY 0
fi
# set environment variables (!= parameters)
set PWM_RATE 400
# tell the mixer to use parameters for these instead
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
# This is the gimbal pass mixer
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1000
then
param set PWM_MIN 1075
fi
if param compare PWM_MAX 2000
then
param set PWM_MAX 1950
fi
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
fi

View File

@ -8,85 +8,24 @@ then
if ms5611 start
then
fi
else
if ver hwcmp AEROFC_V1
# Configure all I2C buses to 100 KHz as they
# are all external or slow
fmu i2c 1 100000
fmu i2c 2 100000
if ms5611 -s start
then
# Aero FC uses separate driver
else
if ver hwcmp CRAZYFLIE
then
# Crazyflie uses separate driver
else
# Configure all I2C buses to 100 KHz as they
# are all external or slow
fmu i2c 1 100000
fmu i2c 2 100000
fi
if ver hwcmp PX4FMU_V4
then
# We know there are sketchy boards out there
# as chinese companies produce Pixracers without
# fully understanding the critical parts of the
# schematic and BOM, leading to sensor brownouts
# on boot. Original Pixracers following the
# open hardware design do not require this.
fmu sensor_reset 50
fi
# External SPI
if ms5611 -S start
then
fi
# Internal SPI
if ms5611 -s start
then
fi
# Blacksheep telemetry
if bst start
then
fi
fi
fi
if ver hwcmp AEROFC_V1
then
# Aero FC uses separate driver
else
if adc start
# Blacksheep telemetry
if bst start
then
fi
fi
if ver hwcmp AUAV_X21
if adc start
then
# I2C bus
if hmc5883 -C -T start
then
fi
# I2C bus
if lis3mdl start
then
fi
# Internal SPI bus ICM-20602-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20602 start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
fi
if ver hwcmp PX4FMU_V2
@ -106,30 +45,16 @@ then
then
fi
# Internal SPI bus ICM-20608-G
if mpu6000 -T 20608 start
then
fi
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
if mpu6000 -X -R 4 start
then
set BOARD_FMUV3 true
else
# Check for Pixhawk 2.1 board
if mpu9250 -S -R 4 start
then
set BOARD_FMUV3 true
else
set BOARD_FMUV3 false
fi
set BOARD_FMUV3 false
fi
if [ $BOARD_FMUV3 == true ]
then
# sensor heating is available, but we disable it for now
param set SENS_EN_THERMAL 0
# external L3GD20H is rotated 180 degrees yaw
if l3gd20 -X -R 4 start
then
@ -143,10 +68,6 @@ then
# internal MPU6000 is rotated 180 deg roll, 270 deg yaw
if mpu6000 -R 14 start
then
else
if mpu9250 -R 14 start
then
fi
fi
if hmc5883 -C -T -S -R 8 start
@ -163,10 +84,6 @@ then
then
fi
if mpu9250 start
then
fi
if l3gd20 start
then
fi
@ -198,48 +115,10 @@ then
then
fi
# Internal SPI bus ICM-20602-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20602 start
then
fi
# Start either MPU9250 or BMI160. They are both connected to the same SPI bus and use the same
# chip select pin. There are different boards with either one of them and the WHO_AM_I register
# will prevent the incorrect driver from a successful initialization.
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
# Internal SPI bus BMI160
if bmi160 start
then
fi
# Start either ICM2060X or BMI055. They are both connected to the same SPI bus and use the same
# chip select pin. There are different boards with either one of them and the WHO_AM_I register
# will prevent the incorrect driver from a successful initialization.
# Internal SPI bus BMI055_ACC
if bmi055 -A start
then
fi
# Internal SPI bus BMI055_GYR
if bmi055 -G start
then
fi
# expansion i2c used for BMM150 rotated by 90deg
if bmm150 -R 2 start
then
fi
# expansion i2c used for BMP280
if bmp280 -I start
then
fi
fi
if ver hwcmp PX4FMU_V1
@ -277,139 +156,26 @@ fi
if ver hwcmp MINDPX_V2
then
if mpu6500 start
then
fi
if lsm303d start
then
fi
if l3gd20 start
then
fi
# External I2C bus
if hmc5883 -C -T -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 12 start
if lis3mdl -R 2 start
then
fi
if mpu9250 -s -R 8 start
then
fi
if lsm303d -R 10 start
then
fi
if l3gd20 -R 14 start
then
fi
fi
if ver hwcmp CRAZYFLIE
then
# Onboard I2C
if mpu9250 -R 12 start
then
fi
# I2C bypass of mpu
if lps25h start
then
fi
fi
if ver hwcmp AEROFC_V1
then
if ms5611 -T 0 start
then
fi
if mpu9250 -s -R 14 start
then
fi
# Possible external compasses
if hmc5883 -X start
then
fi
if ist8310 -C -b 1 -R 4 start
then
fi
if aerofc_adc start
then
fi
if ll40ls start i2c
then
fi
fi
if ver hwcmp PX4FMU_V4PRO
then
# Internal SPI bus ICM-20608-G
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus ICM-20602
if mpu6000 -R 2 -T 20602 start
then
fi
# Internal SPI bus mpu9250
if mpu9250 -R 2 start
then
fi
# Internal SPI bus
if lis3mdl -R 0 start
then
fi
# Possible external compasses
if hmc5883 -C -T -X start
then
fi
fi
if ver hwcmp PX4FMU_V5
then
# Internal SPI bus ICM-20602
if mpu6000 -R 8 -s -T 20602 start
then
fi
# Internal SPI bus ICM-20689
if mpu6000 -R 8 -z -T 20689 start
then
fi
# Internal SPI bus BMI055 accel
if bmi055 -A -R 10 start
then
fi
# Internal SPI bus BMI055 gyro
if bmi055 -G -R 10 start
then
fi
# Possible external compasses
if hmc5883 -C -T -X start
then
fi
# Possible external airspeed sensor
if meas_airspeed start -b 2
then
fi
fi
if ver hwcmp AEROCORE2
then
l3gd20 -R 12 start
lsm303d start
fi
if meas_airspeed start
@ -424,6 +190,10 @@ else
fi
fi
if sf10a start
then
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
if sensors start

View File

@ -0,0 +1,29 @@
#!nsh
#
# UAVCAN initialization script.
#
#
# Starting stuff according to UAVCAN_ENABLE value
#
if param greater UAVCAN_ENABLE 0
then
if uavcan start
then
echo "[i] UAVCAN started"
else
echo "[i] ERROR: Could not start UAVCAN"
tone_alarm $TUNE_ERR
fi
fi
if param greater UAVCAN_ENABLE 1
then
if uavcan start fw
then
echo "[i] UAVCAN servers started"
else
echo "[i] ERROR: Could not start UAVCAN servers"
tone_alarm $TUNE_ERR
fi
fi

View File

@ -0,0 +1,9 @@
#!nsh
#
# USB MAVLink start
#
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
# Exit shell to make it available to MAVLink
exit

View File

@ -9,25 +9,18 @@
#---------------------------------------
# Estimator group selction
#
# INAV (deprecated)
# INAV
if param compare SYS_MC_EST_GROUP 0
then
echo "ERROR [init] Estimator INAV deprecated. Using LPE"
param set SYS_MC_EST_GROUP 1
param save
attitude_estimator_q start
position_estimator_inav start
fi
# LPE
if param compare SYS_MC_EST_GROUP 1
then
# Try to start LPE. If it fails, start EKF2 as a default
# Unfortunately we do not build it on px4fmu-v2 duo to a limited flash.
if attitude_estimator_q start
then
local_position_estimator start
else
ekf2 start
fi
attitude_estimator_q start
local_position_estimator start
fi
# EKF

View File

@ -8,13 +8,19 @@ then
param set MC_PITCH_P 6.0
param set MC_YAW_P 4
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.3
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.25
param set PE_ABIAS_PNOISE 0.0001
#
# Default parameters for mission and position handling
#
param set NAV_ACC_RAD 3
param set MPC_TKO_SPEED 1.0
param set MPC_LAND_SPEED 0.7
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_MAX 1.5
param set MPC_XY_VEL_MAX 4.0
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2.0
@ -23,3 +29,21 @@ fi
# set environment variables (!= parameters)
set PWM_RATE 400
# tell the mixer to use parameters for these instead
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1000
then
param set PWM_MIN 1075
fi
if param compare PWM_MAX 2000
then
param set PWM_MAX 1950
fi
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
fi

View File

@ -1,49 +1,14 @@
#!nsh
# Un comment and use set +e to ignore and set -e to enable 'exit on error control'
#set +e
# Un comment the line below to help debug scripts by printing a trace of the script commands
#set -x
#
# PX4FMU startup script.
#
# NOTE: environment variable references:
# If the dollar sign ('$') is followed by a left bracket ('{') then the
# variable name is terminated with the right bracket character ('}').
# Otherwise, the variable name goes to the end of the argument.
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
#
#
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
#
# UART mapping on FMUv1/2/3/4:
#
# UART1 /dev/ttyS0 IO debug
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4
# UART7 CONSOLE
# UART8 SERIAL4
#
#
# UART mapping on FMUv5:
#
# UART1 /dev/ttyS0 GPS
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4 /dev/ttyS3 ?
# USART6 /dev/ttyS4 TELEM3 (flow control)
# UART7 /dev/ttyS5 ?
# UART8 /dev/ttyS6 CONSOLE
#
# Mount the procfs.
#
mount -t procfs /proc
#
# Start CDC/ACM serial driver
#
if sercon
then
fi
sercon
#
# Default to auto-start mode.
@ -59,19 +24,8 @@ set LOG_FILE /fs/microsd/bootlog.txt
# REBOOTWORK this needs to start after the flight control loop
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "[i] microSD mounted: /fs/microsd"
if hardfault_log check
then
tone_alarm error
if hardfault_log commit
then
hardfault_log reset
tone_alarm stop
fi
else
# Start playing the startup tune
tone_alarm start
fi
# Start playing the startup tune
tone_alarm start
else
tone_alarm MBAGP
if mkfatfs /dev/mmcsd0
@ -96,7 +50,7 @@ fi
set FRC /fs/microsd/etc/rc.txt
if [ -f $FRC ]
then
echo "INFO [init] Executing script: ${FRC}"
echo "INFO [init] Executing script: $FRC"
sh $FRC
set MODE custom
fi
@ -150,21 +104,11 @@ then
#
if param compare SYS_AUTOCONFIG 1
then
# Wipe out params except RC* and total flight time
param reset_nostart RC* LND_FLIGHT_T_*
# Wipe out params except RC*
param reset_nostart RC*
set AUTOCNF yes
else
set AUTOCNF no
#
# Release 1.4.0 transitional support:
# set to old default if unconfigured.
# this preserves the previous behaviour
#
if param compare BAT_N_CELLS 0
then
param set BAT_N_CELLS 3
fi
fi
#
@ -176,27 +120,25 @@ then
set MIXER_AUX none
set OUTPUT_MODE none
set PWM_OUT none
set PWM_RATE p:PWM_RATE
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
set PWM_RATE none
set PWM_DISARMED none
set PWM_MIN none
set PWM_MAX none
set PWM_AUX_OUT none
set PWM_AUX_RATE none
set PWM_ACHDIS none
set PWM_AUX_DISARMED p:PWM_AUX_DISARMED
set PWM_AUX_MIN p:PWM_AUX_MIN
set PWM_AUX_MAX p:PWM_AUX_MAX
set PWM_AUX_DISARMED none
set PWM_AUX_MIN none
set PWM_AUX_MAX none
set FAILSAFE_AUX none
set MK_MODE none
set FMU_MODE pwm
set AUX_MODE pwm
set MAVLINK_F default
set MAVLINK_COMPANION_DEVICE /dev/ttyS2
set EXIT_ON_END no
set MAV_TYPE none
set FAILSAFE none
set USE_IO yes
set LOGGER_BUF 16
#
# Set USE_IO flag
@ -208,51 +150,22 @@ then
set USE_IO no
fi
if ver hwcmp PX4FMU_V5
then
set USE_IO no
set MAVLINK_COMPANION_DEVICE /dev/ttyS3
fi
if ver hwcmp MINDPX_V2
then
set USE_IO no
fi
if ver hwcmp CRAZYFLIE
then
set USE_IO no
if param compare SYS_AUTOSTART 0
then
param set SYS_AUTOSTART 4900
set AUTOCNF yes
fi
fi
if ver hwcmp AEROFC_V1
then
set USE_IO no
fi
if ver hwcmp AEROCORE2
then
set USE_IO no
fi
else
set USE_IO no
fi
if ver hwcmp AEROFC_V1
# should set to 0.8 for mindpx-v2 borad.
if param compare INAV_LIDAR_ERR 0.5
then
if param compare SYS_AUTOSTART 0
if ver hwcmp MINDPX_V2
then
set AUTOCNF yes
param set INAV_LIDAR_ERR 0.8
param save
fi
# We don't allow changing AUTOSTART as it doesn't work in
# other configurations
param set SYS_AUTOSTART 4070
fi
#
@ -260,25 +173,12 @@ then
#
if param compare SYS_AUTOSTART 0
then
ekf2 start
echo "INFO [init] No autostart"
else
sh /etc/init.d/rc.autostart
fi
unset MODE
#
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
# mixer to mount (override the airframe-specific MIXER_AUX setting)
#
if param compare MNT_MODE_IN -1
then
else
if param compare MNT_MODE_OUT 0
then
set MIXER_AUX mount
fi
fi
#
# Wipe incompatible settings for boards not having two outputs
if ver hwcmp PX4FMU_V4
@ -286,23 +186,13 @@ then
set MIXER_AUX none
fi
if ver hwcmp PX4FMU_V5
then
set MIXER_AUX none
fi
if ver hwcmp AEROFC_V1
then
set MIXER_AUX none
fi
#
# Override parameters from user configuration file
#
set FCONFIG /fs/microsd/etc/config.txt
if [ -f $FCONFIG ]
then
echo "Custom: ${FCONFIG}"
echo "INFO [init] Custom: $FCONFIG"
sh $FCONFIG
fi
unset FCONFIG
@ -312,12 +202,8 @@ then
#
if [ $AUTOCNF == yes ]
then
# Disable safety switch by default on Pixracer
if ver hwcmp PX4FMU_V4
then
param set CBRK_IO_SAFETY 22027
fi
param set SYS_AUTOCONFIG 0
param save
fi
unset AUTOCNF
@ -337,7 +223,7 @@ then
if px4io checkcrc ${IO_FILE}
then
echo "[init] PX4IO CRC OK" >> $LOG_FILE
echo "INFO [init] PX4IO CRC OK" >> $LOG_FILE
set IO_PRESENT yes
else
@ -357,28 +243,28 @@ then
if px4io forceupdate 14662 ${IO_FILE}
then
usleep 10000
if px4io checkcrc ${IO_FILE}
usleep 500000
if px4io checkcrc $IO_FILE
then
echo "PX4IO CRC OK after updating" >> $LOG_FILE
echo "INFO [init] PX4IO CRC OK after updating" >> $LOG_FILE
tone_alarm MLL8CDE
set IO_PRESENT yes
else
echo "PX4IO update failed" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
else
echo "PX4IO update failed" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
unset IO_FILE
if [ $IO_PRESENT == no ]
then
echo "PX4IO not found" >> $LOG_FILE
tone_alarm ${TUNE_ERR}
echo "ERROR [init] PX4IO not found" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@ -412,11 +298,6 @@ then
set FMU_MODE gpio_serial
fi
if [ $OUTPUT_MODE == tap_esc ]
then
set FMU_MODE rcin
fi
if [ $HIL == yes ]
then
set OUTPUT_MODE hil
@ -424,36 +305,22 @@ then
then
set FMU_MODE serial
fi
unset HIL
else
unset HIL
gps start
fi
set DATAMAN_OPT ""
if ver hwcmp AEROFC_V1
then
set DATAMAN_OPT -i
fi
if ver hwcmp AEROCORE2
then
set DATAMAN_OPT "-f /fs/mtd_dataman"
fi
# waypoint storage
# REBOOTWORK this needs to start in parallel
if dataman start $DATAMAN_OPT
if dataman start
then
fi
unset DATAMAN_OPT
#
# Sensors System (start before Commander so Preflight checks are properly run)
#
if [ $HIL == yes ]
then
sensors start -hil
else
sh /etc/init.d/rc.sensors
fi
unset HIL
sh /etc/init.d/rc.sensors
# Needs to be this early for in-air-restarts
if [ $OUTPUT_MODE == hil ]
@ -463,10 +330,6 @@ then
commander start
fi
if send_event start_listening
then
fi
#
# Start CPU load monitor
#
@ -485,31 +348,6 @@ then
set OUTPUT_MODE uavcan_esc
fi
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
then
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
fi
if param greater TRIG_MODE 0
then
# We ONLY support trigger on pins 5 and 6 when simultanously using AUX for actuator output
if param compare TRIG_PINS 56
then
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
else
set FMU_MODE none
set AUX_MODE none
fi
camera_trigger start
param set CAM_FBACK_MODE 1
camera_feedback start
fi
# If OUTPUT_MODE == none then something is wrong with setup and we shouldn't try to enable output
if [ $OUTPUT_MODE != none ]
then
@ -517,8 +355,8 @@ then
then
if param compare UAVCAN_ENABLE 0
then
echo "OVERRIDING UAVCAN_ENABLE = 3" >> $LOG_FILE
param set UAVCAN_ENABLE 3
echo "INFO [init] OVERRIDING UAVCAN_ENABLE = 1" >> $LOG_FILE
param set UAVCAN_ENABLE 1
fi
fi
@ -528,7 +366,7 @@ then
then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
echo "INFO [init] PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@ -538,7 +376,7 @@ then
if fmu mode_$FMU_MODE
then
else
echo "FMU start failed" >> $LOG_FILE
echo "ERR [init] FMU start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@ -570,7 +408,7 @@ then
if mkblctrl $MKBLCTRL_ARG
then
else
echo "MK start failed" >> $LOG_FILE
echo "ERROR [init] MK start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
unset MKBLCTRL_ARG
@ -579,9 +417,10 @@ then
if [ $OUTPUT_MODE == hil ]
then
if pwm_out_sim mode_pwm16
if pwm_out_sim mode_port2_pwm8
then
else
echo "ERROR [init] PWM SIM start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@ -597,17 +436,17 @@ then
then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
echo "ERROR [init] PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
else
if [ $OUTPUT_MODE != fmu -a $OUTPUT_MODE != ardrone ]
then
if fmu mode_${FMU_MODE}
if fmu mode_$FMU_MODE
then
else
echo "FMU mode_${FMU_MODE} start failed" >> $LOG_FILE
echo "ERROR [init] FMU mode_$FMU_MODE start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@ -645,25 +484,10 @@ then
# Start MAVLink on Wifi (ESP8266 port)
mavlink start -r 20000 -m config -b 921600 -d /dev/ttyS0
fi
if ver hwcmp AEROFC_V1
then
set MAVLINK_F "-r 1200 -d /dev/ttyS4"
fi
fi
if ver hwcmp CRAZYFLIE
then
# Avoid using either of the two available serials
set MAVLINK_F none
fi
fi
if [ "x$MAVLINK_F" == xnone ]
then
else
mavlink start ${MAVLINK_F}
fi
mavlink start $MAVLINK_F
unset MAVLINK_F
#
@ -676,66 +500,47 @@ then
# but this works for now
if param compare SYS_COMPANION 10
then
frsky_telemetry start -d ${MAVLINK_COMPANION_DEVICE}
fi
if param compare SYS_COMPANION 20
then
syslink start
mavlink start -d /dev/bridge0 -b 57600 -m osd -r 40000
frsky_telemetry start -d /dev/ttyS2
fi
if param compare SYS_COMPANION 921600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 921600 -m onboard -r 80000 -x
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 80000 -x
fi
if param compare SYS_COMPANION 57600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 57600 -m onboard -r 5000 -x
fi
if param compare SYS_COMPANION 460800
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 460800 -m onboard -r 5000 -x
mavlink start -d /dev/ttyS2 -b 57600 -m onboard -r 5000 -x
fi
if param compare SYS_COMPANION 157600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 57600 -m osd -r 1000
mavlink start -d /dev/ttyS2 -b 57600 -m osd -r 1000
fi
if param compare SYS_COMPANION 257600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 57600 -m magic -r 5000 -x
fi
if param compare SYS_COMPANION 319200
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 19200 -r 1000
fi
if param compare SYS_COMPANION 338400
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 38400 -r 1000
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
fi
if param compare SYS_COMPANION 357600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 57600 -r 1000
fi
if param compare SYS_COMPANION 3115200
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 115200 -r 1000
fi
if param compare SYS_COMPANION 419200
then
iridiumsbd start -d /dev/ttyS2
mavlink start -d /dev/iridium -b 19200 -m iridium -r 10
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
fi
if param compare SYS_COMPANION 1921600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 921600 -r 20000
mavlink start -d /dev/ttyS2 -b 921600 -r 20000
fi
if param compare SYS_COMPANION 1500000
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 1500000 -m onboard -r 10000 -x
set AUX_MODE pwm4
fi
if param greater TRIG_MODE 0
then
# Get FMU driver out of the way
set MIXER_AUX none
set AUX_MODE none
camera_trigger start
fi
fi
unset MAVLINK_COMPANION_DEVICE
#
# Starting stuff according to UAVCAN_ENABLE value
#
@ -743,10 +548,17 @@ then
then
if uavcan start
then
set LOGGER_BUF 7
uavcan start fw
else
tone_alarm ${TUNE_ERR}
tone_alarm $TUNE_ERR
fi
fi
if param greater UAVCAN_ENABLE 1
then
if uavcan start fw
then
else
tone_alarm $TUNE_ERR
fi
fi
@ -765,46 +577,10 @@ then
fi
fi
# Lidar-Lite on I2C
if param compare SENS_EN_LL40LS 2
# sf0x lidar sensor
if param compare SENS_EN_SF0X 1
then
if ll40ls start i2c
then
fi
fi
# lightware serial lidar sensor
if param compare SENS_EN_SF0X 0
then
else
if sf0x start
then
fi
fi
# lightware i2c lidar sensor
if param compare SENS_EN_SF1XX 0
then
else
if sf1xx start
then
fi
fi
# mb12xx sonar sensor
if param compare SENS_EN_MB12XX 1
then
if mb12xx start
then
fi
fi
# teraranger one tof sensor
if param compare SENS_EN_TRONE 1
then
if trone start
then
fi
sf0x start
fi
if ver hwcmp PX4FMU_V4
@ -812,32 +588,24 @@ then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp MINDPX_V2
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp PX4FMU_V2
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp PX4FMU_V4
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp MINDPX_V2
then
#mindxp also need flow
px4flow start &
fi
if ver hwcmp AEROFC_V1
# Start USB shell if no microSD present, MAVLink else
if [ $LOG_FILE == /dev/null ]
then
# Try to get an USB console
nshterm /dev/ttyACM0 &
else
# Start MAVLink
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
@ -850,50 +618,30 @@ then
then
fi
else
if param compare SYS_LOGGER 0
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
then
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
if param compare SYS_LOGGER 0
then
if sdlog2 start -r 500 -e -b 18 -t
then
fi
else
if sdlog2 start -r 100 -a -b 9 -t
if logger start -r 500
then
fi
fi
else
set LOGGER_ARGS ""
#
# Adjust FMUv5 logging settings
#
if ver hwcmp PX4FMU_V5
if param compare SYS_LOGGER 0
then
set LOGGER_BUF 64
param set SDLOG_MODE 3
if sdlog2 start -r 100 -a -b 9 -t
then
fi
else
if logger start -b 12
then
fi
fi
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if param compare SDLOG_MODE 3
then
set LOGGER_ARGS "-f"
fi
if ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi
if logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
then
fi
unset LOGGER_BUF
unset LOGGER_ARGS
fi
fi
@ -910,6 +658,8 @@ then
#
if [ $VEHICLE_TYPE == fw ]
then
echo "INFO [init] Fixedwing"
if [ $MIXER == none ]
then
# Set default mixer for fixed wing if not defined
@ -922,7 +672,7 @@ then
set MAV_TYPE 1
fi
param set MAV_TYPE ${MAV_TYPE}
param set MAV_TYPE $MAV_TYPE
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
@ -936,9 +686,11 @@ then
#
if [ $VEHICLE_TYPE == mc ]
then
echo "INFO [init] Multicopter"
if [ $MIXER == none ]
then
echo "Mixer undefined"
echo "INFO [init] Mixer undefined"
fi
if [ $MAV_TYPE == none ]
@ -948,7 +700,7 @@ then
then
set MAV_TYPE 2
fi
if [ $MIXER == quad_w -o $MIXER == quad_dc ]
if [ $MIXER == quad_w -o $MIXER == sk450_deadcat ]
then
set MAV_TYPE 2
fi
@ -985,10 +737,10 @@ then
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 2
else
param set MAV_TYPE ${MAV_TYPE}
param set MAV_TYPE $MAV_TYPE
fi
# Load mixer and configure outputs
@ -1003,9 +755,11 @@ then
#
if [ $VEHICLE_TYPE == vtol ]
then
echo "INFO [init] VTOL"
if [ $MIXER == none ]
then
echo "VTOL mixer undefined"
echo "WARN [init] VTOL mixer undefined"
fi
if [ $MAV_TYPE == none ]
@ -1028,10 +782,10 @@ then
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 19
else
param set MAV_TYPE ${MAV_TYPE}
param set MAV_TYPE $MAV_TYPE
fi
# Load mixer and configure outputs
@ -1112,72 +866,23 @@ then
#
if [ $VEHICLE_TYPE == none ]
then
echo "No autostart ID found"
echo "WARN [init] No autostart ID found"
fi
# Start any custom addons
set FEXTRAS /fs/microsd/etc/extras.txt
if [ -f $FEXTRAS ]
then
echo "Addons script: ${FEXTRAS}"
echo "INFO [init] Addons script: $FEXTRAS"
sh $FEXTRAS
fi
unset FEXTRAS
if ver hwcmp CRAZYFLIE
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
# CF2 shouldn't have an sd card
else
if ver hwcmp AEROCORE2
then
# AEROCORE2 shouldn't have an sd card
else
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
# Play SOS
tone_alarm error
fi
fi
fi
#
# Check if we should start a thermal calibration
# TODO move further up and don't start unnecessary services if we are calibrating
#
set TEMP_CALIB_ARGS ""
if param compare SYS_CAL_GYRO 1
then
set TEMP_CALIB_ARGS "${TEMP_CALIB_ARGS} -g"
param set SYS_CAL_GYRO 0
fi
if param compare SYS_CAL_ACCEL 1
then
set TEMP_CALIB_ARGS "${TEMP_CALIB_ARGS} -a"
param set SYS_CAL_ACCEL 0
fi
if param compare SYS_CAL_BARO 1
then
set TEMP_CALIB_ARGS "${TEMP_CALIB_ARGS} -b"
param set SYS_CAL_BARO 0
fi
if [ "x$TEMP_CALIB_ARGS" != "x" ]
then
send_event temperature_calibration ${TEMP_CALIB_ARGS}
fi
unset TEMP_CALIB_ARGS
# vmount to control mounts such as gimbals, disabled by default.
if param compare MNT_MODE_IN -1
then
else
if vmount start
then
fi
# Play SOS
tone_alarm error
fi
# End of autostart
@ -1192,7 +897,7 @@ mavlink boot_complete
if [ $EXIT_ON_END == yes ]
then
echo "NSH exit"
echo "INFO [init] NSH exit"
exit
fi
unset EXIT_ON_END

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More