Compare commits

..

1 Commits

Author SHA1 Message Date
RomanBapst 18a5bb32bc navigator: wrote unit tests for Takeoff navigation mode
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-12 18:39:34 +03:00
1446 changed files with 20954 additions and 113689 deletions
+20 -10
View File
@@ -9,10 +9,11 @@ pipeline {
script {
def build_nodes = [:]
def docker_images = [
armhf: "px4io/px4-dev-armhf:2021-05-04",
arm64: "px4io/px4-dev-aarch64:2021-05-04",
base: "px4io/px4-dev-base-bionic:2021-05-04",
nuttx: "px4io/px4-dev-nuttx-focal:2021-05-04",
armhf: "px4io/px4-dev-armhf:2021-04-29",
arm64: "px4io/px4-dev-aarch64:2021-04-29",
base: "px4io/px4-dev-base-bionic:2021-04-29",
nuttx: "px4io/px4-dev-nuttx-focal:2021-04-29",
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
]
def armhf_builds = [
@@ -47,8 +48,6 @@ pipeline {
"cuav_x7pro_default",
"cubepilot_cubeorange_default",
"cubepilot_cubeyellow_default",
"freefly_can-rtk-gps_canbootloader",
"freefly_can-rtk-gps_default",
"holybro_can-gps-v1_canbootloader",
"holybro_can-gps-v1_default",
"holybro_durandal-v1_default",
@@ -56,7 +55,6 @@ pipeline {
"holybro_pix32v5_default",
"modalai_fc-v1_default",
"modalai_fc-v1_rtps",
"modalai_fc-v2_default",
"mro_ctrl-zero-f7_default",
"mro_ctrl-zero-f7-oem_default",
"mro_ctrl-zero-h7_default",
@@ -105,8 +103,14 @@ pipeline {
archive: true
]
def snapdragon_builds = [
target: ["atlflight_eagle_qurt", "atlflight_eagle_default"],
image: docker_images.snapdragon,
archive: false
]
def docker_builds = [
armhf_builds, base_builds, nuttx_builds_archive
armhf_builds, base_builds, nuttx_builds_archive//, snapdragon_builds
]
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
@@ -126,7 +130,7 @@ pipeline {
// TODO: actually upload artifacts to S3
// stage('S3 Upload') {
// agent {
// docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
// docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
// }
// options {
// skipDefaultCheckout()
@@ -151,13 +155,19 @@ pipeline {
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactDaysToKeepStr: '14'))
timeout(time: 90, unit: 'MINUTES')
timeout(time: 60, unit: 'MINUTES')
}
}
def createBuildNode(Boolean archive, String docker_image, String target) {
return {
// TODO: fix the snapdragon image
bypass_entrypoint = ''
if (docker_image == 'lorenzmeier/px4-dev-snapdragon:2020-04-01') {
bypass_entrypoint = ' --entrypoint=""'
}
node {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
+579 -489
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/cpp
{
"name": "px4-dev-nuttx",
"image": "px4io/px4-dev-nuttx-focal:2021-05-04",
"image": "px4io/px4-dev-nuttx-focal:2021-04-29",
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
+1 -3
View File
@@ -11,7 +11,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
@@ -24,13 +23,12 @@ jobs:
"shellcheck_all",
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
"NO_NINJA_BUILD=1 px4_sitl_default",
"BUILD_MICRORTPS_AGENT=1 px4_sitl_rtps",
"airframe_metadata",
"module_documentation",
"parameters_metadata",
]
container:
image: px4io/px4-dev-nuttx-focal:2021-05-04
image: px4io/px4-dev-nuttx-focal:2021-04-29
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
+1 -2
View File
@@ -11,8 +11,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-clang:2021-05-04
timeout-minutes: 60
container: px4io/px4-dev-clang:2021-04-29
steps:
- uses: actions/checkout@v1
with:
+1 -2
View File
@@ -11,8 +11,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-armhf:2021-05-04
timeout-minutes: 60
container: px4io/px4-dev-armhf:2021-04-29
strategy:
matrix:
config: [
+1 -2
View File
@@ -11,8 +11,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-aarch64:2021-05-04
timeout-minutes: 60
container: px4io/px4-dev-aarch64:2021-04-29
strategy:
matrix:
config: [
-1
View File
@@ -11,7 +11,6 @@ on:
jobs:
build:
runs-on: macos-10.15
timeout-minutes: 60
strategy:
matrix:
config: [
+73 -46
View File
@@ -11,51 +11,78 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-05-04
timeout-minutes: 60
container: px4io/px4-dev-nuttx-focal:2021-04-29
strategy:
matrix:
config: [
airmind_mindpx-v2,
ark_can-flow,
ark_can-gps,
av_x-v1,
bitcraze_crazyflie,
bitcraze_crazyflie21,
cuav_can-gps-v1,
cuav_nora,
cuav_x7pro,
cubepilot_cubeorange,
cubepilot_cubeyellow,
freefly_can-rtk-gps,
holybro_can-gps-v1,
holybro_durandal-v1,
holybro_kakutef7,
holybro_pix32v5,
modalai_fc-v1,
modalai_fc-v2,
mro_ctrl-zero-f7,
mro_ctrl-zero-f7-oem,
mro_ctrl-zero-h7,
mro_ctrl-zero-h7-oem,
mro_pixracerpro,
mro_x21,
mro_x21-777,
nxp_fmuk66-e,
nxp_fmuk66-v3,
nxp_fmurt1062-v1,
nxp_ucans32k146,
omnibus_f4sd,
px4_fmu-v2,
px4_fmu-v3,
px4_fmu-v4,
px4_fmu-v4pro,
px4_fmu-v5,
px4_fmu-v5x,
px4_fmu-v6u,
px4_fmu-v6x,
spracing_h7extreme,
uvify_core
airmind_mindpx-v2_default,
ark_can-flow_canbootloader,
ark_can-flow_debug,
ark_can-flow_default,
av_x-v1_default,
bitcraze_crazyflie21_default,
bitcraze_crazyflie_default,
cuav_can-gps-v1_canbootloader,
cuav_can-gps-v1_debug,
cuav_can-gps-v1_default,
cuav_nora_default,
cuav_x7pro_default,
cubepilot_cubeorange_default,
cubepilot_cubeorange_test,
cubepilot_cubeyellow_default,
cubepilot_cubeyellow_test,
cubepilot_io-v2_default,
holybro_can-gps-v1_canbootloader,
holybro_can-gps-v1_debug,
holybro_can-gps-v1_default,
holybro_durandal-v1_default,
holybro_kakutef7_default,
holybro_pix32v5_default,
modalai_fc-v1_default,
modalai_fc-v1_rtps,
mro_ctrl-zero-f7-oem_default,
mro_ctrl-zero-f7_default,
mro_ctrl-zero-h7-oem_default,
mro_ctrl-zero-h7_default,
mro_pixracerpro_default,
mro_x21-777_default,
mro_x21_default,
nxp_fmuk66-e_default,
nxp_fmuk66-e_rtps,
nxp_fmuk66-e_socketcan,
nxp_fmuk66-v3_default,
nxp_fmuk66-v3_rtps,
nxp_fmuk66-v3_socketcan,
nxp_fmurt1062-v1_default,
nxp_ucans32k146_canbootloader,
nxp_ucans32k146_default,
omnibus_f4sd_default,
px4_fmu-v2_default,
px4_fmu-v2_fixedwing,
px4_fmu-v2_multicopter,
px4_fmu-v2_rover,
px4_fmu-v3_default,
px4_fmu-v4_cannode,
px4_fmu-v4_default,
px4_fmu-v4pro_default,
px4_fmu-v5_ctrlalloc,
px4_fmu-v5_debug,
px4_fmu-v5_default,
px4_fmu-v5_fixedwing,
px4_fmu-v5_multicopter,
px4_fmu-v5_optimized,
px4_fmu-v5_rover,
px4_fmu-v5_rtps,
px4_fmu-v5_stackcheck,
px4_fmu-v5_uavcanv0periph,
px4_fmu-v5_uavcanv1,
px4_fmu-v5x_base_phy_DP83848C,
px4_fmu-v5x_default,
px4_fmu-v6u_default,
px4_fmu-v6x_default,
px4_io-v2_default,
spracing_h7extreme_default,
uvify_core_default
]
steps:
- uses: actions/checkout@v1
@@ -84,8 +111,8 @@ jobs:
ccache -s
ccache -z
- name: make all_variants_${{matrix.config}}
run: make all_variants_${{matrix.config}}
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: make ${{matrix.config}} bloaty_compileunits
run: make ${{matrix.config}} bloaty_compileunits || true
- name: make ${{matrix.config}} bloaty_inlines
@@ -104,7 +131,7 @@ jobs:
run: ccache -s
- name: Upload px4 package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v1
with:
name: px4_package_${{matrix.config}}
path: build/**/*.px4
path: build/${{matrix.config}}/${{matrix.config}}.px4
+1 -3
View File
@@ -11,14 +11,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-05-04
timeout-minutes: 60
container: px4io/px4-dev-nuttx-focal:2021-04-29
strategy:
matrix:
config: [
ark_can-flow_default,
cuav_can-gps-v1_default,
freefly_can-rtk-gps_default,
holybro_can-gps-v1_default,
#nxp_ucans32k146_default,
px4_fmu-v4_cannode
+4 -4
View File
@@ -23,7 +23,7 @@ jobs:
needs: enumerate_targets
strategy:
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
container: px4io/px4-dev-${{ matrix.container }}:2021-05-04
container: px4io/px4-dev-${{ matrix.container }}:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -56,13 +56,13 @@ jobs:
- name: ccache post-run
run: ccache -s
- name: parameter & events metadata
- name: parameter metadata
run: |
make ${{matrix.target}} ver_gen events_json
make ${{matrix.target}} ver_gen
./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV
cd build/${{ matrix.target }}
mkdir _metadata || true
cp parameters.* events/*.xz _metadata
cp parameters.* _metadata
- uses: jakejarvis/s3-sync-action@master
with:
@@ -1,21 +0,0 @@
name: EKF Change Indicator
on: pull_request
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: checkout newest version of branch
run: |
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
git checkout ${GITHUB_HEAD_REF}
- name: main test
run: make tests TESTFILTER=EKF
- name: Check if there is a functional change
run: git diff --exit-code
working-directory: src/modules/ekf2/test/change_indication
@@ -1,29 +0,0 @@
name: EKF Update Change Indicator
on: push
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
env:
GIT_COMMITTER_EMAIL: bot@px4.io
GIT_COMMITTER_NAME: PX4BuildBot
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: main test updates change indication files
run: make tests TESTFILTER=EKF
- name: Check if there exists diff and save result in variable
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
working-directory: src/modules/ekf2/test/change_indication
- name: auto-commit any changes to change indication
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[AUTO COMMIT] update change indication'
commit_user_name: ${GIT_COMMITTER_NAME}
commit_user_email: ${GIT_COMMITTER_EMAIL}
- if: ${{env.CHANGE_INDICATED}}
name: if there is a functional change, fail check
run: exit 1
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2021-05-04
image: px4io/px4-dev-ros-melodic:2021-04-29
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2021-05-04
image: px4io/px4-dev-ros-melodic:2021-04-29
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
+9 -47
View File
@@ -11,7 +11,7 @@ jobs:
airframe:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
container: px4io/px4-dev-base-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -20,24 +20,13 @@ jobs:
- name: airframe metadata
run: |
make airframe_metadata
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
cd build/px4_sitl_default/docs
# TODO: deploy to userguide gitbook
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/docs/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
ls -ls *
# TODO: deploy to userguide gitbook and s3
module:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
container: px4io/px4-dev-base-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -52,7 +41,7 @@ jobs:
parameter:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
container: px4io/px4-dev-base-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -74,36 +63,9 @@ jobs:
SOURCE_DIR: 'build/px4_sitl_default/docs/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
events:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: events metadata
run: |
make extract_events
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
cd build/px4_sitl_default
mkdir _events_full || true
cp events/all_events_full.json.xz _events_full/all_events.json.xz
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/_events_full/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
uorb_graph:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-05-04
container: px4io/px4-dev-nuttx-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -118,7 +80,7 @@ jobs:
micrortps_agent:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
container: px4io/px4-dev-base-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -132,7 +94,7 @@ jobs:
ROS_msgs:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
container: px4io/px4-dev-base-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
@@ -145,7 +107,7 @@ jobs:
ROS2_bridge:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-05-04
container: px4io/px4-dev-base-focal:2021-04-29
steps:
- uses: actions/checkout@v1
with:
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
- name: Install Python3
run: sudo apt-get install python3 python3-setuptools python3-pip -y
- name: Install tools
run: pip3 install --user mypy types-requests flake8
run: pip3 install --user mypy flake8
- name: Check MAVSDK test scripts with mypy
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
- name: Check MAVSDK test scripts with flake8
+5 -7
View File
@@ -11,18 +11,16 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
config:
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer", model: "standard_vtol" } # Australia
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "RelWithDebInfo", model: "standard_vtol" } # Australia
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
container:
image: px4io/px4-dev-simulation-focal:2021-05-04
image: px4io/px4-dev-simulation-focal:2021-04-29
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
-2
View File
@@ -108,5 +108,3 @@ src/systemcmds/topic_listener/listener_generated.cpp
# SITL
dataman
eeprom/
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
+12 -11
View File
@@ -18,6 +18,14 @@
path = src/lib/matrix
url = https://github.com/PX4/PX4-Matrix.git
branch = master
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/PX4-ECL.git
branch = master
[submodule "boards/atlflight/cmake_hexagon"]
path = boards/atlflight/cmake_hexagon
url = https://github.com/PX4/cmake_hexagon.git
branch = px4
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/PX4-GPSDrivers.git
@@ -34,6 +42,9 @@
path = platforms/nuttx/NuttX/apps
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-10.0.0+
[submodule "platforms/qurt/dspal"]
path = platforms/qurt/dspal
url = https://github.com/ATLFlight/dspal.git
[submodule "Tools/flightgear_bridge"]
path = Tools/flightgear_bridge
url = https://github.com/PX4/PX4-FlightGear-Bridge.git
@@ -54,15 +65,5 @@
url = https://github.com/UAVCAN/libcanard.git
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
path = src/drivers/uavcan_v1/legacy_data_types
url = https://github.com/PX4/public_regulated_data_types.git
url = https://github.com/px4/public_regulated_data_types/
branch = legacy
[submodule "src/lib/crypto/monocypher"]
path = src/lib/crypto/monocypher
url = https://github.com/PX4/Monocypher.git
branch = px4
[submodule "src/lib/events/libevents"]
path = src/lib/events/libevents
url = https://github.com/mavlink/libevents.git
[submodule "Tools/simulation-ignition"]
path = Tools/simulation-ignition
url = https://github.com/Auterion/px4-simulation-ignition.git
-45
View File
@@ -6,16 +6,6 @@ CONFIG:
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_default
px4_sitl_asan:
short: px4_sitl (AddressSanitizer)
buildType: AddressSanitizer
settings:
CONFIG: px4_sitl_default
px4_sitl_ubsan:
short: px4_sitl (UndefinedBehaviorSanitizer)
buildType: UndefinedBehaviorSanitizer
settings:
CONFIG: px4_sitl_default
px4_sitl_replay:
short: px4_sitl_replay
buildType: RelWithDebInfo
@@ -61,16 +51,6 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5x_default
px4_fmu-v6x_default:
short: px4_fmu-v6x
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6x_default
px4_fmu-v6x_bootloader:
short: px4_fmu-v6x_bootloader
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6x_bootloader
airmind_mindpx-v2_default:
short: airmind_mindpx-v2
buildType: MinSizeRel
@@ -86,16 +66,6 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: ark_can-flow_canbootloader
ark_can-gps_default:
short: ark_can-gps_default
buildType: MinSizeRel
settings:
CONFIG: ark_can-gps_default
ark_can-gps_canbootloader:
short: ark_can-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: ark_can-gps_canbootloader
av_x-v1_default:
short: av_x-v1
buildType: MinSizeRel
@@ -136,16 +106,6 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: emlid_navio2_default
freefly_can-rtk-gps_default:
short: freefly_can-rtk-gps_default
buildType: MinSizeRel
settings:
CONFIG: freefly_can-rtk-gps_default
freefly_can-rtk-gps_canbootloader:
short: freefly_can-rtk-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: freefly_can-rtk-gps_canbootloader
holybro_can-gps-v1_canbootloader:
short: holybro_can-gps-v1_canbootloader
buildType: MinSizeRel
@@ -166,11 +126,6 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v1_default
modalai_fc-v2_default:
short: modalai_fc-v2
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v2_default
mro_ctrl-zero-f7_default:
short: mro_ctrl-zero-f7
buildType: MinSizeRel
-7
View File
@@ -129,10 +129,6 @@ define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
BRIEF_DOCS "PX4 module paths"
FULL_DOCS "List of paths to all PX4 modules"
)
define_property(GLOBAL PROPERTY PX4_SRC_FILES
BRIEF_DOCS "src files from all PX4 modules & libs"
FULL_DOCS "SRC files from px4_add_{module,library}"
)
#=============================================================================
# configuration
@@ -421,9 +417,6 @@ foreach(module ${config_module_list})
add_subdirectory(src/${module})
endforeach()
# add events lib after modules and libs as it needs to know all source files (PX4_SRC_FILES)
add_subdirectory(src/lib/events EXCLUDE_FROM_ALL)
# must be the last module before firmware
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
target_link_libraries(parameters_interface INTERFACE parameters)
Vendored
+14 -14
View File
@@ -15,7 +15,7 @@ pipeline {
// stage('Catkin build on ROS workspace') {
// agent {
// docker {
// image 'px4io/px4-dev-ros-melodic:2021-05-04'
// image 'px4io/px4-dev-ros-melodic:2021-04-29'
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
// }
// }
@@ -56,7 +56,7 @@ pipeline {
stage('Colcon build on ROS2 workspace') {
agent {
docker {
image 'px4io/px4-dev-ros2-foxy:2021-05-04'
image 'px4io/px4-dev-ros2-foxy:2021-04-29'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
@@ -85,7 +85,7 @@ pipeline {
stage('Airframe') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh 'make distclean'
@@ -105,7 +105,7 @@ pipeline {
stage('Parameter') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh 'make distclean'
@@ -125,7 +125,7 @@ pipeline {
stage('Module') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh 'make distclean'
@@ -146,7 +146,7 @@ pipeline {
stage('uORB graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2021-05-04'
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -176,7 +176,7 @@ pipeline {
stage('Userguide') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh('export')
@@ -206,7 +206,7 @@ pipeline {
stage('QGroundControl') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh('export')
@@ -234,7 +234,7 @@ pipeline {
stage('microRTPS agent') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh('export')
@@ -264,7 +264,7 @@ pipeline {
stage('PX4 ROS msgs') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh('export')
@@ -293,7 +293,7 @@ pipeline {
stage('PX4 ROS2 bridge') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh('export')
@@ -336,7 +336,7 @@ pipeline {
stage('S3') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
docker { image 'px4io/px4-dev-base-focal:2021-04-29' }
}
steps {
sh('export')
@@ -374,7 +374,7 @@ pipeline {
GIT_COMMITTER_NAME = "PX4BuildBot"
}
options {
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
timeout(time: 90, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '20'))
timeout(time: 60, unit: 'MINUTES')
}
}
+25 -23
View File
@@ -63,7 +63,7 @@ all: px4_sitl_default
space := $(subst ,, )
define make_list
$(shell [ -f .github/workflows/compile_${1}.yml ] && cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
endef
# Parsing
@@ -165,16 +165,10 @@ ifdef PYTHON_EXECUTABLE
CMAKE_ARGS += -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
endif
# Check if the microRTPS agent is to be built
ifdef BUILD_MICRORTPS_AGENT
CMAKE_ARGS += -DBUILD_MICRORTPS_AGENT=ON
endif
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
$(eval CMAKE_ARGS += -DCONFIG=$(1))
@$(eval BUILD_DIR = "$(SRC_DIR)/build/$(1)")
@# check if the desired cmake configuration matches the cache then CMAKE_CACHE_CHECK stays empty
@$(call cmake-cache-check)
@@ -214,7 +208,7 @@ define colorecho
endef
# Get a list of all config targets boards/*/*.cmake
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.cmake' -print | sed -e 's|boards\/||' | sed -e 's|\.cmake||' | sed -e 's|\/|_|g' | sort)
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's|boards\/||' | sed -e 's|\.cmake||' | sed -e 's|\/|_|g' | sort)
# ADD CONFIGS HERE
# --------------------------------------------------------------------
@@ -222,12 +216,16 @@ ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.cmake
# All targets.
$(ALL_CONFIG_TARGETS):
@$(call cmake-build,$@$(BUILD_DIR_SUFFIX))
@$(eval PX4_CONFIG = $@)
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
# Filter for only default targets to allow omiting the "_default" postfix
CONFIG_TARGETS_DEFAULT := $(patsubst %_default,%,$(filter %_default,$(ALL_CONFIG_TARGETS)))
$(CONFIG_TARGETS_DEFAULT):
@$(call cmake-build,$@_default$(BUILD_DIR_SUFFIX))
@$(eval PX4_CONFIG = $@_default)
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
all_config_targets: $(ALL_CONFIG_TARGETS)
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
@@ -240,6 +238,16 @@ endef
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all px4_sitl_default all_config_targets all_default_targets
# Multi- config targets.
eagle_default: atlflight_eagle_default atlflight_eagle_qurt
eagle_rtps: atlflight_eagle_rtps atlflight_eagle_qurt-rtps
excelsior_default: atlflight_excelsior_default atlflight_excelsior_qurt
excelsior_rtps: atlflight_excelsior_rtps atlflight_excelsior_qurt-rtps
.PHONY: eagle_default eagle_rtps
.PHONY: excelsior_default excelsior_rtps
# Other targets
# --------------------------------------------------------------------
@@ -266,6 +274,7 @@ misc_qgc_extra_firmware: \
check_bitcraze_crazyflie_default \
check_bitcraze_crazyflie21_default \
check_airmind_mindpx-v2_default \
check_px4_fmu-v2_lpe \
sizes
# builds with RTPS
@@ -293,11 +302,6 @@ check_%:
@$(MAKE) --no-print-directory $(subst check_,,$@)
@echo
all_variants_%:
@echo 'Building all $(subst all_variants_,,$@) variants:' $(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS))
@echo
$(foreach a,$(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS)), $(call cmake-build,$(a)$(BUILD_DIR_SUFFIX)))
uorb_graphs:
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib --file Tools/uorb_graph/graph_full
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
@@ -311,21 +315,18 @@ coverity_scan: px4_sitl_default
# Documentation
# --------------------------------------------------------------------
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata doxygen
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
parameters_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
airframe_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes ver_gen
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes
module_documentation:
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
extract_events:
@$(MAKE) --no-print-directory px4_sitl_default metadata_extract_events ver_gen
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
px4_metadata: parameters_metadata airframe_metadata module_documentation
doxygen:
@mkdir -p "$(SRC_DIR)"/build/doxygen
@@ -352,6 +353,7 @@ format:
.PHONY: rostest python_coverage
tests:
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
$(eval ARGS += test_results)
$(eval ASAN_OPTIONS += color=always:check_initialization_order=1:detect_stack_use_after_return=1)
@@ -466,7 +468,7 @@ validate_module_configs:
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
clean:
@[ ! -d "$(SRC_DIR)/build" ] || find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
@find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
@git submodule foreach git clean -dX --force # some submodules generate build artifacts in source
submodulesclean:
@@ -502,7 +504,7 @@ help:
@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)))$$' -e '_default$$' -e '^(Makefile)'
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_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."
+2 -2
View File
@@ -8,7 +8,7 @@
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.
PX4 is highly portable, OS-independent and supports Linux, NuttX and QuRT out of the box.
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/PX4-Autopilot/blob/master/LICENSE))
* [Supported airframes](https://docs.px4.io/master/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
@@ -110,7 +110,7 @@ This repository contains code supporting Pixhawk standard boards (best supported
* [Hex Cube Yellow](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_yellow.html)
* [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://docs.px4.io/master/en/complete_vehicles/crazyflie2.html)
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/master/en/flight_controller/crazyflie2.html)
* [Omnibus F4 SD](https://docs.px4.io/master/en/flight_controller/omnibus_f4_sd.html)
* [Holybro Kakute F7](https://docs.px4.io/master/en/flight_controller/kakutef7.html)
* [Raspberry PI with Navio 2](https://docs.px4.io/master/en/flight_controller/raspberry_pi_navio2.html)
@@ -0,0 +1,8 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (RTPS)
#
# @type Quadrotor Wide
#
. ${R}etc/init.d-posix/airframes/10016_iris
@@ -0,0 +1,4 @@
#!/bin/sh
# shellcheck disable=SC2154
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
@@ -1,54 +0,0 @@
#!/bin/sh
#
# @name Plane SITL
#
. ${R}etc/init.d/rc.fw_defaults
param set-default EKF2_ARSP_THR 8
param set-default EKF2_FUSE_BETA 1
param set-default EKF2_MAG_ACCLIM 0
param set-default EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_I 0.4
param set-default FW_PR_P 0.9
param set-default FW_PR_FF 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_THR_CRUISE 0.25
param set-default FW_T_ALT_TC 2
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_HRATE_FF 0.5
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default FW_T_TAS_TC 2
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set-default NAV_LOITER_RAD 50
param set-default RWTO_TKOFF 1
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -46,6 +46,8 @@ px4_add_romfs_files(
1014_solo
1015_iris_obs_avoid
1015_iris_obs_avoid.post
1016_iris_rtps
1016_iris_rtps.post
1017_iris_opt_flow_mockup
1018_iris_vision_velocity
1019_iris_dual_gps
@@ -60,7 +62,6 @@ px4_add_romfs_files(
1034_rascal-electric
1035_techpod
1036_malolo
1037_believer
1040_standard_vtol
1041_tailsitter
1042_tiltrotor
+3 -9
View File
@@ -48,10 +48,10 @@ else
# shellcheck disable=SC2012
REQUESTED_AUTOSTART=$(ls "${R}etc/init.d-posix/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
if [ -z "$REQUESTED_AUTOSTART" ]; then
echo "ERROR [init] Unknown model $PX4_SIM_MODEL (not found by name on ${R}etc/init.d-posix/airframes)"
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on ${R}etc/init.d-posix/airframes)"
exit 1
else
echo "INFO [init] found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
echo "Info: found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
fi
fi
@@ -126,7 +126,7 @@ then
param set SYS_RESTART_TYPE 2
fi
param set-default BAT1_N_CELLS 4
param set-default BAT_N_CELLS 4
param set-default CBRK_AIRSPD_CHK 0
param set-default CBRK_SUPPLY_CHK 894281
@@ -225,12 +225,6 @@ sensors start
commander start
navigator start
# Try to start the micrortps_client with UDP transport if module exists
if px4-micrortps_client status > /dev/null 2>&1
then
# shellcheck disable=SC2154
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
fi
if param greater -s MNT_MODE_IN -1
then
@@ -13,13 +13,12 @@
# @output MAIN6 gear
#
# @maintainer Lorenz Meier <lorenz@px4.io>
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT1_N_CELLS 3
param set-default BAT_N_CELLS 3
param set-default FW_AIRSPD_MAX 20
param set-default FW_AIRSPD_MIN 12
@@ -38,9 +38,8 @@ param set-default MC_YAWRATE_P 0.25
param set-default MC_YAWRATE_I 0.25
param set-default MC_YAWRATE_D 0
param set-default BAT1_V_DIV 12.27559
param set-default BAT1_A_PER_V 15.39103
param set-default BAT_V_DIV 12.27559
param set-default BAT_A_PER_V 15.39103
set MIXER quad_w
set PWM_OUT 1234
@@ -26,7 +26,7 @@
. ${R}etc/init.d/rc.mc_defaults
param set-default BAT1_N_CELLS 4
param set-default BAT_N_CELLS 4
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.13
@@ -26,8 +26,8 @@
. ${R}etc/init.d/rc.mc_defaults
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_EMPTY 3.5
param set-default BAT_N_CELLS 6
param set-default BAT_V_EMPTY 3.5
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.08
@@ -45,7 +45,6 @@ param set-default MC_YAWRATE_D 0
param set-default MPC_XY_VEL_MAX 2
param set-default PWM_MAIN_MIN 1080
set MIXER quad_w
set PWM_OUT 1234
@@ -6,7 +6,6 @@
# @class Copter
#
# @maintainer Lorenz Meier <lorenz@px4.io>
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -14,7 +14,7 @@
. ${R}etc/init.d/rc.vtol_defaults
param set-default BAT1_N_CELLS 3
param set-default BAT_N_CELLS 3
param set-default COM_RC_IN_MODE 1
@@ -44,8 +44,7 @@ param set-default MPC_HOLD_MAX_XY 0.25
param set-default MPC_THR_MIN 0.15
param set-default MPC_Z_VEL_MAX_DN 2
param set-default BAT1_N_CELLS 4
param set-default BAT_N_CELLS 4
set MIXER octo_cox_w
set PWM_OUT 12345678
@@ -23,9 +23,9 @@
. ${R}etc/init.d/rc.vtol_defaults
param set-default BAT1_CAPACITY 23000
param set-default BAT1_N_CELLS 4
param set-default BAT1_R_INTERNAL 0.0025
param set-default BAT_CAPACITY 23000
param set-default BAT_N_CELLS 4
param set-default BAT_R_INTERNAL 0.0025
param set-default CBRK_AIRSPD_CHK 162128
param set-default CBRK_IO_SAFETY 22027
@@ -23,7 +23,8 @@
. ${R}etc/init.d/rc.vtol_defaults
param set-default BAT1_N_CELLS 6
param set-default BAT_N_CELLS 6
param set-default FW_AIRSPD_MAX 30
param set-default FW_AIRSPD_MIN 19
@@ -70,6 +71,7 @@ param set-default MPC_JERK_AUTO 4
param set-default MPC_LAND_SPEED 1
param set-default MPC_MAN_TILT_MAX 25
param set-default MPC_MAN_Y_MAX 40
param set-default MPC_POS_MODE 3
param set-default MPC_SPOOLUP_TIME 1.5
param set-default MPC_THR_HOVER 0.45
param set-default MPC_TILTMAX_AIR 25
@@ -13,7 +13,6 @@
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -13,7 +13,6 @@
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -26,8 +26,8 @@
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT1_CAPACITY 2500
param set-default BAT1_N_CELLS 3
param set-default BAT_CAPACITY 2500
param set-default BAT_N_CELLS 3
param set-default PWM_AUX_RATE 50
param set-default PWM_MAIN_RATE 50
@@ -46,6 +46,5 @@ param set-default FW_R_LIM 40
param set-default FW_P_LIM_MAX 25
param set-default FW_P_LIM_MIN -5
param set-default FW_P_RMAX_NEG 20
set MIXER TF-AutoG2
set MIXER_AUX pass
@@ -48,7 +48,8 @@ param set-default PWM_MAIN_DISARM 1000
# the payload bay is pitched up about 7 degrees
param set-default SENS_BOARD_Y_OFF 7
set MIXER fw_generic_wing
set MIXER phantom
# Provide ESC a constant 1000 us pulse
set PWM_OUT 4
@@ -23,7 +23,7 @@
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT1_N_CELLS 2
param set-default BAT_N_CELLS 2
param set-default FW_AIRSPD_MAX 15
param set-default FW_AIRSPD_MIN 10
param set-default FW_AIRSPD_TRIM 13
@@ -48,7 +48,7 @@ param set-default PWM_MAIN_DISARM 1000
set MAV_TYPE 1
# Set mixer.
set MIXER fw_generic_wing
set MIXER wingwing
# Provide ESC a constant 1000 us pulse.
set PWM_OUT 4
@@ -27,4 +27,5 @@ param set-default FW_AIRSPD_TRIM 15
param set-default NAV_LOITER_RAD 150
set MIXER fw_generic_wing
set MIXER FX79
@@ -49,7 +49,8 @@ param set-default PWM_MAIN_DISARM 1000
# the payload bay is pitched up about 7 degrees
param set-default SENS_BOARD_Y_OFF 11.9
set MIXER fw_generic_wing
set MIXER phantom
# Provide ESC a constant 1000 us pulse
set PWM_OUT 4
@@ -63,6 +63,6 @@ param set-default PWM_MAIN_REV2 1
param set-default PWM_MAIN_MIN 900
param set-default PWM_MAIN_MAX 2100
set MIXER fw_generic_wing
set MIXER caipi
set PWM_OUT 1234
@@ -127,9 +127,9 @@ param set-default IMU_GYRO_CUTOFF 100
param set-default SENS_EN_PMW3901 1
# Power Parameters
param set-default BAT1_N_CELLS 4
param set-default BAT1_A_PER_V 36.364
param set-default BAT1_V_DIV 18.182
param set-default BAT_N_CELLS 4
param set-default BAT_A_PER_V 36.364
param set-default BAT_V_DIV 18.182
# Circuit breakers
param set-default CBRK_IO_SAFETY 22027
@@ -0,0 +1,38 @@
#!/bin/sh
#
# @name Hobbyking Micro PCB
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.1
param set-default MC_ROLLRATE_I 0.05
param set-default MC_ROLLRATE_D 0.003
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.1
param set-default MC_PITCHRATE_I 0.05
param set-default MC_PITCHRATE_D 0.003
param set-default MC_YAW_P 2.8
param set-default MC_YAWRATE_P 0.2
param set-default MC_YAWRATE_I 0.1
param set-default MC_YAWRATE_D 0
param set-default PWM_MAIN_MIN 1200
@@ -54,7 +54,7 @@ param set-default DSHOT_CONFIG 600
param set-default SYS_HAS_BARO 0
param set-default SYS_HAS_MAG 0
param set-default BAT1_N_CELLS 2
param set-default BAT_N_CELLS 2
# The Whoop uses reversed props
set MIXER quad_h
set PWM_OUT 1234
@@ -20,7 +20,7 @@ set PWM_OUT 1234
# The set does not include a battery, but most people will probably use 4S
param set-default BAT1_N_CELLS 4
param set-default BAT_N_CELLS 4
param set-default IMU_GYRO_CUTOFF 120
param set-default IMU_DGYRO_CUTOFF 45
@@ -17,7 +17,7 @@ set MIXER quad_x
set PWM_OUT 1234
param set-default BAT1_N_CELLS 4
param set-default BAT_N_CELLS 4
param set-default GPS_1_CONFIG 0
param set-default RC_PORT_CONFIG 201
@@ -17,7 +17,7 @@ set MIXER quad_x
set PWM_OUT 1234
param set-default BAT1_N_CELLS 6
param set-default BAT_N_CELLS 6
param set-default MC_ROLL_P 6.5
param set-default MC_ROLLRATE_P 0.05
@@ -92,10 +92,10 @@ param set-default MPC_TKO_RAMP_T 1
param set-default MPC_TKO_SPEED 1.1
param set-default MPC_VEL_MANUAL 3
param set-default BAT1_SOURCE 0
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_DIV 10.14
param set-default BAT1_A_PER_V 18.18
param set-default BAT_SOURCE 0
param set-default BAT_N_CELLS 4
param set-default BAT_V_DIV 10.14
param set-default BAT_A_PER_V 18.18
#param set CBRK_IO_SAFETY 22027
param set-default COM_DISARM_LAND 2
@@ -73,7 +73,7 @@ param set-default PWM_MAIN_RATE 0
param set-default SENS_BOARD_ROT 2
param set-default BAT1_SOURCE 0
param set-default BAT_SOURCE 0
param set-default CBRK_IO_SAFETY 22027
#param set COM_DISARM_LAND 3
@@ -102,10 +102,10 @@ param set-default MPC_TKO_RAMP_T 1
param set-default MPC_TKO_SPEED 1.1
param set-default MPC_VEL_MANUAL 3
param set-default BAT1_SOURCE 0
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_DIV 10.14
param set-default BAT1_A_PER_V 18.18
param set-default BAT_SOURCE 0
param set-default BAT_N_CELLS 4
param set-default BAT_V_DIV 10.14
param set-default BAT_A_PER_V 18.18
#param set CBRK_IO_SAFETY 22027
param set-default COM_DISARM_LAND 2
@@ -21,7 +21,7 @@ set MIXER quad_x
set PWM_OUT 1234
param set-default BAT1_N_CELLS 1
param set-default BAT_N_CELLS 1
param set-default MC_ROLL_P 8
param set-default MC_ROLLRATE_P 0.19
@@ -32,18 +32,17 @@ set PWM_OUT 1234
param reset_all SYS_AUTOSTART SYS_AUTOCONFIG RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* CAL_ACC* CAL_GYRO* CAL_MAG* SENS_BOARD* EKF2_MAGBIAS*
# battery
param set-default BAT_CAPACITY 2750
param set-default BAT_CRIT_THR 0.15
param set-default BAT_EMERGEN_THR 0.075
param set-default BAT_LOW_THR 0.20
param set-default BAT1_CAPACITY 2750
param set-default BAT1_N_CELLS 4
param set-default BAT1_R_INTERNAL 0.06
param set-default BAT1_SOURCE 1
param set-default BAT1_V_CHARGED 4.15
param set-default BAT1_V_DIV 11.1625
param set-default BAT1_V_EMPTY 3.65
param set-default BAT1_V_OFFS_CURR -0.0045
param set-default BAT_N_CELLS 4
param set-default BAT_R_INTERNAL 0.06
param set-default BAT_SOURCE 1
param set-default BAT_V_CHARGED 4.15
param set-default BAT_V_DIV 11.1625
param set-default BAT_V_EMPTY 3.65
param set-default BAT_V_OFFS_CURR -0.0045
# sensor calibration
param set-default CAL_MAG_SIDES 63
@@ -19,9 +19,9 @@
set MIXER quad_x_cw
set PWM_OUT 1234
param set-default BAT1_N_CELLS 1
param set-default BAT1_CAPACITY 240
param set-default BAT1_SOURCE 1
param set-default BAT_N_CELLS 1
param set-default BAT_CAPACITY 240
param set-default BAT_SOURCE 1
param set-default CBRK_SUPPLY_CHK 894281
param set-default CBRK_USB_CHK 197848
@@ -16,7 +16,7 @@
. ${R}etc/init.d/rc.rover_defaults
param set-default BAT1_N_CELLS 2
param set-default BAT_N_CELLS 2
param set-default EKF2_ANGERR_INIT 0.01
param set-default EKF2_GBIAS_INIT 0.01
@@ -2,7 +2,7 @@
#
# @name Aion Robotics R1 UGV
#
# @url https://www.aionrobotics.com/r1
# @url http://docs.aionrobotics.com/en/latest/r1-ugv.html
#
# @type Rover
# @class Rover
@@ -19,7 +19,7 @@
. ${R}etc/init.d/rc.rover_defaults
param set-default BAT1_N_CELLS 4
param set-default BAT_N_CELLS 4
param set-default EKF2_GBIAS_INIT 0.01
param set-default EKF2_ANGERR_INIT 0.01
@@ -21,7 +21,7 @@
. ${R}etc/init.d/rc.rover_defaults
param set-default BAT1_N_CELLS 2
param set-default BAT_N_CELLS 2
param set-default EKF2_GBIAS_INIT 0.01
param set-default EKF2_ANGERR_INIT 0.01
@@ -116,9 +116,9 @@ param set-default COM_DISARM_LAND 3
param set-default PWM_MAIN_RATE 0
# Battery
param set-default BAT1_SOURCE 0
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_DIV 10.133
param set-default BAT_SOURCE 0
param set-default BAT_N_CELLS 4
param set-default BAT_V_DIV 10.133
# TELEM1 ttyS1
param set-default MAV_0_CONFIG 101
@@ -71,6 +71,7 @@ px4_add_romfs_files(
4016_holybro_px4vision
4017_nxp_hovergames
4018_s500_ctrlalloc
4020_hk_micro_pcb
4030_3dr_solo
4031_3dr_quad
4040_reaper
-4
View File
@@ -226,8 +226,6 @@ then
fi
fi
param set PWM_AUX_OUT ${PWM_AUX_OUT}
if [ $MIXER_AUX != none -a $AUX_MODE = none -a -e $OUTPUT_AUX_DEV ]
then
#
@@ -270,8 +268,6 @@ then
fi
fi
param set PWM_MAIN_OUT ${PWM_OUT}
if [ $EXTRA_MIXER_MODE != none ]
then
+1 -14
View File
@@ -26,12 +26,6 @@ then
batt_smbus start -X
fi
# Start batmon driver if enabled using BATMON_DRIVER_EN
if param compare -s BATMON_DRIVER_EN 1
then
batmon start -X #start on external bus
fi
# Sensors on the PWM interface bank
if param compare -s SENS_EN_LL40LS 1
then
@@ -117,14 +111,7 @@ fi
# ADIS16448 spi external IMU
if param compare -s SENS_EN_ADIS164X 1
then
if param compare -s SENS_OR_ADIS164X 0
then
adis16448 -S start
fi
if param compare -s SENS_OR_ADIS164X 4
then
adis16448 -S start -R 4
fi
adis16448 -S start
fi
# probe for optional external I2C devices
+39 -21
View File
@@ -81,6 +81,33 @@ then
hardfault_log reset
fi
fi
# Prevent MacOS and Ubuntu from creating unnecessary temporary files on the microSD card
# block MacOS Spotlight indexing (.Spotlight-V100 folder)
if [ ! -f "/fs/microsd/.metadata_never_index" ]; then
cat > /fs/microsd/.metadata_never_index
fi
# block MacOS trashes
if [ ! -f "/fs/microsd/.Trashes" ]; then
cat > /fs/microsd/.Trashes
fi
# block MacOS logging of filesystem events
if [ ! -d "/fs/microsd/.fseventsd" ]; then
mkdir /fs/microsd/.fseventsd
fi
if [ ! -f "/fs/microsd/.fseventsd/no_log" ]; then
cat > /fs/microsd/.fseventsd/no_log
fi
# block Ubuntu trash
if [ ! -f "/fs/microsd/.Trash-1000" ]; then
cat > /fs/microsd/.Trash-1000
fi
else
# tune SD_INIT
set STARTUP_TUNE 14 # tune 14 = SD_INIT
@@ -377,30 +404,21 @@ else
if param greater -s TRIG_MODE 0
then
if param compare TRIG_PINS_EX 0
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
if param compare TRIG_PINS 56
then
# We ONLY support trigger on pins 5+6 or 7+8 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
if param compare TRIG_PINS 78
then
# clear pins 7 and 8
set FMU_MODE pwm6
set AUX_MODE pwm6
else
set FMU_MODE none
set AUX_MODE none
fi
fi
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
else
if param compare TRIG_PINS_EX 12288
if param compare TRIG_PINS 78
then
set FMU_MODE pwm12
set AUX_MODE pwm12
# clear pins 7 and 8
set FMU_MODE pwm6
set AUX_MODE pwm6
else
set FMU_MODE none
set AUX_MODE none
fi
fi
@@ -39,6 +39,7 @@ px4_add_romfs_files(
AETRFG.main.mix
babyshark.main.mix
blade130.main.mix
caipi.main.mix
CCPM.main.mix
claire.aux.mix
claire.main.mix
@@ -52,6 +53,7 @@ px4_add_romfs_files(
firefly6.aux.mix
firefly6.main.mix
fw_generic_wing.main.mix
FX79.main.mix
generic_diff_rover.main.mix
hexa_cox.main.mix
hexa_+.main.mix
@@ -64,6 +66,7 @@ px4_add_romfs_files(
octo_+.main.mix
octo_x.main.mix
pass.aux.mix
phantom.main.mix
quad_dc.main.mix
quad_h.main.mix
quad_+.main.mix
@@ -91,4 +94,5 @@ px4_add_romfs_files(
vtol_convergence.main.mix
vtol_delta.aux.mix
vtol_tailsitter_duo.main.mix
wingwing.main.mix
)
+50
View File
@@ -0,0 +1,50 @@
FX-79 Delta-wing mixer for PX4FMU
=================================
Designed for FX-79.
TODO (sjwilks): Add mixers for flaps.
This file defines mixers suitable for controlling a delta wing aircraft using
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
assumed to be unused.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
See the README for more information on the scaler format.
Elevon mixers
-------------
Three scalers total (output, roll, pitch).
On the assumption that the two elevon servos are physically reversed, the pitch
input is inverted between the two servos.
The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.
M: 2
S: 0 0 8500 8500 0 -10000 10000
S: 0 1 9500 9500 0 -10000 10000
M: 2
S: 0 0 8500 8500 0 -10000 10000
S: 0 1 -9500 -9500 0 -10000 10000
Output 2
--------
This mixer is empty.
Z:
Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
S: 0 3 0 20000 -10000 -10000 10000
@@ -2,7 +2,6 @@
# 1-4 (main): Ailerons (Y-cable), A-tail left, Pusher, A-tail right
# 5-8 (main): quad motors
#=============================
# @board px4_fmu-v2 exclude
Aileron mixer (roll)
+48
View File
@@ -0,0 +1,48 @@
Delta-wing mixer
===========================
Designed for TBS Caipirinha
This file defines mixers suitable for controlling a delta wing aircraft using
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
assumed to be unused.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
See the README for more information on the scaler format.
Elevon mixers
-------------
Three scalers total (output, roll, pitch).
On the assumption that the two elevon servos are physically reversed, the pitch
input is inverted between the two servos.
The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.
M: 2
S: 0 0 8000 8000 0 -10000 10000
S: 0 1 9000 9000 0 -10000 10000
M: 2
S: 0 0 8000 8000 0 -10000 10000
S: 0 1 -9000 -9000 0 -10000 10000
Output 2
--------
This mixer is empty.
Z:
Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
S: 0 3 0 20000 -10000 -10000 10000
@@ -1,8 +1,6 @@
Thrust tilt/ Starboard Thrust / Port Thrust / Tail Thrust mixer for PX4FMU
=======================================================
# @board px4_fmu-v2 exclude
This file defines mixers suitable for controlling an airship with
a thrust tilt, starboard and port thruster and a tail thruster using PX4FMU.
The configuration assumes the starboard thruster is connected to PX4FMU
@@ -1,6 +1,5 @@
# DeltaQuad mixer for PX4FMU
#=============================
# @board px4_fmu-v2 exclude
Quad motors 1 - 4
-------------
@@ -1,4 +1,3 @@
# Dodeca Cox
# @board px4_fmu-v2 exclude
R: 6a
@@ -1,4 +1,3 @@
# Dodeca Cox
# @board px4_fmu-v2 exclude
R: 6m
@@ -1,8 +1,6 @@
# mixer for the FireFly6 tilt mechansim servo, elevons and landing gear
=======================================================================
# @board px4_fmu-v2 exclude
Tilt mechanism servo mixer
---------------------------
M: 1
@@ -1,6 +1,4 @@
# FireFly6 mixer for PX4FMU
#
#===========================
# @board px4_fmu-v2 exclude
R: 6c
@@ -1,4 +1,3 @@
# @board px4_fmu-v2 exclude
# Roll channel for mount
M: 1
@@ -0,0 +1,45 @@
Phantom FX-61 mixer
===================
This file defines mixers suitable for controlling a delta wing aircraft using
PX4/Pixhawk. The configuration assumes the elevon servos are connected to
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
assumed to be unused.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
See the README for more information on the scaler format.
Elevon mixers
-------------
Three scalers total (output, roll, pitch).
On the assumption that the two elevon servos are physically reversed, the pitch
input is inverted between the two servos.
The scaling factor are set so that pitch will have more travel than roll.
M: 2
S: 0 0 -6000 -6000 0 -10000 10000
S: 0 1 6500 6500 0 -10000 10000
M: 2
S: 0 0 -6000 -6000 0 -10000 10000
S: 0 1 -6500 -6500 0 -10000 10000
Output 2
--------
This mixer is empty.
Z:
Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
S: 0 3 0 20000 -10000 -10000 10000
@@ -1,8 +1,6 @@
Tilt-Quadrotor mixer for PX4FMU (2/2) V2
===========================
# @board px4_fmu-v2 exclude
This file defines the aux outputs mixer for a Tilt-quadrotor in the + configuration.
# @output AUX1 Outer servo motor for rotor 2 arm
@@ -1,8 +1,6 @@
Tilt-Quadrotor mixer for PX4FMU (1/2) V2
===========================
# @board px4_fmu-v2 exclude
This file defines the main outputs mixer for a Tilt-quadrotor in the + configuration.
# @output MAIN1 motor 1
@@ -1,5 +1,3 @@
# @board px4_fmu-v2 exclude
# Motor 1
M: 3
S: 0 2 -4000 -4000 0 -4000 +4000
@@ -1,8 +1,6 @@
Mixer for an AAERT VTOL
=======================
# @board px4_fmu-v2 exclude
Aileron 1 mixer
---------------
M: 1
@@ -1,8 +1,6 @@
Aileron/v-tail/throttle VTOL mixer for PX4FMU
=======================================================
# @board px4_fmu-v2 exclude
This file defines mixers suitable for controlling a fixed wing aircraft with
aileron, v-tail (rudder, elevator) and throttle using PX4FMU.
The configuration assumes the aileron servos are connected to PX4FMU
@@ -1,7 +1,5 @@
# Generic quadplane tiltrotor servo mixer
# @board px4_fmu-v2 exclude
# Tilt mechanism servo mixer
---------------------------
# front left up:2000 down:1000
@@ -1,5 +1,4 @@
# E-flite Convergence Tricopter Y-Configuration Mixer
# @board px4_fmu-v2 exclude
# Motors
R: 3y
@@ -0,0 +1,48 @@
Delta-wing mixer for PX4FMU
===========================
Designed for Wing Wing Z-84
This file defines mixers suitable for controlling a delta wing aircraft using
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
assumed to be unused.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
See the README for more information on the scaler format.
Elevon mixers
-------------
Three scalers total (output, roll, pitch).
On the assumption that the two elevon servos are physically reversed, the pitch
input is inverted between the two servos.
The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.
M: 2
S: 0 0 -6000 -6000 0 -10000 10000
S: 0 1 6500 6500 0 -10000 10000
M: 2
S: 0 0 -6000 -6000 0 -10000 10000
S: 0 1 -6500 -6500 0 -10000 10000
Output 2
--------
This mixer is empty.
Z:
Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
S: 0 3 0 20000 -10000 -10000 10000
+22 -38
View File
@@ -5,62 +5,46 @@ import subprocess
from subprocess import call, Popen
from argparse import ArgumentParser
import re
import sys
import datetime
COLOR_RED = "\x1b[31m"
COLOR_GREEN = "\x1b[32m"
COLOR_YELLOW = "\x1b[33m"
COLOR_WHITE = "\x1b[37m"
COLOR_RESET = "\x1b[0m"
def print_line(line):
if "WARNING" in line:
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
elif "WARN" in line:
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
elif "ERROR" in line:
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
elif "INFO" in line:
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
if "PASSED" in line:
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
if "FAILED" in line:
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
current_time = datetime.datetime.now()
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
def monitor_firmware_upload(port, baudrate):
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1, xonxoff=True, rtscts=False, dsrdtr=False)
databits = serial.EIGHTBITS
stopbits = serial.STOPBITS_ONE
parity = serial.PARITY_NONE
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=1)
timeout = 180 # 3 minutes
finished = 0
timeout = 300 # 5 minutes
timeout_start = time.time()
timeout_newline = time.time()
while True:
while finished == 0:
serial_line = ser.readline().decode("ascii", errors='ignore')
if len(serial_line) > 0:
print_line(serial_line)
if (len(serial_line) > 0):
print(serial_line.replace('\n', ''))
if "NuttShell (NSH)" in serial_line:
sys.exit(0)
elif "nsh>" in serial_line:
sys.exit(0)
finished = 1
break
if time.time() - timeout_start > 10:
if "nsh>" in serial_line:
finished = 1
break
if time.time() > timeout_start + timeout:
print("Error, timeout")
sys.exit(-1)
finished = 1
break
# newline every 10 seconds if still running
if time.time() - timeout_newline > 10:
timeout_newline = time.time()
ser.write("\n".encode("ascii"))
ser.write('\n'.encode("ascii"))
ser.flush()
ser.close()
def main():
parser = ArgumentParser(description=__doc__)
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
-137
View File
@@ -1,137 +0,0 @@
#! /usr/bin/env python3
import serial, time
import subprocess
from subprocess import call, Popen
from argparse import ArgumentParser
import re
import sys
COLOR_RED = "\x1b[31m"
COLOR_GREEN = "\x1b[32m"
COLOR_YELLOW = "\x1b[33m"
COLOR_WHITE = "\x1b[37m"
COLOR_RESET = "\x1b[0m"
def print_line(line):
if "WARNING" in line:
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
elif "WARN" in line:
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
elif "ERROR" in line:
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
elif "INFO" in line:
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
if "PASSED" in line:
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
if "FAILED" in line:
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
print(line, end='')
def do_param_set_cmd(port, baudrate, param_name, param_value):
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.1, xonxoff=True, rtscts=False, dsrdtr=False)
timeout_start = time.time()
timeout = 10 # 10 seconds
# wait for nsh prompt
while True:
ser.write("\n".encode("ascii"))
ser.flush()
serial_line = ser.readline().decode("ascii", errors='ignore')
if "nsh>" in serial_line:
break
else:
if len(serial_line) > 0:
print_line(serial_line)
if time.time() > timeout_start + timeout:
print("Error, timeout waiting for prompt")
sys.exit(1)
# clear
ser.readlines()
# run command
timeout_start = time.time()
timeout = 10 # 10 seconds
cmd = "param set " + param_name + " " + param_value
# write command (param set) and wait for command echo
serial_cmd = '{0}\r\n'.format(cmd)
ser.write(serial_cmd.encode("ascii"))
ser.flush()
while True:
serial_line = ser.readline().decode("ascii", errors='ignore')
if cmd in serial_line:
print_line(serial_line)
break
else:
if len(serial_line) > 0:
print_line(serial_line)
if time.time() > timeout_start + timeout:
print("Error, timeout waiting for command echo")
break
# verify param value
cmd = "param show " + param_name
serial_cmd = '{0}\r\n'.format(cmd)
ser.write(serial_cmd.encode("ascii"))
ser.flush()
param_show_response = param_name + " ["
timeout_start = time.time()
timeout = 2 # 2 seconds
while True:
serial_line = ser.readline().decode("ascii", errors='ignore')
if param_show_response in serial_line:
print_line(serial_line)
current_param_value = serial_line.split(":")[-1].strip()
if (current_param_value == param_value):
sys.exit(0)
else:
sys.exit(1)
else:
if len(serial_line) > 0:
print_line(serial_line)
if time.time() > timeout_start + timeout:
if "nsh>" in serial_line:
sys.exit(1) # error, command didn't complete successfully
elif "NuttShell (NSH)" in serial_line:
sys.exit(1) # error, command didn't complete successfully
if len(serial_line) <= 0:
ser.write("\r\n".encode("ascii"))
ser.flush()
if time.time() > timeout_start + timeout:
print("Error, timeout")
sys.exit(-1)
ser.close()
def main():
parser = ArgumentParser(description=__doc__)
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
parser.add_argument("--name", "-p", dest="param_name", help="Parameter name")
parser.add_argument("--value", "-v", dest="param_value", help="Parameter value")
args = parser.parse_args()
do_param_set_cmd(args.device, args.baudrate, args.param_name, args.param_value)
if __name__ == "__main__":
main()
+37 -72
View File
@@ -6,89 +6,52 @@ from subprocess import call, Popen
from argparse import ArgumentParser
import re
import sys
import datetime
COLOR_RED = "\x1b[31m"
COLOR_GREEN = "\x1b[32m"
COLOR_YELLOW = "\x1b[33m"
COLOR_WHITE = "\x1b[37m"
COLOR_RESET = "\x1b[0m"
def print_line(line):
if "WARNING" in line:
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
elif "WARN" in line:
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
elif "ERROR" in line:
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
elif "INFO" in line:
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
if "PASSED" in line:
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
if "FAILED" in line:
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
current_time = datetime.datetime.now()
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
def do_nsh_cmd(port, baudrate, cmd):
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.1, xonxoff=True, rtscts=False, dsrdtr=False)
timeout_start = time.time()
timeout = 10 # 10 seconds
# wait for nsh prompt
while True:
ser.write("\n".encode("ascii"))
ser.flush()
serial_line = ser.readline().decode("ascii", errors='ignore')
if "nsh>" in serial_line:
break
else:
if len(serial_line) > 0:
print_line(serial_line)
if time.time() > timeout_start + timeout:
print("Error, timeout waiting for prompt")
sys.exit(1)
# clear
ser.readlines()
databits = serial.EIGHTBITS
stopbits = serial.STOPBITS_ONE
parity = serial.PARITY_NONE
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=0.1)
# run command
timeout_start = time.time()
timeout = 1 # 1 second
timeout = 10 # 10 seconds
# clear
ser.write("\n".encode("ascii"))
ser.flush()
ser.readline()
success_cmd = "cmd succeeded!"
# wait for command echo
serial_cmd = '{0}; echo "{1}"\r\n'.format(cmd, success_cmd)
serial_cmd = '{0}; echo "{1}"\n'.format(cmd, success_cmd)
ser.write(serial_cmd.encode("ascii"))
ser.flush()
while True:
serial_line = ser.readline().decode("ascii", errors='ignore')
ser.readline()
if cmd in serial_line:
break
elif serial_line.startswith(success_cmd) and len(serial_line) <= len(success_cmd) + 2:
print_line(serial_line)
# we missed the echo, but command ran and succeeded
sys.exit(0)
else:
if len(serial_line) > 0:
print_line(serial_line)
# TODO: require successful command echo
# while True:
# serial_cmd = '{0}; echo "{1}"\n'.format(cmd, success_cmd)
# ser.write(serial_cmd.encode("ascii"))
# ser.flush()
if time.time() > timeout_start + timeout:
print("Error, timeout waiting for command echo")
break
# serial_line = ser.readline().decode("ascii", errors='ignore')
# if cmd in serial_line:
# break
# else:
# print(serial_line, end='')
# if time.time() > timeout_start + timeout:
# print("Error, timeout")
# sys.exit(-1)
# break
# time.sleep(1)
timeout_start = time.time()
timeout = 180 # 3 minutes
timeout = 30 # 30 seconds
while True:
serial_line = ser.readline().decode("ascii", errors='ignore')
@@ -97,15 +60,17 @@ def do_nsh_cmd(port, baudrate, cmd):
break
else:
if len(serial_line) > 0:
print_line(serial_line)
print(serial_line, end='')
if "nsh>" in serial_line:
sys.exit(1) # error, command didn't complete successfully
#sys.exit(-1) # error, command didn't complete successfully
break # TODO: return error on failure
elif "NuttShell (NSH)" in serial_line:
sys.exit(1) # error, command didn't complete successfully
#sys.exit(-1) # error, command didn't complete successfully
break # TODO: return error on failure
if len(serial_line) <= 0:
ser.write("\r\n".encode("ascii"))
ser.write("\n".encode("ascii"))
ser.flush()
if time.time() > timeout_start + timeout:
+50 -86
View File
@@ -8,58 +8,12 @@ import re
import unittest
import os
import sys
import datetime
COLOR_RED = "\x1b[31m"
COLOR_GREEN = "\x1b[32m"
COLOR_YELLOW = "\x1b[33m"
COLOR_WHITE = "\x1b[37m"
COLOR_RESET = "\x1b[0m"
def print_line(line):
if "WARNING" in line:
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
elif "WARN" in line:
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
elif "ERROR" in line:
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
elif "INFO" in line:
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
if "PASSED" in line:
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
if "FAILED" in line:
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
current_time = datetime.datetime.now()
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
def do_test(port, baudrate, test_name):
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.2, xonxoff=True, rtscts=False, dsrdtr=False)
timeout_start = time.time()
timeout = 10 # 10 seconds
# wait for nsh prompt
while True:
ser.write("\n".encode("ascii"))
ser.flush()
serial_line = ser.readline().decode("ascii", errors='ignore')
if "nsh>" in serial_line:
break
else:
if len(serial_line) > 0:
print(serial_line, end='')
if time.time() > timeout_start + timeout:
print("Error, timeout waiting for prompt")
return False
# clear
ser.readlines()
databits = serial.EIGHTBITS
stopbits = serial.STOPBITS_ONE
parity = serial.PARITY_NONE
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=1)
success = False
@@ -68,38 +22,48 @@ def do_test(port, baudrate, test_name):
cmd = 'tests ' + test_name
print("| Running:", cmd)
print('|======================================================================')
timeout_start = time.time()
timeout = 2 # 2 seconds
timeout = 10 # 10 seconds
# clear
ser.write("\n".encode("ascii"))
ser.flush()
ser.readline()
# wait for command echo
serial_cmd = '{0}\n'.format(cmd)
ser.write(serial_cmd.encode("ascii"))
ser.flush()
while True:
serial_line = ser.readline().decode("ascii", errors='ignore')
ser.readline()
if cmd in serial_line:
break
else:
if len(serial_line) > 0:
print_line(serial_line)
# TODO: retry command
# while True:
# serial_cmd = '{0}\n'.format(cmd)
# ser.write(serial_cmd.encode("ascii"))
# ser.flush()
if time.time() > timeout_start + timeout:
print("Error, timeout waiting for command echo")
break
# serial_line = ser.readline().decode("ascii", errors='ignore')
# if cmd in serial_line:
# break
# else:
# print(serial_line.replace('\n', ''))
# if time.time() > timeout_start + timeout:
# print("Error, unable to write cmd")
# return False
# time.sleep(1)
# print results, wait for final result (PASSED or FAILED)
timeout = 300 # 5 minutes
timeout = 180 # 3 minutes
timeout_start = time.time()
timeout_newline = timeout_start
while True:
serial_line = ser.readline().decode("ascii", errors='ignore')
if len(serial_line) > 0:
print_line(serial_line)
if (len(serial_line) > 0):
print(serial_line, end='')
if test_name + " PASSED" in serial_line:
success = True
@@ -110,7 +74,7 @@ def do_test(port, baudrate, test_name):
if time.time() > timeout_start + timeout:
print("Error, timeout")
print(test_name + f" {COLOR_RED}FAILED{COLOR_RESET}")
print(test_name + " FAILED")
success = False
break
@@ -139,30 +103,15 @@ class TestHardwareMethods(unittest.TestCase):
def test_bson(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "bson"))
def test_conv(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "conv"))
# def test_dataman(self):
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "dataman"))
def test_dataman(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "dataman"))
# def test_file(self):
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "file"))
def test_file2(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "file2"))
def test_float(self):
def floattest_float(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "float"))
def test_hrt(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "hrt"))
def test_int(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "int"))
def test_i2c_spi_cli(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "i2c_spi_cli"))
def test_IntrusiveQueue(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "IntrusiveQueue"))
@@ -178,6 +127,21 @@ class TestHardwareMethods(unittest.TestCase):
def test_matrix(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "matrix"))
def test_microbench_atomic(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_atomic"))
def test_microbench_hrt(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_hrt"))
def test_microbench_math(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_math"))
def test_microbench_matrix(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_matrix"))
def test_microbench_uorb(self):
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_uorb"))
# def test_mixer(self):
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "mixer"))
+2 -4
View File
@@ -12,14 +12,12 @@ exec find boards msg src platforms test \
-path platforms/nuttx/NuttX -prune -o \
-path platforms/qurt/dspal -prune -o \
-path src/drivers/uavcan/libuavcan -prune -o \
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
-path src/drivers/uavcan_v1/libcanard -prune -o \
-path src/drivers/uavcannode_gps_demo/libcanard -prune -o \
-path src/lib/crypto/monocypher -prune -o \
-path src/lib/events/libevents -prune -o \
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \
-path src/lib/parameters/uthash -prune -o \
-path src/modules/ekf2/EKF -prune -o \
-path src/modules/gyro_fft/CMSIS_5 -prune -o \
-path src/modules/micrortps_bridge/micro-CDR -prune -o \
-path src/modules/micrortps_bridge/microRTPS_client -prune -o \
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR=$0
if [[ ${SCRIPT_DIR:0:1} != '/' ]]; then
SCRIPT_DIR=$(dirname $(realpath -s "$PWD/$0"))
fi
PX4_DIR=$(cd "$(dirname $(dirname $SCRIPT_DIR))" && pwd)
if [ -d $PX4_DIR/build/*_rtps ]; then
cd $PX4_DIR/build/*_rtps/src/modules/micrortps_bridge/micrortps_agent/
cmake -Bbuild
cmake --build build -j$(nproc --all)
fi
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env python
import argparse
import lzma
parser = argparse.ArgumentParser(description="""Compress a file with xz""")
parser.add_argument('filename', metavar='file', help='Input file (output: file.xz)')
args = parser.parse_args()
filename = args.filename
def save_compressed(filename):
#create xz compressed version
xz_filename=filename+'.xz'
with lzma.open(xz_filename, 'wt', preset=9) as f:
with open(filename, 'r') as content_file:
f.write(content_file.read())
save_compressed(filename)
+3 -4
View File
@@ -81,8 +81,7 @@ def sign(bin_file_path, key_file_path=None, generated_key_file=None):
# Align to 4 bytes. Signature always starts at
# 4 byte aligned address, but the signee size
# might not be aligned
if len(signee_bin)%4 != 0:
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
try:
with open(key_file_path,mode='r') as f:
@@ -134,7 +133,7 @@ if(__name__ == "__main__"):
parser.add_argument("signee", help=".bin file to add signature", nargs='?', default=None)
parser.add_argument("signed", help="signed output .bin", nargs='?', default=None)
parser.add_argument("--key", help="key.json file", default="Tools/test_keys/test_keys.json")
parser.add_argument("--key", help="key.json file", default="Tools/test_keys.json")
parser.add_argument("--rdct", help="binary R&D certificate file", default=None)
parser.add_argument("--genkey", help="new generated key", default=None)
args = parser.parse_args()
@@ -153,7 +152,7 @@ if(__name__ == "__main__"):
sys.exit(1)
# Issue a warning when signing with testing key
if args.key=='Tools/test_keys/test_keys.json':
if args.key=='Tools/test_keys.json':
print("WARNING: Signing with PX4 test key")
# Sign the binary
+5 -2
View File
@@ -4,13 +4,16 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
echo "guessing PX4_DOCKER_REPO based on input";
if [[ $@ =~ .*px4_fmu.* ]]; then
# nuttx-px4fmu-v{1,2,3,4,5}
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-05-04"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-04-29"
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
# beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-02-04"
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
# scumaker_pilotpi_arm64
PX4_DOCKER_REPO="px4io/px4-dev-aarch64:latest"
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
# eagle, excelsior
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2020-04-01"
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*bebop.* ]]; then
# posix_rpi_cross, posix_bebop_default
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-02-04"
@@ -27,7 +30,7 @@ fi
# otherwise default to nuttx
if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-05-04"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-04-29"
fi
# docker hygiene
+1 -1
View File
@@ -20,7 +20,7 @@ function spawn_model() {
X=${X:=0.0}
Y=${Y:=$((3*${N}))}
SUPPORTED_MODELS=("iris" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
SUPPORTED_MODELS=("iris" "iris_rtps" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
if [[ " ${SUPPORTED_MODELS[*]} " != *"$MODEL"* ]];
then
echo "ERROR: Currently only vehicle model $MODEL is not supported!"
+12 -27
View File
@@ -12,7 +12,6 @@ import sys, select
import termios
from timeit import default_timer as timer
from argparse import ArgumentParser
import os
try:
from pymavlink import mavutil
@@ -136,20 +135,15 @@ def main():
mav_serialport.write('\n') # make sure the shell is started
# disable echo & avoid buffering on stdin
# setup the console, so we can read one char at a time
fd_in = sys.stdin.fileno()
try:
old_attr = termios.tcgetattr(fd_in)
new_attr = termios.tcgetattr(fd_in)
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
new_attr[3] = new_attr[3] & ~termios.ICANON
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
except termios.error:
# tcgetattr can fail if stdin is not a tty
old_attr = None
ubuf_stdin = os.fdopen(fd_in, 'rb', buffering=0)
old_attr = termios.tcgetattr(fd_in)
new_attr = termios.tcgetattr(fd_in)
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
new_attr[3] = new_attr[3] & ~termios.ICANON
try:
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
cur_line = ''
command_history = []
cur_history_index = 0
@@ -162,19 +156,11 @@ def main():
next_heartbeat_time = timer()
quit_time = None
while quit_time is None or quit_time > timer():
while True:
while True:
i, o, e = select.select([ubuf_stdin], [], [], 0)
i, o, e = select.select([sys.stdin], [], [], 0)
if not i: break
ch = ubuf_stdin.read(1).decode('utf8')
if len(ch) == 0: # EOF
if quit_time is None:
# run a bit longer to read the response (we could also
# read until we get a prompt)
quit_time = timer() + 1
break
ch = sys.stdin.read(1)
# provide a simple shell with command history
if ch == '\n':
@@ -196,8 +182,8 @@ def main():
cur_line = cur_line[:-1]
sys.stdout.write(ch)
elif ord(ch) == 27:
ch = ubuf_stdin.read(1).decode('utf8') # skip one
ch = ubuf_stdin.read(1).decode('utf8')
ch = sys.stdin.read(1) # skip one
ch = sys.stdin.read(1)
if ch == 'A': # arrow up
if cur_history_index > 0:
cur_history_index -= 1
@@ -237,8 +223,7 @@ def main():
mav_serialport.close()
finally:
if old_attr:
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
if __name__ == '__main__':
+20 -50
View File
@@ -5,47 +5,17 @@ import html
class MarkdownTablesOutput():
def __init__(self, groups, board, image_path):
result = """# Airframes Reference
result = ("# Airframes Reference\n"
"> **Note** **This list is [auto-generated](https://github.com/PX4/Firmware/edit/master/Tools/px4airframes/markdownout.py) from the source code**.\n"
"> \n"
"> **AUX** channels may not be present on some flight controllers.\n"
"> If present, PWM AUX channels are commonly labelled **AUX OUT**.\n"
"> \n"
"\n")
:::note
**This list is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/master/Tools/px4airframes/markdownout.py) from the source code** using the build command: `make airframe_metadata`.
:::
This page lists all supported airframes and types including the motor assignment and numbering.
The motors in **green** rotate clockwise, the ones in **blue** counterclockwise.
**AUX** channels may not be present on some flight controllers.
If present, PWM AUX channels are commonly labelled **AUX OUT**.
<style>
table {
display: table;
table-layout: fixed;
margin-bottom: 5px;
}
table.common {
float: right;
width: 70%;
}
table.airframes {
width: 100%;
}
table.airframes th:nth-child(1) {
width: 30%;
}
tr > * {
vertical-align : top;
}
td, th {
text-align : left;
}
img {
max-height: 180px;
width: 29%;
padding-top: 10px;
}
</style>\n\n"""
result += """This page lists all supported airframes and types including
the motor assignment and numbering. The motors in **green** rotate clockwise,
the ones in **blue** counterclockwise.\n\n"""
type_set = set()
@@ -63,7 +33,7 @@ img {
image_name = group.GetImageName()
result += '<div>\n'
image_name = image_path + image_name
result += '<img src="%s.svg"/>\n' % (image_name)
result += '<img src="%s.svg" width="29%%" style="max-height: 180px;"/>\n' % (image_name)
# check if all outputs are equal for the group: if so, show them
# only once
@@ -93,17 +63,19 @@ img {
outputs_prev[i] = ''
if outputs_match[0] or outputs_match[1]:
result += '<table class="common">\n'
result += '<table style="float: right; width: 70%; font-size:1.5rem;">\n'
result += ' <colgroup><col></colgroup>\n'
result += ' <thead>\n'
result += ' <tr><th>Common Outputs</th></tr>\n'
result += ' </thead>\n'
result += ' <tbody>\n'
result += '<tr>\n <td><ul>%s%s</ul></td>\n</tr>\n' % (outputs_prev[0], outputs_prev[1])
result += '<tbody>\n'
result += '<tr>\n <td style="vertical-align: top;"><ul>%s%s</ul></td>\n</tr>\n' % (outputs_prev[0], outputs_prev[1])
result += '</tbody></table>\n'
result += '</div>\n\n'
result += '<table class="generic">\n'
result += '<table style="width: 100%; table-layout:fixed; font-size:1.5rem;">\n'
result += ' <colgroup><col style="width: 30%"><col style="width: 70%"></colgroup>\n'
result += ' <thead>\n'
result += ' <tr><th>Name</th><th></th></tr>\n'
result += ' </thead>\n'
@@ -118,12 +90,10 @@ img {
maintainer = param.GetMaintainer()
maintainer_entry = ''
if maintainer != '':
maintainer_entry = 'Maintainer: %s' % (html.escape(maintainer))
maintainer_entry = '<p>Maintainer: %s</p>' % (html.escape(maintainer))
url = param.GetFieldValue('url')
name_anchor='%s_%s_%s' % (group.GetClass(),group.GetName(),name)
name_anchor='id="%s_%s_%s"' % (group.GetClass(),group.GetName(),name)
name_anchor=name_anchor.replace(' ','_').lower()
name_anchor=name_anchor.replace('"','_').lower()
name_anchor='id="%s"' % name_anchor
name_entry = name
if url != '':
name_entry = '<a href="%s">%s</a>' % (url, name)
@@ -150,7 +120,7 @@ img {
else:
outputs_entry = ''
result += ('<tr %s>\n <td>%s</td>\n <td>%s%s%s</td>\n</tr>\n' %
result += ('<tr %s>\n <td style="vertical-align: top;">%s</td>\n <td style="vertical-align: top;">%s%s%s</td>\n\n</tr>\n' %
(name_anchor, name_entry, maintainer_entry, airframe_id_entry,
outputs_entry))

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