Compare commits

...

80 Commits

Author SHA1 Message Date
JaeyoungLim f5be4fedb1 Remove soaring related messages 2025-08-04 23:58:46 +09:00
JaeyoungLim 45dc5f1e8e Cleanup manual mode 2025-08-04 23:41:28 +09:00
JaeyoungLim 4266ecc124 Cleanup 2025-08-04 12:50:08 +09:00
JaeyoungLim b01e3e50d4 Fix thrust scaling - working with tuning 2025-08-04 12:01:32 +09:00
JaeyoungLim c92bde66fb Fix issues with nans 2025-08-02 11:12:27 +02:00
JaeyoungLim 10d094ae97 Switch origin to SITL position
TODO: Fix problems with NANs
2025-07-08 16:50:30 +09:00
JaeyoungLim f4a2e0db40 Rebase fixes
Initialize local origin

F

F

Disable manual switch
2025-07-08 16:12:07 +09:00
JaeyoungLim b67cc482d4 Copy implementation
Add msgs
2025-07-08 15:40:05 +09:00
Silvan Fuhrer 5a2b26f931 FW land detector: only force to landed if launch detection is STATE_WAITING_FOR_LAUNCH (#25167)
Signed-off-by: Silvan <silvan@auterion.com>
2025-07-07 16:09:15 +02:00
Ramon Roche dcde7b47d1 ci: remove paths ignore
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche a54bbe0b24 coverage: move coverage flags within its own cmake
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 5faa46fa0a cmake: use atomic profile updates for coverage
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche f01e589010 make: lcov ignore mismatch errors
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 6bd66d50e9 shellcheck: fix SC2268 Avoid x-prefix
if [ "x$PRT_GPS1_" = "x" ]; then
     ^-----------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 58dcfb0a02 shellcheck: fix SC3014 == in place of =
Fixes SC3014 (error): In dash, == in place of = is not supported.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 83606cb0fc ci: concurrency cancel in progress
save compute time

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 8a44f10cf9 ci: trigger on pull request for .github/workflows
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 13f3a7ec6d ci: fix branch trigger strategy
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche d46420e1dc ci: check with updated container
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Marco Hauswirth 6ee6a3a578 GNSS: Don't send 'spoofing' warnings form driver (#25160)
* removing logic from driver to send warnings when state-change to spoofing is detected, handled in estimatorChecks

* also remove jamming warnings from drivers, those are handled in the estimator checks as well
2025-07-07 09:44:26 +02:00
Crowdin Bot 588fd9d684 New Crowdin translations - zh-CN 2025-07-07 09:04:54 +10:00
Hamish Willee 8aecc7e588 Incorrect URLS for dronecan/cyphaal in params 2025-07-07 09:04:39 +10:00
Crowdin Bot 29a40f37e2 New Crowdin translations - ko 2025-07-07 09:03:49 +10:00
PX4 Build Bot 389b76bd3a New Crowdin translations - uk (#25163)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-07-07 09:03:31 +10:00
bresch d35c5f4a4e SIH-plane: tune angular rate controllers 2025-07-04 16:14:27 +02:00
Connor Denihan 33fed67c07 Update community_supported_simulators.md (#25155)
Fixed wording
2025-07-04 09:01:37 +10:00
Marco Hauswirth f7ffe27d4c GNSS Spoofing Warning Sensitivity Adjustment (#25144) 2025-07-03 14:13:03 +02:00
Hamish Willee 2c31e2bad5 Fix all possible HTTP to HTTPS docs links (#25153) 2025-07-03 18:09:58 +10:00
Hamish Willee 375f421c61 Link fixes galore (#25151) 2025-07-03 14:53:12 +10:00
Sergei Grichine dd0d00aedc Update 4009_gz_r1_rover (#25150) 2025-07-03 08:14:01 +09:00
Ramon Roche 6deac08b42 docs: remove old doxygen builds (#24743)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-02 14:51:18 -07:00
Hamish Willee d3de49a867 Rename labeler.yml 2025-07-02 14:43:55 -07:00
Hamish Willee dddf18872f Add label to new pull requests that touch docs files 2025-07-02 14:43:55 -07:00
Hamish Willee 0622f12285 Create Labeler workflow 2025-07-02 14:43:55 -07:00
Sergei Grichine a4518580ac Update TransponderReport.msg - correct "heading" description (#25125) 2025-07-02 11:10:46 -08:00
QiTao Weng 30c8c23716 Correct all ADSB heading related field to be in positive range (#25128) 2025-07-02 11:10:28 -08:00
xue cb71aea7fa boards: Updated ZeroOne X6
* Starts pwm_voltage_apply
* Enable Septentrio modules
* Enable IIM42653 IMU
* Enable SCH16T IMU

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-02 09:13:01 -07:00
DATAGNSS 81000f4c71 Docs: update GEM1305 specs and add NANO HRTK Receiver (#24707)
* update GEM1305 specs and add NANO HRTK Receiver

- add NANO HRTK Receiver
- update GEM1305 specifications

* Update SUMMARY.md for NANO HRTK Receiver

- Update SUMMARY.md for NANO HRTK Receiver

* Fix up images

* Minor tweak

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-07-02 11:59:27 +10:00
Hamish Willee b2b6a5f44e Fix up hitl too 2025-07-02 11:49:08 +10:00
Hamish Willee 93a4ff8d01 Rework to check-first 2025-07-02 11:49:08 +10:00
Beniamino Pozzan e3e48d01d3 docs(sih): just mention CONFIG_MODULES_SIMULATION_SIMULATOR_SIH
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-07-02 11:49:08 +10:00
Hamish Willee 36485a0920 Split out the firmware setup 2025-07-02 11:49:08 +10:00
Beniamino Pozzan 8998a5baf9 docs(sih): Update instructions for sih
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-07-02 11:49:08 +10:00
Beniamino Pozzan af5f2f8b74 docs(hitl): Update instructions for hitl simulations
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-07-02 11:49:08 +10:00
Crowdin Bot 0f57d634f4 New Crowdin translations - ko 2025-07-02 09:11:14 +10:00
Crowdin Bot 9ed47b87f7 New Crowdin translations - uk 2025-07-02 09:10:43 +10:00
Crowdin Bot f180cf8b03 New Crowdin translations - zh-CN 2025-07-02 09:10:08 +10:00
chfriedrich98 5bb183afde Update fmu rover builds (#25139)
* rover: add rover build for all fmu versions

* rover: remove board specific exclusion of rover airframes
2025-07-01 10:31:12 -08:00
Ramon Roche 725d800a38 boards: save flash for KakuteH7-Wing 2025-07-01 10:23:49 -07:00
chfriedrich98 8af75adcbe gz: update submodule 2025-07-01 10:38:53 +02:00
chfriedrich98 5b1f58c069 differential: add generic differential rover gazebo airframe 2025-07-01 10:38:53 +02:00
Julian Oes 84c3abbba2 boards: LED fixup for Kakute 2025-07-01 10:48:18 +12:00
Julian Oes 75031fe375 boards: save flash on KakuteH7 dualimu
Due to trying to being compatible with the ArduPilot flash layout with
two sectors reserved for parameters.
2025-07-01 10:48:18 +12:00
Julian Oes 9cf3893266 boards: fixup image size of KakuteH7 dualimu
We have 1 sector for the bootloader and the last 2 for parameters.
That's to match how ArduPilot has it.
2025-07-01 10:48:18 +12:00
Julian Oes 8870d16ae0 Move NUM_MISSION_ITEMS_SUPPORTED to dataman
The define is used in dataman, not navigator, so this config variable
needs to be moved to the dataman module, otherwise it breaks the build
if navigator is not included in the build.
2025-07-01 10:25:00 +12:00
amovlgf fdef302e06 Add new Compass QMC5883P (#25115)
* add qmc5883p drivers

* format correction for qmc5883p

* make format

* remove extra newlines

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2025-06-30 10:33:21 -08:00
Hamish Willee acc12bb21d SIH Hexacopter X 2025-06-30 18:33:56 +02:00
Julian Oes e46e4dc80e commander: prevent race condition after mission
When a mission finishes with an RTL command, there's a race condition
between:
1. RTL command setting user_mode_intention RTL
2. Mission completion logic forcing LOITER

The auto-loiter transition was checking current nav_state (which is
still AUTO_MISSION) instead of any pending user_mode_intention,
causing it to override the RTL request.

Fix: Only auto-transition to loiter if no mode change is already
pending.
2025-06-30 09:20:44 -07:00
Julian Oes bfbd9bfe27 mavsdk_test: fix mission timeout check
We shouldn't adjust for lockstep speedup twice.
2025-06-30 09:20:44 -07:00
Julian Oes d03b1171f9 mavsdk_tests: fix mission finished state
This is an attempt to use MAVSDK's is_mission_finished APIs instead.
2025-06-30 09:20:44 -07:00
mahima-yoga 8c5dcbea12 mission: add RTL to is_mission_item_reached_or_completed()
This ensures that a mission is marked as completed when RTL is the last item or that the mission can continue if there is an intermediate RTL.
2025-06-30 09:20:44 -07:00
Matthias Grob daa491dc19 rc_update: make payload power switch an optional 3-way switch
to support 3 different power states for the payload.
2025-06-30 16:50:28 +02:00
Matthias Grob 1bccd5557a rc_update: add unit tests for two way payload power switch
with the intention to extend it to an optional 3 way switch.
2025-06-30 16:50:28 +02:00
Matthias Grob 8e7c2ed440 rc_update: allow payload power switch to be used for other boards than ARK FPV 2025-06-30 16:50:28 +02:00
Matthias Grob 64b92e46f8 rc_update: follow parameter member naming convention for payload power switch mapping 2025-06-30 16:50:28 +02:00
Matthias Grob fc3fd43fc7 rc_update: specify 2 decimal places for all float threshold parameter metadata 2025-06-30 16:50:28 +02:00
Beniamino Pozzan 6f972bbd43 chore: unify MC_RATE* param metadata (#25133)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-06-29 13:56:06 -08:00
Davide Iafrate 650320281b Add support for ICM42688P IMU on mamba f405 mk2 v2 target (#25047)
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2025-06-29 13:46:41 -08:00
Matthias Grob 2bc04f91f8 docs: fix all end of file newlines
Note: Some files are autogenerated and I did not yet
go through each source of generation to fix it there.
Instead I adjusted the filter to only exclude those
such that we can fix things in steps.
2025-06-26 11:03:23 -07:00
Matthias Grob e9bac962ab docs index: fix special character encoding to be UTF-8 2025-06-26 11:03:23 -07:00
Hamish Willee 35096d3278 Remove images not linked from docs 2025-06-26 13:13:30 +10:00
Hamish Willee b3441b7221 Remove legacy translations 2025-06-26 13:13:30 +10:00
Hamish Willee 2bda1b08c9 Add image to repo, prettier 2025-06-26 12:49:44 +10:00
Jakub Kákona 804af78245 Update docs/en/telemetry/index.md
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-06-26 12:49:44 +10:00
Jakub Kákona 56e8d23fb0 Adding the TFSIK01 page. 2025-06-26 12:49:44 +10:00
Jakub Kákona 3ea9069ada Adding TFSIK01 telemetry radio docs page. 2025-06-26 12:49:44 +10:00
Matthias Grob bb6d43d5e3 uavcan battery: add support for cuav::equipment::power::CBAT message
emitted by e.g. uavcan Tattu batteries.
2025-06-25 21:11:23 +02:00
Matthias Grob 30d4ff3c6c uavcan battery: fix battery_status.scale, time_remaining and timestamp
- timestamp was 0 if uavcan::BatteryInfo was received before uavcan::BatteryInfoAux
- scale was not set as unknown (-1) even though it is since it's never updated
- time_remaining was not initialized correctly and could sometimes be 0
  unexpectedly which causes the drone to failsafe because there's reportedly no flight time left
2025-06-25 21:11:23 +02:00
Marco Hauswirth adc299d019 remove paths-ignore in workflows to enable CI-checks for pure CI changes... 2025-06-25 08:04:43 -07:00
Jakub Kákona 1a52656e8a Update broken airspeed sensors links
Add new TFPITOT01 Pitot Tube
2025-06-25 16:38:23 +10:00
1262 changed files with 9142 additions and 14406 deletions
+10
View File
@@ -0,0 +1,10 @@
# Labeler configuration file for GitHub Actions
# The action is ./.github/workflows/label.yml
# Docs for the syntax in this file can be found at
# https://github.com/actions/labeler
# Add 'Documentation' label to any changes within 'docs' folder or any subfolders
"Documentation+📑":
- changed-files:
- any-glob-to-any-file: docs/**
+1 -1
View File
@@ -18,7 +18,7 @@ on:
- 'docs/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
+6 -4
View File
@@ -6,13 +6,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
@@ -41,7 +43,7 @@ jobs:
- name: Building [${{ matrix.check }}]
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev-nuttx-focal:2022-08-12
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
+1 -3
View File
@@ -6,13 +6,11 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
build:
runs-on: ubuntu-latest
+5 -3
View File
@@ -6,13 +6,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
+5 -3
View File
@@ -9,17 +9,19 @@ on:
- 'release/**'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
env:
RUNS_IN_DOCKER: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Build and Test
+5 -1
View File
@@ -11,7 +11,7 @@ on:
- 'v*'
pull_request:
branches:
- '*'
- '**'
paths:
- '.github/workflows/dev_container.yml'
- 'Tools/setup/ubuntu.sh'
@@ -30,6 +30,10 @@ on:
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
name: Set Tags and Variables
+2 -2
View File
@@ -9,7 +9,7 @@ on:
- 'docs/en/**'
pull_request:
branches:
- '*'
- '**'
paths:
- 'docs/en/**'
@@ -80,7 +80,7 @@ jobs:
- name: Deploy
run: |
git clone --single-branch --branch main --depth 1 https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/docs.px4.io.git
# make it an orphan branch
# make it an orphan branch
cd docs.px4.io
CURRENT_DATETIME=$(date +'%Y%m%d_%H_%M')
git checkout --orphan "${CURRENT_DATETIME}_main"
@@ -3,10 +3,9 @@ name: EKF Change Indicator
on:
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
unit_tests:
@@ -4,7 +4,6 @@ on:
push:
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
unit_tests:
+5 -3
View File
@@ -6,13 +6,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
+1 -3
View File
@@ -11,13 +11,11 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
env:
MIN_FLASH_POS_DIFF_FOR_COMMENT: 50
+5 -3
View File
@@ -9,13 +9,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_itcm:
+21
View File
@@ -0,0 +1,21 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
# The paths are set up in .github/labeler.yml
#
# See: https://github.com/actions/labeler
name: Labeler
on: [pull_request_target]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+5 -3
View File
@@ -6,13 +6,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
+5 -3
View File
@@ -6,13 +6,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
+5 -3
View File
@@ -6,13 +6,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
+1 -3
View File
@@ -6,13 +6,11 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
build:
@@ -17,6 +17,10 @@ on:
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
+6 -3
View File
@@ -5,16 +5,19 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Build and test
+5 -3
View File
@@ -11,13 +11,15 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '*'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
-2
View File
@@ -426,7 +426,6 @@ if(BUILD_TESTING)
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
endif()
#=============================================================================
# subdirectories
#
@@ -496,7 +495,6 @@ add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
include(bloaty)
include(doxygen)
include(metadata)
include(package)
File diff suppressed because it is too large Load Diff
+9 -8
View File
@@ -365,7 +365,7 @@ 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 extract_events px4_metadata
parameters_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
@@ -381,12 +381,6 @@ extract_events:
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
doxygen:
@mkdir -p "$(SRC_DIR)"/build/doxygen
@cd "$(SRC_DIR)"/build/doxygen && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DBUILD_DOXYGEN=ON
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
# Style
# --------------------------------------------------------------------
.PHONY: check_format format check_newlines
@@ -416,11 +410,18 @@ tests:
$(eval UBSAN_OPTIONS += color=always)
$(call cmake-build,px4_sitl_test)
# work around lcov bug #316; remove once lcov is fixed (see https://github.com/linux-test-project/lcov/issues/316)
LCOBUG = --ignore-errors mismatch
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory tests PX4_CMAKE_BUILD_TYPE=Coverage
@mkdir -p coverage
@lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info
@lcov --directory build/px4_sitl_test \
--base-directory build/px4_sitl_test \
--gcov-tool gcov \
--capture \
$(LCOBUG) \
-o coverage/lcov.info
rostest: px4_sitl_default
@@ -46,3 +46,22 @@ param set-default PWM_MAIN_FUNC3 203
param set-default PWM_MAIN_FUNC4 101
param set-default EKF2_GPS_DELAY 0
# Rate controllers
param set-default FW_RR_P 0.0500
param set-default FW_RR_I 2.0000
param set-default FW_RR_D 0.0000
param set-default FW_RR_FF 0.0000
param set-default FW_RR_IMAX 1.0000
param set-default FW_PR_P 0.0800
param set-default FW_PR_I 2.5000
param set-default FW_PR_D 0.0000
param set-default FW_PR_FF 0.0000
param set-default FW_PR_IMAX 1.0000
param set-default FW_YR_P 0.0500
param set-default FW_YR_I 3.0000
param set-default FW_YR_D 0.0000
param set-default FW_YR_FF 0.0000
param set-default FW_YR_IMAX 1.0000
@@ -39,7 +39,7 @@ param set-default RO_YAW_P 5
param set-default RO_SPEED_LIM 2
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.1
param set-defatul RO_SPEED_RED 1
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
@@ -0,0 +1,56 @@
#!/bin/sh
# @name Generic Differential Rover
# @type Rover
# @class Rover
. ${R}etc/init.d/rc.rover_differential_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=rover}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=rover_differential}
param set-default SIM_GZ_EN 1 # Gazebo bridge
param set-default NAV_ACC_RAD 0.5
# Differential Parameters
param set-default RD_WHEEL_TRACK 0.6
param set-default RD_TRANS_DRV_TRN 0.785398
param set-default RD_TRANS_TRN_DRV 0.174533
# Rate Control Parameters
param set-default RO_YAW_RATE_I 0.01
param set-default RO_YAW_RATE_P 0.25
param set-default RO_YAW_RATE_LIM 250
param set-default RO_YAW_ACCEL_LIM 400
param set-default RO_YAW_DECEL_LIM 800
param set-default RO_YAW_RATE_CORR 1
# Attitude Control Parameters
param set-default RO_YAW_P 5
# Velocity Control Parameters
param set-default RO_ACCEL_LIM 4
param set-default RO_DECEL_LIM 6
param set-default RO_JERK_LIM 10
param set-default RO_MAX_THR_SPEED 2
param set-default RO_SPEED_LIM 1.8
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.01
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
param set-default PP_LOOKAHD_MAX 10
param set-default PP_LOOKAHD_MIN 1
# Actuator mapping
param set-default SIM_GZ_WH_FUNC1 101 # right wheel
param set-default SIM_GZ_WH_MIN1 80
param set-default SIM_GZ_WH_MAX1 120
param set-default SIM_GZ_WH_DIS1 100
param set-default SIM_GZ_WH_FUNC2 102 # left wheel
param set-default SIM_GZ_WH_MIN2 80
param set-default SIM_GZ_WH_MAX2 120
param set-default SIM_GZ_WH_DIS2 100
@@ -114,6 +114,8 @@ px4_add_romfs_files(
17001_flightgear_tf-g1
17002_flightgear_tf-g2
50000_gz_rover_differential
71002_gz_spacecraft_2d
# [22000, 22999] Reserve for custom models
@@ -5,8 +5,5 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
@@ -7,9 +7,6 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
@@ -5,8 +5,5 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_ackermann_defaults
@@ -7,9 +7,6 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_ackermann_defaults
@@ -5,8 +5,5 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_mecanum_defaults
+1
View File
@@ -13,6 +13,7 @@ control_allocator start
#
# Start attitude controller.
#
fw_dyn_soar_control start
fw_rate_control start
fw_att_control start
fw_mode_manager start
+1
View File
@@ -234,6 +234,7 @@ then
lis3mdl -X -q -a 0x1c start
fi
qmc5883l -X -q start
qmc5883p -X -q start
rm3100 -X -q start
# start last (wait for possible icm20948 passthrough mode)
+2 -2
View File
@@ -224,7 +224,7 @@ else
# Look for airframe in ROMFS
. ${R}etc/init.d/rc.autostart
if [ ${VEHICLE_TYPE} == none ]
if [ ${VEHICLE_TYPE} = none ]
then
# Use external startup file
if [ $STORAGE_AVAILABLE = yes ]
@@ -235,7 +235,7 @@ else
fi
fi
if [ ${VEHICLE_TYPE} == none ]
if [ ${VEHICLE_TYPE} = none ]
then
echo "ERROR [init] No airframe file found for SYS_AUTOSTART value"
param set SYS_AUTOSTART 0
+2 -2
View File
@@ -3,14 +3,14 @@
return_value=0
# Check if there are files checked in that don't end in a newline (POSIX requirement)
git grep --cached -Il '' -- ':!docs/*' | xargs -L1 bash -c 'if test "$(tail -c 1 "$0")"; then echo "No new line at end of $0"; exit 1; fi'
git grep --cached -Il '' -- ':!docs/public/' ':!docs/ko/' ':!docs/uk/' ':!docs/zh/' | xargs -L1 bash -c 'if test "$(tail -c 1 "$0")"; then echo "No new line at end of $0"; exit 1; fi'
if [ $? -ne 0 ]; then
return_value=1
fi
# Check if there are files checked in that have duplicate newlines at the end (fail trailing whitespace checks)
git grep --cached -Il '' -- ':!docs/*' | xargs -L1 bash -c 'if tail -c 2 "$0" | ( read x && read y && [ x"$x" = x ] && [ x"$y" = x ]); then echo "Multiple newlines at the end of $0"; exit 1; fi'
git grep --cached -Il '' -- ':!docs/public/' ':!docs/ko/' ':!docs/uk/' ':!docs/zh/' | xargs -L1 bash -c 'if tail -c 2 "$0" | ( read x && read y && [ x"$x" = x ] && [ x"$y" = x ]); then echo "Multiple newlines at the end of $0"; exit 1; fi'
if [ $? -ne 0 ]; then
return_value=1
+1 -1
View File
@@ -5,7 +5,7 @@
set SERIAL_DEV none
{% for serial_device in serial_devices -%}
if param compare "$PRT" {{ serial_device.index }}; then
if [ "x$PRT_{{ serial_device.tag }}_" = "x" ]; then
if [ "$PRT_{{ serial_device.tag }}_" = "" ]; then
set SERIAL_DEV {{ serial_device.device }}
set BAUD_PARAM SER_{{ serial_device.tag }}_BAUD
set PRT_{{ serial_device.tag }}_ 1
@@ -14,6 +14,7 @@ CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
CONFIG_DRIVERS_PWM_OUT=y
@@ -5,14 +5,16 @@
board_adc start
if ! mpu6000 -R 6 -s start
then
if ! mpu6000 -R 6 -s start; then
# some boards such as the Hobbywing XRotor F4 G2 use the ICM-20602
icm20602 -s -R 6 start
if ! icm20602 -s -R 6 start; then
# The ICM-42688-P is used on the Diatone Mamba F405 MK2 v2
icm42688p -s -R 4 start
fi
fi
if ! hmc5883 -T -X start
then
then
if mpu9250_i2c -X -b 2 -a 0x68 -R 28 start; then
sleep 1 # wait for mpu9250 to be configured with bypass enabled
ak8963 -X -b 2 -R 30 start # -R 34
@@ -39,6 +39,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_MPU6000, SPI::CS{GPIO::PortA, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortA, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin4}),
}),
initSPIBus(SPI::Bus::SPI2, {
initSPIDevice(DRV_OSD_DEVTYPE_ATXXXX, SPI::CS{GPIO::PortB, GPIO::Pin12}),
@@ -6,6 +6,7 @@ CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS2"
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS3"
CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS5"
CONFIG_BOARD_SERIAL_RC="/dev/ttyS4"
CONFIG_BOARD_CONSTRAINED_FLASH=y
CONFIG_DRIVERS_ADC_BOARD_ADC=y
CONFIG_DRIVERS_BAROMETER_BMP280=y
CONFIG_DRIVERS_BAROMETER_GOERTEK_SPA06=y
@@ -62,7 +63,6 @@ CONFIG_MODULES_VTOL_ATT_CONTROL=y
CONFIG_SYSTEMCMDS_BSONDUMP=y
CONFIG_SYSTEMCMDS_DMESG=y
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
CONFIG_SYSTEMCMDS_LED_CONTROL=y
CONFIG_SYSTEMCMDS_MFT=y
CONFIG_SYSTEMCMDS_NSHTERM=y
CONFIG_SYSTEMCMDS_PARAM=y
@@ -6,6 +6,7 @@ CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS1"
CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS2"
CONFIG_BOARD_SERIAL_RC="/dev/ttyS4"
CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS5"
CONFIG_BOARD_CONSTRAINED_FLASH=y
CONFIG_DRIVERS_ADC_BOARD_ADC=y
CONFIG_DRIVERS_BATT_SMBUS=y
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP201XX=y
@@ -30,7 +31,6 @@ CONFIG_DRIVERS_UAVCAN=y
CONFIG_BOARD_UAVCAN_INTERFACES=1
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=6
CONFIG_MODULES_AIRSPEED_SELECTOR=y
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
CONFIG_MODULES_BATTERY_STATUS=y
CONFIG_MODULES_CAMERA_FEEDBACK=y
CONFIG_MODULES_COMMANDER=y
@@ -70,22 +70,17 @@ CONFIG_MODULES_NAVIGATOR=y
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_SENSORS=y
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
# CONFIG_MODULES_TEMPERATURE_COMPENSATION is not set
CONFIG_MODULES_VTOL_ATT_CONTROL=y
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
CONFIG_SYSTEMCMDS_BSONDUMP=y
CONFIG_SYSTEMCMDS_DMESG=y
CONFIG_SYSTEMCMDS_DUMPFILE=y
CONFIG_SYSTEMCMDS_GPIO=y
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
CONFIG_SYSTEMCMDS_LED_CONTROL=y
CONFIG_SYSTEMCMDS_MFT=y
CONFIG_SYSTEMCMDS_NSHTERM=y
CONFIG_SYSTEMCMDS_PARAM=y
CONFIG_SYSTEMCMDS_REBOOT=y
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
CONFIG_SYSTEMCMDS_TOP=y
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
CONFIG_SYSTEMCMDS_UORB=y
CONFIG_SYSTEMCMDS_USB_CONNECTED=y
@@ -7,7 +7,7 @@
"summary": "KAKUTEH7",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1835008,
"image_maxsize": 1703936,
"git_identity": "",
"board_revision": 0
}
@@ -110,7 +110,7 @@
MEMORY
{
ITCM_RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 1792K /* params in last sector */
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 1664K /* params in last two sectors */
DTCM1_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
DTCM2_RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 64K
@@ -72,7 +72,7 @@
#define BOARD_TYPE 5409
#define BOARD_FLASH_SECTORS (14)
#define BOARD_FLASH_SIZE (16 * 128 * 1024)
#define APP_RESERVATION_SIZE (1 * 128 * 1024)
#define APP_RESERVATION_SIZE (2 * 128 * 1024)
#define OSC_FREQ 8
+25 -2
View File
@@ -48,6 +48,11 @@
* of leds for system indication at will and there is no
* separate switch, we need to build independent of the
* CONFIG_ARCH_LEDS configuration switch.
*
* KakuteH7 DualIMU LED configuration:
* - Red LED (PE9): TRIP LED, active high
* - Blue LED (PC2): Status LED, active low
* - Green LED: Hardware controlled, always on when powered (no software control)
*/
__BEGIN_DECLS
extern void led_init(void);
@@ -56,11 +61,28 @@ extern void led_off(int led);
extern void led_toggle(int led);
__END_DECLS
#ifdef CONFIG_ARCH_LEDS
static bool nuttx_owns_leds = true;
// B R S G
// 0 1 2 3
static const uint8_t xlatpx4[] = {1, 0, 4, 2};
# define xlat(p) xlatpx4[(p)]
static uint32_t g_ledmap[] = {
GPIO_LED_RED, // Indexed by BOARD_LED_RED
GPIO_nLED_BLUE, // Indexed by BOARD_LED_BLUE
};
#define xlat(p) (p)
static bool g_led_inverted[] = {
false, // LED_RED is active high
true, // LED_BLUE is active low
};
#else
# define xlat(p) (p)
static uint32_t g_ledmap[] = {
GPIO_nLED_BLUE, // Indexed by LED_BLUE
GPIO_LED_RED, // Indexed by LED_RED
GPIO_LED_RED, // Indexed by LED_RED
};
static bool g_led_inverted[] = {
@@ -68,6 +90,7 @@ static bool g_led_inverted[] = {
false, // LED_RED is active high
};
#endif
__EXPORT void led_init(void)
{
+13 -11
View File
@@ -1,15 +1,17 @@
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_DRIVERS_CAMERA_CAPTURE=y
CONFIG_DRIVERS_CAMERA_TRIGGER=y
CONFIG_DRIVERS_OPTICAL_FLOW_PX4FLOW=y
CONFIG_MODULES_CAMERA_FEEDBACK=y
CONFIG_MODULES_LOAD_MON=y
CONFIG_MODULES_ROVER_POS_CONTROL=y
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
CONFIG_SYSTEMCMDS_PERF=y
CONFIG_SYSTEMCMDS_UORB=y
CONFIG_SYSTEMCMDS_USB_CONNECTED=y
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
+17
View File
@@ -0,0 +1,17 @@
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
+17
View File
@@ -0,0 +1,17 @@
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
+17
View File
@@ -0,0 +1,17 @@
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
-6
View File
@@ -1,23 +1,17 @@
CONFIG_DRIVERS_IRLOCK=n
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_UUV_ATT_CONTROL=n
CONFIG_MODULES_UUV_POS_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
# CONFIG_EKF2_WIND is not set
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
-3
View File
@@ -1,4 +1,3 @@
CONFIG_DRIVERS_IRLOCK=n
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
@@ -6,7 +5,6 @@ CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
@@ -14,7 +12,6 @@ CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
# CONFIG_EKF2_WIND is not set
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
-2
View File
@@ -5,7 +5,6 @@ CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
@@ -13,7 +12,6 @@ CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
# CONFIG_EKF2_WIND is not set
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
-2
View File
@@ -5,7 +5,6 @@ CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
@@ -13,7 +12,6 @@ CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
# CONFIG_EKF2_WIND is not set
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
-2
View File
@@ -5,7 +5,6 @@ CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
@@ -13,7 +12,6 @@ CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_ROBOCLAW=y
# CONFIG_EKF2_WIND is not set
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
+1 -4
View File
@@ -1,4 +1,3 @@
CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_SF45_SERIAL=n
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
@@ -6,16 +5,14 @@ CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_LOCAL_POSITION_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
CONFIG_MODULES_MC_POS_CONTROL=n
CONFIG_MODULES_MC_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_SF45_SERIAL=n
CONFIG_DRIVERS_ROBOCLAW=y
# CONFIG_EKF2_WIND is not set
CONFIG_MODULES_ROVER_ACKERMANN=y
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
CONFIG_MODULES_ROVER_MECANUM=y
+1
View File
@@ -17,6 +17,7 @@ CONFIG_MODULES_EKF2=y
CONFIG_EKF2_VERBOSE_STATUS=y
CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_DYN_SOAR_CONTROL=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
+34
View File
@@ -0,0 +1,34 @@
############################################################################
#
# Copyright (c) 2025 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
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
add_subdirectory(pwm_voltage)
+3
View File
@@ -20,6 +20,9 @@ CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_HEATER=y
CONFIG_DRIVERS_IMU_BOSCH_BMI088=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM45686=y
CONFIG_DRIVERS_IMU_INVENSENSE_IIM42653=y
CONFIG_DRIVERS_IMU_MURATA_SCH16T=y
CONFIG_DRIVERS_GNSS_SEPTENTRIO=y
CONFIG_COMMON_INS=y
CONFIG_COMMON_LIGHT=y
CONFIG_COMMON_MAGNETOMETER=y
BIN
View File
Binary file not shown.
+3
View File
@@ -27,3 +27,6 @@ else
fi
safety_button start
# pwm voltage 3.3V/5V switch
pwm_voltage_apply start
+21 -96
View File
@@ -43,6 +43,7 @@ then
set INA_CONFIGURED yes
fi
if param compare SENS_EN_INA238 1
then
# Start Digital power monitors
@@ -55,96 +56,35 @@ then
set INA_CONFIGURED yes
fi
#Start Auterion Power Module selector for zeroone boards
if ver hwbasecmp 009 010 011
if ver hwtypecmp ZeroOneX6000
then
pm_selector_auterion start
else
if [ $INA_CONFIGURED = no ]
then
# INA226, INA228, INA238 auto-start
i2c_launcher start -b 1
if [ $HAVE_PM2 = yes ]
then
i2c_launcher start -b 2
fi
fi
# Internal SPI bus icm45686 with SPIX
icm45686 -b 2 -s -R 6 start //X6 & X6 air
bmi088 -A -R 4 -s start //X6
bmi088 -G -R 4 -s start //X6
# Internal SPI bus icm45686 with SPIX
icm45686 -b 1 -s -R 8 start //X6 & X6 air
fi
# Keep nesting shallow
if ver hwtypecmp V6X006 V6X008
if ver hwtypecmp ZeroOneX6001 //X6 PRO
then
if ver hwtypecmp V6X006
then
# Internal SPI bus ICM45686
adis16470 -s -R 0 start
iim42652 -s -R 6 start
icm45686 -s -R 10 start
else
# Internal SPI bus 3x ICM45686
icm45686 -b 3 -s -R 0 start
icm45686 -b 2 -s -R 0 start
icm45686 -b 1 -s -R 10 start
fi
else
if ver hwtypecmp V6X004
then
# Internal SPI bus ICM20649
icm20649 -s -R 6 start
else
# Internal SPI BMI088
if ver hwbasecmp 009 010 011
then
bmi088 -A -R 6 -s start
bmi088 -G -R 6 -s start
else
if ver hwtypecmp V6X010
then
bmi088 -A -R 0 -s start
bmi088 -G -R 0 -s start
else
bmi088 -A -R 4 -s start
bmi088 -G -R 4 -s start
fi
fi
fi
# Internal SPI bus IIM42653 with SPIX
iim42653 -b 2 -s -R 6 start
# Internal SPI bus ICM42688p
if ver hwbasecmp 009 010 011
then
icm42688p -R 12 -s start
else
if ver hwtypecmp V6X010
then
icm42688p -R 14 -s start
else
icm45686 -b 1 -s -R 8 start //ZeroOne
fi
fi
bmi088 -A -R 4 -s start
bmi088 -G -R 4 -s start
if ver hwtypecmp V6X003 V6X004
then
# Internal SPI bus ICM-42670-P (hard-mounted)
icm42670p -R 10 -s start
else
if ver hwbasecmp 009 010 011
then
icm20602 -R 6 -s start
else
# Internal SPI bus ICM-20649 (hard-mounted)
icm45686 -b 2 -s -R 6 start //ZeroOne
fi
fi
# Internal SPI bus IIM42653 with SPIX
iim42653 -b 1 -s -R 8 start
fi
rm3100 -I -b 4 start
# Internal magnetometer on I2c
# if ver hwtypecmp V6X001
# then
# rm3100 -I -b 4 start
# else
# # Internal magnetometer on I2C
# bmm150 -I -R 0 start
# fi
# External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer)
ist8310 -X -b 1 -R 10 start
@@ -156,24 +96,9 @@ ist8310 start -I -a 0x0E -R 12
if param compare SENS_INT_BARO_EN 1
then
icp201xx -I -a 0x64 start
# if ver hwtypecmp V6X001 V6X006 V6X008
# then
# icp201xx -I -a 0x64 start
# else
# bmp388 -I -a 0x77 start
# fi
fi
icp201xx -X start
#external baro
# if ver hwtypecmp V6X001
# then
# icp201xx -X start
# else
# bmp388 -X start
# fi
# Baro on I2C3
ms5611 -X start
unset INA_CONFIGURED
unset HAVE_PM2
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2019 PX4 Development Team. All rights reserved.
# Copyright (c) 2025 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
@@ -31,31 +31,12 @@
#
############################################################################
# Doxygen
px4_add_module(
MODULE modules__pwm_voltage_apply
MAIN pwm_voltage_apply
option(BUILD_DOXYGEN "Build doxygen documentation" OFF)
if (BUILD_DOXYGEN)
find_package(Doxygen)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/Documentation/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target(doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation with Doxygen"
DEPENDS uorb_msgs parameters
VERBATIM
USES_TERMINAL
)
else()
message("Doxygen needs to be installed to generate documentation")
endif()
endif()
SRCS
pwm_voltage.cpp
DEPENDS
px4_work_queue
)
@@ -0,0 +1,43 @@
/****************************************************************************
*
* Copyright (c) 2025 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
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* Control PWM output voltage
*
* @value 0 3.3V
* @value 1 5.0V
*
* @reboot_required true
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_VOLT_SEL, 0);
@@ -0,0 +1,56 @@
/****************************************************************************
*
* Copyright (c) 2025 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
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#include <inttypes.h>
#include <stdint.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/module_params.h>
#include "board_config.h"
extern "C" int pwm_voltage_apply_main(int argc, char *argv[])
{
int32_t pwm_volt_sel = 0;
param_get(param_find("PWM_VOLT_SEL"), &pwm_volt_sel);
if (pwm_volt_sel != 0) {
PWM_5V_VOLT_SEL(true);
} else {
PWM_5V_VOLT_SEL(false);
}
return 0;
}
+10 -4
View File
@@ -215,10 +215,11 @@
#define GPIO_HW_VER_SENSE /* PH3 */ GPIO_ADC3_INP14
#define HW_INFO_INIT_PREFIX "ZeroOneX6"
#define BOARD_NUM_SPI_CFG_HW_VERSIONS 2
#define BOARD_NUM_SPI_CFG_HW_VERSIONS 3
// Base/FMUM
#define ZeroOneX6_0 HW_FMUM_ID(0x0) // ZeroOneX6, Sensor Set Rev 0
#define ZeroOneX6_1 HW_FMUM_ID(0x1) // ZeroOneX6, Sensor Set Rev 1
#define ZeroOneX6_0 HW_FMUM_ID(0x0) // ZeroOneX6,
#define ZeroOneX6_1 HW_FMUM_ID(0x1) // ZeroOneX6 Pro,
#define ZeroOneX6_2 HW_FMUM_ID(0x2) // reserved
#define UAVCAN_NUM_IFACES_RUNTIME 1
@@ -244,6 +245,10 @@
*/
#define DIRECT_PWM_OUTPUT_CHANNELS 9
/* PWM Power */
#define GPIO_PWM_VOLT_SEL /* PD15 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN6)
#define PWM_5V_VOLT_SEL(on_true) px4_arch_gpiowrite(GPIO_PWM_VOLT_SEL, (on_true))
/* Power supply control and monitoring GPIOs */
#define GPIO_nPOWER_IN_A /* PG1 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTG|GPIO_PIN1)
@@ -457,7 +462,8 @@
GPIO_nSAFETY_SWITCH_LED_OUT_INIT, \
GPIO_SAFETY_SWITCH_IN, \
GPIO_PG6, \
GPIO_nARMED_INIT \
GPIO_nARMED_INIT, \
GPIO_PWM_VOLT_SEL \
}
#define BOARD_ENABLE_CONSOLE_BUFFER
+23 -12
View File
@@ -47,10 +47,6 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin8}, SPI::DRDY{GPIO::PortI, GPIO::Pin7}),
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin4}, SPI::DRDY{GPIO::PortI, GPIO::Pin6}),
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
}),
@@ -60,21 +56,36 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}),
}),
initSPIFmumID(ZeroOneX6_1, { // Placeholder
initSPIFmumID(ZeroOneX6_1, { // X6 Pro
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_ICM45686, SPI::CS{GPIO::PortI, GPIO::Pin9}, SPI::DRDY{GPIO::PortF, GPIO::Pin2}),
initSPIDevice(DRV_IMU_DEVTYPE_IIM42653, SPI::CS{GPIO::PortI, GPIO::Pin9}, SPI::DRDY{GPIO::PortF, GPIO::Pin2}),
}, {GPIO::PortI, GPIO::Pin11}),
initSPIBus(SPI::Bus::SPI2, {
initSPIDevice(DRV_IMU_DEVTYPE_ICM45686, SPI::CS{GPIO::PortH, GPIO::Pin5}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
initSPIDevice(DRV_IMU_DEVTYPE_IIM42653, SPI::CS{GPIO::PortH, GPIO::Pin5}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
}, {GPIO::PortF, GPIO::Pin4}),
initSPIBus(SPI::Bus::SPI3, {
initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin8}, SPI::DRDY{GPIO::PortI, GPIO::Pin7}),
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin4}),
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin4}, SPI::DRDY{GPIO::PortI, GPIO::Pin6}),
}, {GPIO::PortE, GPIO::Pin7}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
}),
initSPIBusExternal(SPI::Bus::SPI6, {
initSPIConfigExternal(SPI::CS{GPIO::PortI, GPIO::Pin10}, SPI::DRDY{GPIO::PortD, GPIO::Pin11}),
initSPIConfigExternal(SPI::CS{GPIO::PortA, GPIO::Pin15}, SPI::DRDY{GPIO::PortD, GPIO::Pin12}),
}),
}),
initSPIFmumID(ZeroOneX6_2, { // reserved
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_IIM42653, SPI::CS{GPIO::PortI, GPIO::Pin9}, SPI::DRDY{GPIO::PortF, GPIO::Pin2}),
}, {GPIO::PortI, GPIO::Pin11}),
initSPIBus(SPI::Bus::SPI2, {
initSPIDevice(DRV_IMU_DEVTYPE_SCH16T, SPI::CS{GPIO::PortH, GPIO::Pin5}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
}, {GPIO::PortF, GPIO::Pin4}),
initSPIBus(SPI::Bus::SPI3, {
initSPIDevice(DRV_IMU_DEVTYPE_SCH16T, SPI::CS{GPIO::PortI, GPIO::Pin4}, SPI::DRDY{GPIO::PortI, GPIO::Pin6}),
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
}),
+14
View File
@@ -36,6 +36,20 @@ find_program(GENHTML_PATH genhtml)
message(STATUS "Building for code coverage")
if (CMAKE_BUILD_TYPE STREQUAL Coverage)
# Coverage instrumentation plus atomic updates
set(COVERAGE_FLAGS
--coverage
-fprofile-update=atomic
)
# Apply to every compile and link invocation
add_compile_options(${COVERAGE_FLAGS})
add_link_options(${COVERAGE_FLAGS})
message(STATUS "Coverage instrumentation enabled with flags: ${COVERAGE_FLAGS}")
endif()
# add code coverage build type
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
set(CMAKE_C_FLAGS_COVERAGE "--coverage -ftest-coverage -fdiagnostics-absolute-paths -O0 -fprofile-arcs -fno-inline-functions"
+1 -1
View File
@@ -18,4 +18,4 @@ yarn-error.log
# Generated alternative _summary.md
# **/*/_summary.md
# **/*/_summary.md
@@ -16,4 +16,4 @@
document.location.replace(this.to);
}
}
</script>
</script>
+1 -1
View File
@@ -159,4 +159,4 @@
.vp-doc img {
display: inline; /* block by default set by vitepress */
}
}
+1 -1
View File
@@ -1 +1 @@
docs.px4.io
docs.px4.io
+1 -1
View File
@@ -1011,4 +1011,4 @@
},
"hideReason": "intended"
}
]
]
+1 -1
View File
@@ -1 +1 @@
["en/_sidebar.md"]
["en/_sidebar.md"]
+1 -1
View File
@@ -219,4 +219,4 @@
d="M 113.51898,180.06889 V 245.764 l 2.6517,-0.0192 v -65.67586 z"
id="path4768"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" /></svg>
sodipodi:nodetypes="ccccc" /></svg>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

+1 -1
View File
@@ -141,4 +141,4 @@
style="opacity:1;fill:#4ec3e8;fill-opacity:1;stroke:none;stroke-width:0.11511399;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path969"
inkscape:connector-curvature="0" /></svg>
inkscape:connector-curvature="0" /></svg>

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

+1 -1
View File
@@ -81,4 +81,4 @@
d="m 54.341679,213.74572 c 2.37161,-3.60386 6.9481,-8.19494 7.64935,-9.88687 0.74741,1.64004 4.52647,6.50033 6.82427,9.88687"
id="path848"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" /></svg>
sodipodi:nodetypes="ccc" /></svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

@@ -768,4 +768,4 @@
id="text7995"><path
d="m 13.413827,163.09012 q 0.266666,-8.16667 7.8,-8.2 4.033334,0 6.166667,2.66666 1.400001,1.83334 1.400001,4.26667 -0.03333,4.4 -5.000001,7.13334 l -3.333333,1.8 q -3.100001,1.66666 -3.900001,3.53333 -0.266666,0.6 -0.366666,1.33333 h 12.433334 v 2.9 H 12.880493 q 0.233334,-4.26666 1.900001,-6.5 1.433333,-1.86666 4.733333,-3.73333 l 3.066667,-1.73333 q 3.166667,-1.86667 3.2,-4.66667 0,-2.4 -2,-3.7 -1.166667,-0.73334 -2.666667,-0.73334 -4.366667,0 -4.766667,5.43334 0,0.1 0,0.2 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.33333588px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1"
id="path4482" /></g></svg>
id="path4482" /></g></svg>

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

+1 -1
View File
@@ -142,4 +142,4 @@
id="text7999"><path
d="m 81.956066,73.258968 h -8.31978 v -3.33851 q 5.405207,-0.688899 6.994974,-1.90772 1.589767,-1.165829 2.702603,-4.928277 0.105985,-0.317953 0.211969,-0.635907 h 3.073549 v 37.571486 h -4.663315 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:52.99222565px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1;stroke-width:1.58976662px"
id="path10409" /></g></svg>
id="path10409" /></g></svg>

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -437,4 +437,4 @@
id="text14502"><path
d="m 168.38719,13.98896 h -5.23333 v -2.100001 q 3.4,-0.433333 4.4,-1.2 1,-0.733333 1.7,-3.0999999 0.0667,-0.2 0.13333,-0.4 h 1.93334 V 30.822294 h -2.93334 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.33333588px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1"
id="path19510" /></g></svg>
id="path19510" /></g></svg>

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

+1 -1
View File
@@ -437,4 +437,4 @@
id="text7995"><path
d="m 13.412346,163.07466 q 0.266666,-8.16667 7.8,-8.2 4.033334,0 6.166667,2.66667 1.400001,1.83333 1.400001,4.26666 -0.03333,4.4 -5.000001,7.13334 l -3.333333,1.8 q -3.100001,1.66667 -3.900001,3.53333 -0.266666,0.6 -0.366666,1.33334 h 12.433334 v 2.9 H 12.879012 q 0.233334,-4.26667 1.9,-6.5 1.433334,-1.86667 4.733334,-3.73334 l 3.066667,-1.73333 q 3.166667,-1.86667 3.2,-4.66667 0,-2.4 -2,-3.7 -1.166667,-0.73333 -2.666667,-0.73333 -4.366667,0 -4.766667,5.43333 0,0.1 0,0.2 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.33333588px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1"
id="path21558" /></g></svg>
id="path21558" /></g></svg>

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

@@ -517,4 +517,4 @@
id="text23152"><path
d="m 314.42237,352.32882 h -9.96667 v -3.1 l 10.73334,-14.86667 h 2.16666 v 15.33333 h 3.5 v 2.63334 h -3.5 v 5.66666 h -2.93333 z m 0,-2.63334 v -10.33333 l -7.4,10.33333 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.33333588px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1"
id="path23179" /></g></svg>
id="path23179" /></g></svg>

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

+1 -1
View File
@@ -587,4 +587,4 @@
id="text26711"><path
d="m 340.12534,283.78889 q 4.03334,1.96667 4.06667,5.90001 0,3.73333 -2.86667,5.76666 -2.1,1.53334 -5.06666,1.53334 -4.13334,0 -6.36667,-2.73334 -1.56667,-1.93333 -1.56667,-4.6 0.0333,-3.93333 4.03334,-5.86667 -2.4,-1.5 -2.93334,-3.1 -0.26666,-0.76666 -0.26666,-1.8 0,-3.3 2.7,-5.06666 1.86666,-1.23334 4.4,-1.23334 3.86666,0 5.83333,2.53334 1.26667,1.63333 1.26667,3.76666 0,2.26667 -1.5,3.63334 -0.66667,0.63333 -1.73334,1.26666 z m -3.86666,-8.6 q -2.7,0 -3.7,1.96667 -0.4,0.8 -0.4,1.76667 0,2.33333 2.03333,3.26666 0.93333,0.43334 2.06667,0.43334 2.66666,0 3.66666,-1.9 0.43334,-0.8 0.43334,-1.76667 0,-2.5 -2.16667,-3.4 -0.86667,-0.36667 -1.93333,-0.36667 z m 0,9.9 q -2.96667,0 -4.26667,2.13334 -0.66667,1.1 -0.66667,2.5 0,2.73333 2.2,4 1.16667,0.66667 2.66667,0.66667 3.03333,0 4.33333,-2.16667 0.66667,-1.1 0.66667,-2.5 0,-2.73334 -2.23333,-4 -1.2,-0.63334 -2.7,-0.63334 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.33333588px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1"
id="path26744" /></g></svg>
id="path26744" /></g></svg>

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@@ -515,4 +515,4 @@
id="text17133"><path
d="m 249.49387,294.29852 v 2.47091 q -6.74491,8.98209 -8.9487,18.03096 -0.40069,1.56936 -0.66781,3.17211 h -3.13872 q 1.66953,-7.27916 4.77486,-12.98897 1.86988,-3.40585 4.94182,-7.78003 h -12.78863 v -2.90498 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.39067459px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1;stroke-width:1.00172007px"
id="path17150" /></g></svg>
id="path17150" /></g></svg>

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

+1 -1
View File
@@ -295,4 +295,4 @@
id="text7991-1"><path
d="m 46.495037,331.13554 q 0.257652,-7.89058 7.536318,-7.92279 3.896985,0 5.958201,2.57652 1.352672,1.77135 1.352672,4.12243 -0.03221,4.25126 -4.830973,6.89219 l -3.220649,1.73915 q -2.995204,1.61032 -3.768159,3.41389 -0.257652,0.57971 -0.354272,1.28826 h 12.013021 v 2.80196 H 45.979733 q 0.225445,-4.12243 1.83577,-6.28027 1.384879,-1.80356 4.573321,-3.60712 l 2.962997,-1.67474 q 3.059617,-1.80356 3.091823,-4.50891 0,-2.31887 -1.932389,-3.57492 -1.127227,-0.70854 -2.576519,-0.70854 -4.21905,0 -4.605528,5.24966 0,0.0966 0,0.19323 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32.20648956px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1;stroke-width:0.96619457px"
id="path4610" /></g></svg>
id="path4610" /></g></svg>

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

@@ -285,4 +285,4 @@
id="text8003"><path
d="m 187.48118,356.35381 h -9.96667 v -3.1 l 10.73333,-14.86667 h 2.16667 v 15.33334 h 3.5 v 2.63333 h -3.5 v 5.66667 h -2.93333 z m 0,-2.63333 v -10.33334 l -7.4,10.33334 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.33333588px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1"
id="path8729" /></g></svg>
id="path8729" /></g></svg>

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@@ -383,4 +383,4 @@
id="text35807"><path
d="m 216.68527,341.75754 q -3.80654,0 -4.40757,3.67297 -0.0668,0.63442 -0.10017,1.40241 h -2.93838 q 0.13356,-7.01204 6.34422,-7.61307 0.53426,-0.0334 1.06851,-0.0334 4.67469,0 6.41101,3.13873 0.80137,1.46919 0.80137,3.37246 -0.0334,3.60619 -3.30568,4.90843 3.10534,1.0685 3.77315,3.60619 0.23374,0.90155 0.23374,2.03683 0,4.10705 -3.13873,6.11049 -2.03683,1.26885 -4.87504,1.26885 -6.54457,0 -7.64646,-6.14389 -0.10017,-0.73459 -0.16695,-1.50258 h 2.93838 q 0.26712,4.40757 3.77314,4.94182 0.56764,0.10018 1.20207,0.10018 3.47263,0 4.54113,-2.63787 0.3673,-0.96833 0.3673,-2.10361 -0.0668,-4.27401 -4.90843,-4.3074 l -1.23546,0.0334 h -0.3673 v -2.5043 q 3.77315,-0.0668 4.90843,-1.10189 0.90155,-0.86816 0.90155,-2.60447 0,-2.83821 -2.33735,-3.73976 -0.83476,-0.30051 -1.83648,-0.30051 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.39067459px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1;stroke-width:1.00172007px"
id="path35828" /></g></svg>
id="path35828" /></g></svg>

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

+1 -1
View File
@@ -386,4 +386,4 @@
id="text35807"><path
d="m 172.36484,326.83692 h -9.98381 v -3.10533 l 10.7518,-14.89224 h 2.17039 v 15.35971 h 3.50602 v 2.63786 h -3.50602 v 5.67642 h -2.93838 z m 0,-2.63786 v -10.35111 l -7.41273,10.35111 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.39067459px;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#ffffff;fill-opacity:1;stroke-width:1.00172007px"
id="path38394" /></g></svg>
id="path38394" /></g></svg>

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

+1 -1
View File
@@ -244,4 +244,4 @@
sodipodi:argument="-17.855951"
sodipodi:t0="0.99130303"
d="m 223.94673,38.425681 c -3.13084,3.863564 -7.10954,7.019918 -11.58403,9.189766"
transform="rotate(-64.14705,272.849,-49.763793)" /></svg>
transform="rotate(-64.14705,272.849,-49.763793)" /></svg>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 149 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 377 KiB

After

Width:  |  Height:  |  Size: 377 KiB

+73 -73
View File
@@ -31,16 +31,16 @@
%===================================================================================
% TIKZ PX4 CONTROLLERS
%===================================================================================
\begin{figure}[h]
\centering
% Define distances
\def\blockheight{7em}
\def\largeblockheight{1.45*\blockheight}
\def\blockwidth{3.9em}
\def\nodesep{1.15*\blockwidth}
\footnotesize
\begin{tikzpicture}[>={Stealth[inset=0pt,length=3pt,angle'=60,round]},
simple_block/.style = {draw, fill=light_blue, text centered, inner sep=0pt, text width=\blockwidth, minimum height=\blockheight},
@@ -50,82 +50,82 @@
]
\hspace{-1.05cm}
%===================================================================================
% Reference
\node (ref) [] {};
% Position controller
\path (ref.east)+(0.85*\nodesep,0) node (pos_ctrl) [simple_block] {Position Control};
\path (pos_ctrl.north)+(0,0) node (pos_ctrl_text) [no_border_block, anchor=south] {\textbf{P}};
\path (pos_ctrl.south)+(0.65*\nodesep, -0.075*\blockheight) node (pos_ctrl_freq_text) [no_border_block, anchor=north] {50 Hz};
% Velocity controller
\path (pos_ctrl.east)+(0.85*\nodesep,0) node (vel_ctrl) [simple_block] {Velocity Control};
\path (vel_ctrl.north)+(0,0) node (vel_ctrl_text) [no_border_block, anchor=south] {\textbf{PID}};
% Acceleration to Attitude
\path (vel_ctrl.north east)+(1.1*\nodesep,0) node (force_2_att) [larger_block, text width=5.6em] {Acceleration and Yaw to Attitude};
% Inertial Frame
\node[fit=(pos_ctrl) (vel_ctrl)] (inertial) [frame_block] {};
\path (inertial.south)+(0,0) node (inertial_text) [no_border_block, anchor=north] {Inertial Frame};
% Angle controller
\path (force_2_att.north east)+(0.95*\nodesep,0) node (angle_ctrl) [simple_block, anchor=north] {Angle Control};
\path (angle_ctrl.north)+(0,0) node (angle_ctrl_text) [no_border_block, anchor=south] {\textbf{P}};
\path (angle_ctrl.south)+(0, -0.075*\blockheight) node (angle_ctrl_freq_text) [no_border_block, anchor=north] {250 Hz};
% Angular Rate controller
\path (angle_ctrl.east)+(0.9*\nodesep,0) node (ang_vel_ctrl) [simple_block] {Angular Rate Control};
\path (ang_vel_ctrl.north)+(0,0) node (ang_vel_ctrl_text) [no_border_block, anchor=south] {\textbf{PID}};
\path (ang_vel_ctrl.south)+(0, -0.075*\blockheight) node (ang_vel_ctrl_freq_text) [no_border_block, anchor=north] {1 kHz};
% Mixer
\path (ang_vel_ctrl.north east)+(\nodesep,0) node (mixer) [larger_block, text width=3em] {Mixer};
% Body Frame
\node[fit=(angle_ctrl) (ang_vel_ctrl)] (body) [frame_block] {};
\path (body.south)+(0,0) node (body_text) [no_border_block, anchor=north] {Body Frame};
\path (mixer.east)+(0.5*\nodesep,0) node (cmd) [] {};
%===================================================================================
\path[draw,->] (ref.east) -- node[anchor=south, pos=0.05, align=left] {$\bm{X}_\text{sp}$} (pos_ctrl.west);
\path[draw,->] (pos_ctrl.east) -- node[anchor=south] {$\bm{V}_\text{sp}$} (vel_ctrl.west);
\path[draw,->] (vel_ctrl.east) -- node[anchor=south, pos=0.65] {$\bm{A}_\text{sp}$} (vel_ctrl.east -| force_2_att.west);
\path[draw,->] ([yshift=-0.25*\largeblockheight]force_2_att.west -| ref.east) -- node[anchor=south, pos=0] {$\psi_\text{sp}$} ([yshift=-0.25*\largeblockheight]force_2_att.west);
\path[draw,->] (force_2_att.east |- angle_ctrl.west) -- node[anchor=south, pos=0.4] {$\bm{q}_\text{sp}$} (angle_ctrl.west);
\path[draw,->] ([yshift=-0.25*\largeblockheight]force_2_att.east) -- node[text centered, inner sep=2pt, anchor=south, pos=0.915] {$\delta_{T_\text{sp}}$} ([yshift=-0.25*\largeblockheight]mixer.west);
\path[draw,->] (angle_ctrl.east) -- node[anchor=south] {$\bm{\Omega}_\text{sp}$} (ang_vel_ctrl.west);
\path[draw,->] ([yshift=0.25*\blockheight]ang_vel_ctrl.east) -- node[text centered, inner sep=2pt, anchor=south, pos=0.6] {$\delta_{A_\text{sp}}$} ([yshift=0.25*\blockheight]ang_vel_ctrl.east -| mixer.west);
\path[draw,->] (ang_vel_ctrl.east) -- node[text centered, inner sep=2pt, anchor=south, pos=0.6] {$\delta_{E_\text{sp}}$} (ang_vel_ctrl.east -| mixer.west);
\path[draw,->] ([yshift=-0.25*\blockheight]ang_vel_ctrl.east) -- node[text centered, inner sep=2pt, anchor=south, pos=0.6] {$\delta_{R_\text{sp}}$} ([yshift=-0.25*\blockheight]ang_vel_ctrl.east -| mixer.west);
\path[draw,->] (mixer.east) -- node[text centered, inner sep=5pt, anchor=south] {$\bm{T}_\text{sp}$} (cmd.west);
\end{tikzpicture}
\end{figure}
\clearpage
%===================================================================================
% TIKZ ANGULAR RATE CONTROL
%===================================================================================
\begin{figure}[ht]
\centering
% Define distances
\def\blockheight{2.2em}
\def\blockwidth{2.2em}
\def\nodesep{1.5*\blockwidth}
\begin{tikzpicture}[>={Stealth[inset=0pt,length=3pt,angle'=60,round]},
simple_block/.style = {draw, fill=light_blue, text centered, inner sep=0pt, minimum width=\blockwidth, minimum height=\blockheight},
frame_block/.style = {draw, text centered, inner ysep=1.25em, inner xsep=1.25em, dashed},
@@ -138,7 +138,7 @@
node at (sum.east) [port, left=1pt] {$#4$}
}
},
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
{
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{north east}}%
@@ -149,11 +149,11 @@
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,-.6) -- (-.6,-.6) -- (.6,.6) -- (1,.6);
}
},
sat_block_int/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
sat_block_int/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
{
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{north east}}%
@@ -170,7 +170,7 @@
]
%===================================================================================
\node[text centered] (ref) {};
% Controller
\path(ref)+(\nodesep,0) node (ref_sum) [sum={}{+}{-}{}] {};
\path(ref_sum)+(\nodesep,0) node (ctrl_k) [simple_block] {$K$};
@@ -184,12 +184,12 @@
\path(ctrl_i_gain)+(\nodesep,0) node (ctrl_sum) [sum={+}{+}{-}{}] {};
\path(ctrl_sum)+(\nodesep,0) node (sat_ctrl) [sat_block] {};
\path(sat_ctrl.east)+(0.675*\nodesep,0) node (ctrl) [] {};
\path(ref_sum.south |- ctrl_d_filt.west)+(-\nodesep,0) node(output) [] {};
%===================================================================================
\path[draw,->] (ref.east) -- node[anchor=south, pos=0] {$\Omega_\text{sp}$} (ref_sum.west);
\path[draw,->] (ref_sum.east) -- (ctrl_k.west);
\path[draw,->] (ctrl_k.east) -- (ctrl_i.west);
\path[draw,->] (output.east) |- node[anchor=south, pos=0] {$\Omega$} (ctrl_kd.west);
@@ -204,31 +204,31 @@
\path[draw,->] (ctrl_p_gain.east) -| (ctrl_sum.north);
\path[draw,->] (ctrl_sum.east) -- (sat_ctrl.west);
\path[draw,->] (sat_ctrl.east) -- node[anchor=south] {$\delta_\text{sp}$} (ctrl.west);
\end{tikzpicture}
\end{figure}
\clearpage
%===================================================================================
% TIKZ ANGLE CONTROL
%===================================================================================
\begin{figure}[ht]
\centering
\footnotesize
% Define distances
\def\blockheight{3em}
\def\blockwidth{3em}
\def\nodesep{2*\blockwidth}
\begin{tikzpicture}[>={Stealth[inset=0pt,length=3pt,angle'=60,round]},
simple_block/.style = {draw, fill=light_blue, text centered, inner sep=0pt, minimum width=\blockwidth, minimum height=\blockheight},
text_block/.style = {draw, fill=light_blue, text centered, inner sep=0pt, text width=2*\blockwidth, minimum height=\blockheight},
frame_block/.style = {draw, text centered, inner ysep=1.25em, inner xsep=1.25em, dashed},
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
{
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{north east}}%
@@ -239,17 +239,17 @@
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,-.6) -- (-.6,-.6) -- (.6,.6) -- (1,.6);
}
},
gain/.style = {draw, fill=light_blue, inner sep=0pt, isosceles triangle, minimum height=\blockheight, isosceles triangle apex angle=60},
]
\hspace{-0.7cm}
%===============================================================================
\node[text centered, yshift=0.25*\blockheight] (ref) {};
% Controller
\path(ref)+(0.75*\nodesep,-0.25*\blockheight) node (err_quat) [text_block] {Error quaternion};
\path(err_quat)+(1.5*\nodesep,0) node (select_axis) [text_block] {Extract component};
@@ -259,7 +259,7 @@
\path(mult)+(0.65*\nodesep, 0) node (p_gain) [gain] {\scriptsize $2 P$};
\path(p_gain)+(0.75*\nodesep, 0) node (sat_ctrl) [sat_block] {};
\path(sat_ctrl)+(0.75*\nodesep, 0) node (output) [] {};
%===============================================================================
\path[draw,->] (ref.east) -- node[text centered, anchor=south, pos=0.1] {$\bm{q}_\text{sp}$} ([yshift=0.25*\blockheight]err_quat.west);
\path[draw,->] ([yshift=-0.25*\blockheight]err_quat.west -| ref.east) -- node[text centered, anchor=north, pos=0.1] {$\bm{q}$} ([yshift=-0.25*\blockheight]err_quat.west);
@@ -272,23 +272,23 @@
\path[draw,->] (p_gain.east) -- (sat_ctrl.west);
\path[draw,->] (sat_ctrl.east) -- node[text centered, anchor=south] {$\Omega_\text{sp}$} (output.west);
\end{tikzpicture}
\end{figure}
\clearpage
%===================================================================================
% TIKZ VELOCITY CONTROL
%===================================================================================
\begin{figure}[ht]
\centering
% Define distances
\def\blockheight{2.2em}
\def\blockwidth{2.2em}
\def\nodesep{1.5*\blockwidth}
\begin{tikzpicture}[>={Stealth[inset=0pt,length=3pt,angle'=60,round]},
simple_block/.style = {draw, fill=light_blue, text centered, inner sep=0pt, minimum width=\blockwidth, minimum height=\blockheight},
frame_block/.style = {draw, text centered, inner ysep=1.25em, inner xsep=1.25em, dashed},
@@ -301,7 +301,7 @@
node at (sum.east) [port, left=1pt] {$#4$}
}
},
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
{
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{north east}}%
@@ -312,11 +312,11 @@
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,-.6) -- (-.6,-.6) -- (.6,.6) -- (1,.6);
}
},
sat_block_int/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
sat_block_int/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
{
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{north east}}%
@@ -333,7 +333,7 @@
]
%===================================================================================
\node[text centered] (ref) {};
% Controller
\path(ref)+(\nodesep,0) node (ref_sum) [sum={}{+}{-}{}] {};
\path(ref_sum)+(2*\nodesep,0) node (ctrl_i) [simple_block] {$\int$};
@@ -345,12 +345,12 @@
\path(ctrl_i_gain)+(\nodesep,0) node (ctrl_sum) [sum={+}{+}{-}{}] {};
\path(ctrl_sum)+(\nodesep,0) node (sat_ctrl) [sat_block] {};
\path(sat_ctrl.east)+(0.675*\nodesep,0) node (ctrl) [] {};
\path(ref_sum.south |- ctrl_d_filt.west)+(-\nodesep,0) node(output) [] {};
%===================================================================================
\path[draw,->] (ref.east) -- node[anchor=south, pos=0] {$V_\text{sp}$} (ref_sum.west);
\path[draw,->] (ref_sum.east) -- (ctrl_i.west);
\path[draw,->] (output.east) |- node[anchor=south, pos=0] {$V$} (ctrl_d_filt.west);
\path[draw,->] (output.east -| ref_sum.south) -- (ref_sum.south);
@@ -363,25 +363,25 @@
\path[draw,->] (ctrl_p_gain.east) -| (ctrl_sum.north);
\path[draw,->] (ctrl_sum.east) -- (sat_ctrl.west);
\path[draw,->] (sat_ctrl.east) -- node[anchor=south] {$A_\text{sp}$} (ctrl.west);
\end{tikzpicture}
\end{figure}
\clearpage
%===================================================================================
% TIKZ POSITION CONTROL
%===================================================================================
\begin{figure}[h]
\centering
% Define distances
\def\blockheight{2.2em}
\def\blockwidth{2.2em}
\def\nodesep{2*\blockwidth}
\begin{tikzpicture}[>={Stealth[inset=0pt,length=3pt,angle'=60,round]},
simple_block/.style = {draw, fill=light_blue, text centered, inner sep=0pt, minimum width=\blockwidth, minimum height=\blockheight},
frame_block/.style = {draw, text centered, inner ysep=1.25em, inner xsep=1.25em, dashed},
@@ -394,7 +394,7 @@
node at (sum.east) [port, left=1pt] {$#4$}
}
},
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
sat_block/.style = {draw, minimum width=\blockwidth, minimum height=\blockheight, path picture =
{
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{north east}}%
@@ -405,32 +405,32 @@
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw (-1,-.6) -- (-.6,-.6) -- (.6,.6) -- (1,.6);
}
}
]
%===============================================================================
\node[text centered] (ref) {};
% Controller
\path(ref)+(\nodesep,0) node (ref_sum) [sum={}{+}{-}{}] {};
\path(ref_sum)+(\nodesep,0) node (ctrl_p_gain) [simple_block] {$P$};
\path(ctrl_p_gain)+(\nodesep,0) node (sat_ctrl) [sat_block] {};
\path(sat_ctrl.east)+(\nodesep,0) node (ctrl) [] {};
\path(ref_sum.south)+(-\nodesep,-1.5*\blockheight) node(output) [] {};
%===============================================================================
\path[draw,->] (ref.east) -- node[anchor=south, pos=0] {$X_\text{sp}$} (ref_sum.west);
\path[draw,->] (output.east) -- node[anchor=south, pos=0] {$X$} (output.east -| ref_sum.south) -- (ref_sum.south);
\path[draw,->] (ref_sum.east) -- (ctrl_p_gain.west);
\path[draw,->] (ctrl_p_gain.east) -- (sat_ctrl.west);
\path[draw,->] (sat_ctrl.east) -- node[anchor=south] {$V_\text{sp}$} (ctrl.west);
\end{tikzpicture}
\end{figure}
\end{document}
\end{document}

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