Compare commits

...

104 Commits

Author SHA1 Message Date
Hamish Willee 461395b077 docs(update): RTL types 4-5 docs for PR26220 2026-03-18 10:15:12 +11:00
PX4BuildBot c9ee06ff17 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 21:12:26 +00:00
Matthias Grob 09cb22f799 refactor(commander): remove unused parameter COM_MOT_TEST_EN 2026-03-17 12:56:18 -08:00
ghohl-30 9a5034b187 commander: fix typo in COM_RC_STICK_OV documentation (#26777) 2026-03-17 12:44:20 -08:00
Matthias Grob efdd1e021f fix(rcS): reset the flight mode assignments during an airframe reset (#26773)
* fix(rcS): reset the flight mode assignments during an airframe reset

because there are many products that have a default flight mode assignment in the airframe file and if the user resets to airframe defaults the flight mode assignment stays custom and doesn't get reset to "factory settings". It's neither a unit specific calibration nor a parameter to track total flights or flight time. I suggest to reset it as well.

* fix(posix rcS): sync airframe reset with the px4 common startup script

to make simulation testing of an airframe reset more realistic.
2026-03-17 12:43:27 -08:00
PX4BuildBot 89068128cb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 20:14:33 +00:00
Marco Hauswirth f2608089fd fix(commander): decouple heading preflight check from attitude mode requirement 2026-03-17 20:47:12 +01:00
PX4BuildBot c7c0e830f1 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 19:44:30 +00:00
Marco Hauswirth 9fd967c857 fix(lib/events): add missing POSITION_SLOW and ALTITUDE_CRUISE to navigation_mode_groups 2026-03-17 20:27:52 +01:00
PX4BuildBot b066181512 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 17:54:55 +00:00
ttechnick c5b8eee4c3 fix(fw_att_control): fix comments / docs 2026-03-17 17:59:20 +01:00
ttechnick 3601a01594 feat(fw_att_control): limit turn coordination to normal flight 2026-03-17 17:59:20 +01:00
ttechnick ca4ae7cf41 feat(fw_att_control): use Axis angles instead of Euler Angles 2026-03-17 17:59:20 +01:00
ttechnick 22cad6ebf7 fix(fw_att_control): guard against 0 in param 2026-03-17 17:59:20 +01:00
ttechnick c0e7086d90 feat(fw_att_control): add derrivation of formulas
refactor(fw_att_control): move error calc to function
2026-03-17 17:59:20 +01:00
ttechnick 82bf75df0f docs(fw_att_ctrl): update quat turn coordination
fix(fw_att_control): use correct formula
2026-03-17 17:59:20 +01:00
ttechnick a42e7ebb2a feat(fw_att_control): add yaw rotation unit test 2026-03-17 17:59:20 +01:00
bresch c71e196dcf feat(fw q att control): improve pitchrate tracking using turn coordination constraint
refactor(fw_att_control): clean-up & optimization
2026-03-17 17:59:20 +01:00
ttechnick 00f952ed93 feat(fw_att_control): yaw error reallocation 2026-03-17 17:59:20 +01:00
ttechnick 7e5aca5540 feat(fw_att_control): magic numbers 2026-03-17 17:59:20 +01:00
ttechnick fdf258c2aa docs(fw_att_control): update docs 2026-03-17 17:59:20 +01:00
ttechnick 11ffa179bb docs(fw_att_control): update docs 2026-03-17 17:59:20 +01:00
ttechnick c4330f5a47 feat(fw_att_control): tilt-tracking controller 2026-03-17 17:59:20 +01:00
ttechnick e370b3f4b8 feat(fw_att_control): Add Initial Quat Controller + Debug topic
This commit introduces a new control mode for fixed-wing aircraft that
utilizes Euler angles for attitude control.
Additionally, a new logged topic has been added to facilitate debugging and
monitoring of the Euler rates setpoints during flight.
2026-03-17 17:59:20 +01:00
Eric Katzfey 9136c66b7e fix(voxl2): Added explicit port identifier on gps start command 2026-03-17 09:03:32 -07:00
PX4BuildBot 2ca42e5252 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-16 23:14:52 +00:00
Jacob Dahl 1e5a485424 docs(dronecan): add SENS_GPS_PRIME guidance for moving baseline GPS heading (#26769)
Recommend setting SENS_GPS_PRIME to the moving base CAN node ID
when using dual antenna GPS heading. The rover receiver in a
moving baseline configuration can experience degraded navigation
rate and increased data latency when corrections are intermittent,
making the moving base the better primary position source.
2026-03-16 15:06:41 -08:00
Gennaro Guidone 00b27c56a8 fix(mixer_module): change MixingOutput to use float outputs (#26724)
* refactor(mixer_module): change MixingOutput to use float outputs

MixingOutput now passes float values to output drivers instead of
uint16_t. This removes the need for the 8192 offset encoding and
allows reversible motors to receive negative values directly.

* fix(mixer_module): fix float safety issues

-EscClient and voxl2_io: replace outputs[i] with fabs(outputs[i]) > 0.fto fix compilation issues
-GZMixingInterface: add explicit double cast to prevent compilation error
-PWMSim: replaced unit16 cast with lroundf given that now motors outputs can be negative and casting a negative float to unit16 is undefinder behaviour
-mixer_module: same fix of PWM (unit126 cast on negative float is undefined behaviour)

* refactor(mixer_module): float rounding suggestions

* fix(pwm_sim): fix inverted disarmed condition

* fix(mixer_module): more float rounding improvements

* fix(mixer_module_tests): use casting method which are now in drivers for rounding tests

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-16 14:59:53 -08:00
Jacob Dahl 26c9ca115f fix(mathlib): rename euler312YawTest to match tested function (#26753)
* fix(mathlib): rename euler312YawTest to match tested function

The test calls getEuler321Yaw() but was named euler312YawTest.

Fixes #22103

* test(mathlib): add unit test for getEuler312Yaw

The existing test was named euler312YawTest but actually tested
getEuler321Yaw. Rename it and add a proper test for getEuler312Yaw
that verifies the quaternion and DCM overloads agree, and that
312 and 321 yaw match for a pure-yaw rotation.

Fixes #22103
2026-03-16 14:52:23 -08:00
Jacob Dahl ba5b96edbe fix(boards): correct GPIO_VDD_3V3_SENSORS_EN macro name (#26751)
* fix(fmu-v6c): correct GPIO_VDD_3V3_SENSORS_EN macro name

VDD_3V3_SENSORS_EN() referenced GPIO_VDD_3V3_SENSORS4_EN which
does not exist. The correct macro is GPIO_VDD_3V3_SENSORS_EN.

Fixes #26454

* fix(boards): rename VDD_3V3_SENSORS4_EN to VDD_3V3_SENSORS_EN

These boards have a single sensor power rail that was incorrectly
named SENSORS4_EN (copy-paste from boards with 4 rails). Rename
to SENSORS_EN to match the actual hardware.

Boards with legitimately numbered rails (fmu-v6xrt, x25-evo,
x25-super) are not changed.
2026-03-16 14:51:47 -08:00
Jacob Dahl a107179ce7 fix(commander): fix baro calibration infinite loop (#26752)
In dd2322d622, the local PressureToAltitude(pressure_pa, temperature)
was replaced with the shared getAltitudeFromPressure(pressure_pa,
pressure_sealevel_pa), but the call sites continued passing temperature
where sea-level pressure was expected. This caused the binary search to
never converge, hanging "commander calibrate baro" indefinitely.

The original function used measured temperature in its hypsometric
equation. The replacement uses standard atmosphere temperature (15C)
internally, which is sufficient since the calibration computes a
relative offset against GPS altitude.

- Pass kPressRefSeaLevelPa as the second argument instead of temperature
- Remove the now-unused temperature accumulation
- Replace unbounded while loop with iteration-capped for loop to prevent
  hangs from float precision stalls, matching VehicleAirData.cpp
2026-03-16 14:51:12 -08:00
Jacob Dahl d04858efe0 fix(uavcan): silence DroneCAN DSDL compiler build warnings (#26757)
Fix Python DeprecationWarning for invalid escape sequence in pyratemp.py
and replace deprecated FindPythonInterp CMake module in libuavcan.
2026-03-16 14:49:21 -08:00
Jacob Dahl 0b2e554202 refactor(voxl_esc): pass vehicle_control_mode_s and led_control_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 7d9484e7a6 refactor(flight_mode_manager): pass follow_target_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 37745a97d3 refactor(navigator): pass PositionYawSetpoint and loiter_point_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 6f7ae9b5e5 refactor(navigator): pass mission_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 43174bbf39 refactor(navigator): pass mission_item_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl aba4bbb1ab refactor(fw_mode_manager): pass position_setpoint_s by const reference 2026-03-16 14:48:13 -08:00
PX4BuildBot 346690ba75 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-16 22:07:50 +00:00
Ege Kural 113853f631 fix(ci): enable clang-tidy bugprone-unhandled-self-assignment / cert-oop54-cpp (#26767)
Signed-off-by: kuralme <kuralme@protonmail.com>
2026-03-16 13:59:06 -08:00
PX4BuildBot ed58a83a5c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-15 19:50:02 +00:00
Jacob Dahl 71e673bec2 fix(mc_rate_control): remove redundant uORB copy in rate setpoint path (#26755)
Subscription::update() already copies data into the destination buffer,
making the subsequent copy() call redundant. This eliminates an
unnecessary memcpy every cycle on the 400 Hz rate control loop.
2026-03-15 11:43:23 -08:00
PX4BuildBot 9535559025 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 20:58:23 +00:00
Jonas Eschmann 6f023d4c23 bumping mc_raptor blob submodule (to include license) (#26750) 2026-03-14 13:51:42 -07:00
PX4BuildBot 082beb885d docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 09:25:59 +00:00
Matthias Grob 6b5147110b refactor(commander): remove needless parameter COM_KILL_DISARM (#26736) 2026-03-14 01:09:28 -08:00
Matthias Grob 576e336849 refactor(commander): remove useless parameter COM_FLT_PROFILE (#26735) 2026-03-14 01:07:34 -08:00
PX4BuildBot 74408c0558 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 09:03:45 +00:00
Matthias Grob 0e9d563570 fix(mavlink): limit ADSB transponder reporting to 5Hz to not spam the link (#26733)
Note that internally higher update rates are likely also not useful but this needs to be carefully checked with the interface. It seems like the ADSB driver keeps track of what to publish when which is not a scalable/well-testable solution.
2026-03-14 00:57:07 -08:00
Ramon Roche 50dabd8fae docs(project): add CITATION.cff with Zenodo DOI
Add a CITATION.cff file so GitHub shows a "Cite this repository"
button. Lists the project founder and "The PX4 Contributors",
linking to the Zenodo concept DOI (10.5281/zenodo.595432).

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:17:15 -07:00
Ramon Roche f5d9491c6a docs(project): add OpenSSF Best Practices badge to README
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:17:15 -07:00
PX4BuildBot 8316d026e1 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 01:15:31 +00:00
Ramon Roche e303e4ccfb mavlink: log handler cleanup: remove unused filepath and opendir
- Use %*s in state_listing() to skip filepath that was parsed but never used
- Remove unused opendir()/closedir() in log_entry_from_id()

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:08:29 -07:00
Ramon Roche 616b25a280 mavlink: fix stack buffer overflow in log handler filepath parsing
- Size LogEntry.filepath to PX4_MAX_FILEPATH instead of hardcoded 60 bytes
- Add width specifier to sscanf calls to prevent buffer overflow
- Move platform defines from .cpp to .h for reuse
- Add static_assert to enforce scanf width < buffer size at compile time

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 18:08:29 -07:00
Ramon Roche f11e2106af fix(ci): remove deprecated v1 cache API from container build
RunsOn v2.12.0 (March 6, 2026) removed v1 cache toolkit support,
causing the buildx GHA cache proxy to return 404 for v1 endpoints.
This has broken container builds on main since March 12.

Removing the explicit version=1 parameter lets buildkit auto-detect
the v2 protocol, which is the only version now supported by both
GitHub (since April 2025) and RunsOn.

First build after this change will have a cold cache.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 13:59:54 -07:00
PX4BuildBot 2f3b7b7967 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-13 18:56:01 +00:00
Drone-Lab 4820a7d936 fix(navigator): fix bug in DO_CHANGE_ALTITUDE
Co-authored-by: Nathaniel-hl <3181616004@qq.com>
2026-03-13 10:48:06 -08:00
PX4BuildBot ff1e898b72 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-13 17:56:44 +00:00
Ramon Roche 73884312da fix(mavlink): remove all stale mavlink_tests references
The mavlink_tests module was deleted in 1009268d31 but several
references were left behind, breaking builds on all targets.

Removed:
- CMakeLists.txt: add_subdirectory(mavlink_tests)
- mavlink_ftp.cpp: #include of deleted mavlink_ftp_test.h
- mavlink_ftp.h: MavlinkFtpTest forward decl and friend class
- posix-configs/SITL/init/test/test_mavlink: dead init script
- sitl_tests.cmake: sitl-mavlink CTest target
- install-voxl.sh: px4-mavlink_tests symlink

Ref: https://github.com/PX4/PX4-Autopilot/issues/26738
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 10:49:02 -07:00
Jacob Dahl b8610ca6f4 fix(nxp/linker): remove deprecated function signatures 2026-03-13 17:46:31 +01:00
bresch cdcdd1096f fix(ekf2): add missing in_transition flag 2026-03-13 17:46:31 +01:00
bresch acab9fdceb chore(ekf2): update change indicator
Initialization slightly changes as no zero innovation update is used
anymore
2026-03-13 17:46:31 +01:00
bresch 074e787a91 feat(ekf2): remove zero innovation heading update
This is no longer necessary with the heading observability check
2026-03-13 17:46:31 +01:00
bresch 643c6fec24 feat(ekf2): clear heading correlation with other states when not observable 2026-03-13 17:46:31 +01:00
Ramon Roche 2d79b9ea38 fix(zenoh): validate payload size before stack allocation
Reject Zenoh payloads that exceed the expected uORB topic size plus
CDR header (4 bytes), or that are too small to contain a valid CDR
header. This prevents a stack overflow from crafted network input
where z_bytes_len(payload) controls a VLA allocation.

Fixes GHSA-69g4-hcqf-j45p

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:39:05 -07:00
Ramon Roche afd327b322 fix(mavlink): correct session validation in FTP write and burst operations
Use logical OR (||) instead of AND (&&) in _workWrite() and _workBurst()
session validation, matching the correct logic already used in _workRead()
and _workTerminate(). The AND operator allowed operations to proceed with
an invalid session ID as long as a valid file descriptor existed.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:34:27 -07:00
Ramon Roche 1009268d31 refactor(mavlink): remove dead FTP unit test code
Remove the old MAVLINK_FTP_UNIT_TEST infrastructure that has been dead
code for years (not enabled in any board config). This includes:

- src/modules/mavlink/mavlink_tests/ directory (test suite, CMakeLists)
- All #ifdef MAVLINK_FTP_UNIT_TEST blocks in mavlink_ftp.cpp
- set_unittest_worker() callback mechanism in mavlink_ftp.h
- Conditional uAvionix include in mavlink_bridge_header.h

The test suite will be ported to GTest as a follow-up.

Ref: https://github.com/PX4/PX4-Autopilot/issues/26738
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:31:20 -07:00
Ramon Roche 4e6e2c059c fix(mavlink): reject path traversal sequences in FTP operations
Add _validatePath() that rejects paths containing ".." components,
preventing directory traversal outside the FTP root directory.
Applied to all FTP operation handlers (list, open, remove, truncate,
rename, mkdir, rmdir, CRC32).

Fixes GHSA-fh32-qxj9-x32f, GHSA-pm28-2j4f-8jxv

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:31:20 -07:00
PX4BuildBot 42bedcb753 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-13 16:24:01 +00:00
Ramon Roche 3f04b7a95a fix(tattu_can): validate CAN frame bounds before buffer copy
Add bounds checking in the CAN frame assembly loop to prevent a buffer
overflow when copying payloads into the Tattu12SBatteryMessage struct.
A crafted CAN frame with a corrupt payload_size could write past the
48-byte struct boundary. Also guard against payload_size of 0 which
would cause an unsigned integer underflow on the size_t subtraction.

Fixes GHSA-wxwm-xmx9-hr32

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:16:01 -07:00
Ramon Roche bf4fac7e61 fix(crsf_rc): validate variable-length packet size before buffer copy
Variable-length known packet types (CRSF_PACKET_TYPE_ELRS_STATUS,
CRSF_PACKET_TYPE_LINK_STATISTICS_TX, CRSF_PACKET_TYPE_MSP_WRITE)
bypassed the bounds check that exists for unknown packets. A crafted
packet with a large size field could overflow the 64-byte process_buffer
during QueueBuffer_PeekBuffer() in the CRC state.

Apply the same CRSF_MAX_PACKET_LEN bounds check to variable-length
known packets that already exists for unknown packets.

Fixes GHSA-mqgj-hh4g-fg5p

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:13:06 -07:00
Ramon Roche e8e86a2e0f fix(telemetry/bst): validate reply length and dev_name_len before use
Reject replies with length >= sizeof(BSTPacket) to prevent OOB read
in CRC calculation. Clamp dev_name_len to buffer size to prevent OOB
write during null termination.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 09:12:40 -07:00
Ramon Roche a9f2e0e44e fix(ci): correct metadata artifact paths in package_build_artifacts.sh
airframes.xml and all_events.json.xz on the px4-travis S3 bucket have
been stale since October 2025 because package_build_artifacts.sh had
wrong paths for both files after the migration from metadata.yml to
build_all_targets.yml.

- airframes.xml: SITL builds produce it under docs/, not at the build
  root (only NuttX does that). Use explicit file checks to try both.
- all_events.json.xz: was copied flat into artifacts/$build_dir/ but
  the _general section expected it under events/. Preserve the
  subdirectory so the copy to _general/ actually finds the file.
- Remove duplicate cp lines that were misleadingly commented as
  "ROS 2 msgs".
- Fail with an error when critical _general metadata files are missing
  rather than silently producing incomplete artifacts.

Also uploaded fresh metadata to S3 manually to unblock Flight Review.

Fixes #26713

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-12 20:16:05 -07:00
PX4BuildBot 59ded6affd docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-12 20:51:32 +00:00
Ege Kural 4a33fb169f fix(ci): enable clang-tidy bugprone-macro-parentheses (#26722)
Signed-off-by: kuralme <kuralme@protonmail.com>
2026-03-12 12:42:07 -08:00
Ramon Roche 11700382f6 docs(contributing): add coding standards and test policy
Add explicit coding standards section referencing astyle and
clang-tidy enforcement. Add formal test policy requiring tests
where practical and types of tests table.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-12 13:15:45 -07:00
Ramon Roche 3f0ddf9793 docs(security): update policy for OpenSSF badge
Update supported versions to 1.16.x, add response process with
7-day acknowledgment timeline, reporter credit policy, and secure
development practices section.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-12 13:15:45 -07:00
Ramon Roche 400bb253bd docs(mavlink): security hardening guide for production deployments (#26730)
* docs(mavlink): add security hardening guide for production deployments

Add a dedicated security hardening page covering MAVLink authentication
risks, a hardening checklist (enable signing, secure physical access,
secure network links), and integrator responsibility for deployment
security. Add a warning block to the main MAVLink page linking to the
new guide.

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-12 12:53:29 -07:00
PX4BuildBot d6e31f59cf docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-12 19:52:00 +00:00
Ramon Roche 3ed2f23d9c fix(build): resolve Dependabot security alerts (#26729)
Fix 4 Dependabot alerts:
- CVE-2021-34141: remove duplicate vulnerable numpy==1.21.5 pin
- markdown-it ReDoS (>= 13.0.0, < 14.1.1): add yarn resolution to 14.1.1
- preact JSON VNode injection: resolved by yarn upgrade to 10.29.0
- esbuild dev server request leak (<= 0.24.2): add yarn resolution to 0.25.0

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-12 12:40:35 -07:00
Balduin ab6c9b7909 docs(ekf2): clarify EKF2_HGT_REF param description (#26725)
* docs(ekf2): clarify EKF2_HGT_REF param description

To me it was not obvious that with EKF2_GPS_CTRL=0 this altitude
initialisation based on GPS again does not apply.

* docs(ekf2): separate paragraph
2026-03-12 11:30:22 -08:00
PX4BuildBot eeb251aa52 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-12 17:47:04 +00:00
Matthias Grob 7b3fe3478b ESC check cleanup 2026-03-12 18:30:51 +01:00
ttechnick 7aa28de922 ESC check: use constants for ESC timeout 2026-03-12 18:30:51 +01:00
Matthias Grob a9461c4d1a escCheck: Change MOTFAIL_TIME unit to seconds for better UX 2026-03-12 18:30:51 +01:00
Matthias Grob fb9f8d1835 escCheck: remove thrust threshold above which current model applies
The newer upper lower bound offset current model should apply more accurately and not require a lower bount for thrust where there's no detection.
2026-03-12 18:30:51 +01:00
Matthias Grob 6361b4cd7e Unify motor function mapping checks to only depend on the interface 2026-03-12 18:30:51 +01:00
Matthias Grob 8bb82c70ee escCheck: structure suggestions 2026-03-12 18:30:51 +01:00
Matthias Grob 0071699348 HealthChecks: correct indentation for EVENT metadata 2026-03-12 18:30:51 +01:00
Matthias Grob 54df6d64a6 Commander: move FD_ACT_EN to esc check 2026-03-12 18:30:51 +01:00
Matthias Grob 7207c34c5b Commander: avoid leaking health checks into failure detector 2026-03-12 18:30:51 +01:00
Matthias Grob 270ad06e5f Remove traces of FD_ESCS_EN 2026-03-12 18:30:51 +01:00
Matthias Grob 8bafcfbac7 Rename parameters file for ESC checks 2026-03-12 18:30:51 +01:00
Matthias Grob 2ff83e7e7c escCheck: rename MOTFAIL_TOUT -> MOTFAIL_TIME and further cleanup 2026-03-12 18:30:51 +01:00
Matthias Grob 035ccc8395 FailureDetector: disarm again with ESC failures during spoolup 2026-03-12 18:30:51 +01:00
Matthias Grob 7d84911668 FailureDetector: remove obsolete subscriptions 2026-03-12 18:30:51 +01:00
ttechnick 4e279b16c2 uavcan: optimization and edge cases 2026-03-12 18:30:51 +01:00
ttechnick c5652b2084 escChecks: param reorg
Reorganise parameters
fix esc & motor indices
set failsafe flags
2026-03-12 18:30:51 +01:00
ttechnick 03fc051c29 uavcan:fix check 2026-03-12 18:30:51 +01:00
ttechnick 96c5c7ba02 work on: feed back checks to commander 2026-03-12 18:30:51 +01:00
ttechnick e9874b6f05 ensure motor faults are cleared 2026-03-12 18:30:51 +01:00
ttechnick 15f5a18629 uavcan: cleanup 2026-03-12 18:30:51 +01:00
ttechnick b2ea7ffab6 fd: reorganise motor & esc failures 2026-03-12 18:30:51 +01:00
ttechnick 9f978b05f3 uavcan: unify timeout handling 2026-03-12 18:30:51 +01:00
201 changed files with 3031 additions and 4383 deletions
-3
View File
@@ -141,8 +141,6 @@ Checks: '*,
-cppcoreguidelines-avoid-goto,
-hicpp-avoid-goto,
-bugprone-branch-clone,
-bugprone-unhandled-self-assignment,
-cert-oop54-cpp,
-performance-enum-size,
-readability-avoid-nested-conditional-operator,
-cppcoreguidelines-prefer-member-initializer,
@@ -150,7 +148,6 @@ Checks: '*,
-readability-convert-member-functions-to-static,
-readability-make-member-function-const,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-signed-char-misuse,
-cppcoreguidelines-avoid-non-const-global-variables,
+2 -2
View File
@@ -130,8 +130,8 @@ jobs:
load: false
push: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
provenance: false
cache-from: type=gha,version=1,scope=${{ matrix.arch }}
cache-to: type=gha,version=1,mode=max,scope=${{ matrix.arch }}
cache-from: type=gha,scope=${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
deploy:
name: Deploy To Registry
+27
View File
@@ -0,0 +1,27 @@
cff-version: 1.2.0
title: "PX4 Autopilot"
message: "If you use PX4 in your research, please cite it using this metadata."
type: software
authors:
- family-names: Meier
given-names: Lorenz
- name: "The PX4 Contributors"
repository-code: "https://github.com/PX4/PX4-Autopilot"
url: "https://px4.io"
abstract: >-
PX4 is an open-source autopilot stack for drones and
unmanned vehicles. It supports multirotors, fixed-wing,
VTOL, rovers, and many more platforms. PX4 runs on both
RTOS and POSIX-compatible operating systems.
keywords:
- autopilot
- drone
- uav
- flight-controller
- robotics
- ros2
license: BSD-3-Clause
identifiers:
- type: doi
value: "10.5281/zenodo.595432"
description: "Zenodo concept DOI (resolves to latest version)"
+21 -1
View File
@@ -16,7 +16,13 @@ git checkout -b mydescriptivebranchname
## Edit and build the code
The [developer guide](https://docs.px4.io/main/en/development/development.html) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](https://docs.px4.io/main/en/contribute/code.html) when editing files.
The [developer guide](https://docs.px4.io/main/en/development/development.html) explains how to set up the development environment on Mac OS, Linux or Windows.
### Coding standards
All C/C++ code must follow the [PX4 coding style](https://docs.px4.io/main/en/contribute/code.html). Formatting is enforced by [astyle](http://astyle.sourceforge.net/) in CI (`make check_format`). Code quality checks run via [clang-tidy](https://clang.llvm.org/extra/clang-tidy/). Pull requests that fail either check will not be merged.
Python code is checked with [mypy](https://mypy-lang.org/) and [flake8](https://flake8.pycqa.org/).
## Commit message convention
@@ -141,6 +147,20 @@ git push --force-with-lease
## Test your changes
PX4 is safety-critical software. All contributions must include adequate testing where practical:
- **New features** must include unit tests and/or integration tests that exercise the new functionality, where practical. Hardware-dependent changes that cannot be tested in SITL should include bench test or flight test evidence.
- **Bug fixes** must include a regression test where practical. When automated testing is not feasible (hardware-specific issues, race conditions, etc.), provide a link to a flight log demonstrating the fix and the reproduction steps for the original bug.
- **Reviewers** will verify that tests or test evidence exist before approving a pull request.
### Types of tests
| Test type | When to use | How to run |
|-----------|-------------|------------|
| **Unit tests** (gtest) | Module-level logic, math, parsing | `make tests` |
| **SITL integration tests** (MAVSDK) | Flight behavior, failsafes, missions | `test/mavsdk_tests/` |
| **Bench tests / flight logs** | Hardware-dependent changes | Upload logs to [Flight Review](https://logs.px4.io) |
Since we care about safety, we will regularly ask you for test results. Best is to do a test flight (or bench test where it applies) and upload the log file from it (on the microSD card in the logs directory) to Google Drive or Dropbox and share the link.
## Push your changes
+1
View File
@@ -10,6 +10,7 @@
<p align="center">
<a href="https://github.com/PX4/PX4-Autopilot/releases"><img src="https://img.shields.io/github/release/PX4/PX4-Autopilot.svg" alt="Releases"></a>
<a href="https://www.bestpractices.dev/projects/6520"><img src="https://www.bestpractices.dev/projects/6520/badge" alt="OpenSSF Best Practices"></a>
<a href="https://zenodo.org/badge/latestdoi/22634/PX4/PX4-Autopilot"><img src="https://zenodo.org/badge/22634/PX4/PX4-Autopilot.svg" alt="DOI"></a>
<a href="https://github.com/PX4/PX4-Autopilot/actions/workflows/build_all_targets.yml"><img src="https://github.com/PX4/PX4-Autopilot/actions/workflows/build_all_targets.yml/badge.svg?branch=main" alt="Build Targets"></a>
<a href="https://discord.gg/dronecode"><img src="https://discordapp.com/api/guilds/1022170275984457759/widget.png?style=shield" alt="Discord"></a>
@@ -44,8 +44,6 @@ param set-default FW_T_SINK_MIN 3
param set-default FW_W_EN 1
param set-default FD_ESCS_EN 0
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
@@ -104,4 +104,3 @@ param set-default VT_FWD_THRUST_EN 4
param set-default VT_PITCH_MIN -5
param set-default VT_F_TRANS_THR 1
param set-default VT_TYPE 2
param set-default FD_ESCS_EN 0
@@ -26,7 +26,6 @@ param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
param set-default COM_ARM_CHK_ESCS 0 # We don't have ESCs
param set-default FD_ESCS_EN 0 # We don't have ESCs - but maybe we need this later?
# Set proper failsafes
param set-default COM_ACT_FAIL_ACT 0
@@ -28,7 +28,6 @@ param set-default SIM_GZ_EN 1
param set-default SENS_EN_MAGSIM 1
param set-default COM_ARM_CHK_ESCS 0 # We don't have ESCs
param set-default FD_ESCS_EN 0
param set-default CA_AIRFRAME 14
param set-default MAV_TYPE 45
@@ -28,7 +28,6 @@ param set-default SIM_GZ_EN 1
param set-default SENS_EN_MAGSIM 1
param set-default COM_ARM_CHK_ESCS 0 # We don't have ESCs
param set-default FD_ESCS_EN 0
param set-default CA_AIRFRAME 14
param set-default MAV_TYPE 45
+4 -3
View File
@@ -119,10 +119,11 @@ else
param set SYS_AUTOCONFIG 1
fi
if param compare SYS_AUTOCONFIG 1
# To trigger a parameter reset during boot SYS_AUTCONFIG was set to 1 before
if param greater SYS_AUTOCONFIG 0
then
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, total flight time, flight UUID
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* LND_FLIGHT* TC_* COM_FLIGHT*
set AUTOCNF yes
fi
+2 -2
View File
@@ -191,8 +191,8 @@ else
# To trigger a parameter reset during boot SYS_AUTCONFIG was set to 1 before
if param greater SYS_AUTOCONFIG 0
then
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, flight modes, total flight time, flight UUID
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, total flight time, flight UUID
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* LND_FLIGHT* TC_* COM_FLIGHT*
fi
#
+28 -12
View File
@@ -2,24 +2,40 @@
## Supported Versions
The following is a list of versions the development team is currently supporting.
The following versions receive security updates:
| Version | Supported |
| ------- | ------------------ |
| 1.4.x | :white_check_mark: |
| 1.3.3 | :white_check_mark: |
| < 1.3 | :x: |
| 1.16.x | :white_check_mark: |
| < 1.16 | :x: |
## Reporting a Vulnerability
We currently only receive security vulnerability reports through GitHub.
We receive security vulnerability reports through GitHub Security Advisories.
To begin a report, please go to the top-level repository, for example, PX4/PX4-Autopilot,
and click on the Security tab. If you are on mobile, click the ... dropdown menu, and then click Security.
To begin a report, go to the [PX4/PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) repository
and click on the **Security** tab. If you are on mobile, click the **...** dropdown menu, then click **Security**.
Click Report a Vulnerability to open the advisory form. Fill in the advisory details form.
Make sure your title is descriptive, and the development team can find all of the relevant details needed
to verify on the description box. We recommend you add as much data as possible. We welcome logs,
screenshots, photos, and videos, anything that can help us verify and identify the issues being reported.
Click **Report a Vulnerability** to open the advisory form. Fill in the advisory details form.
Make sure your title is descriptive and the description contains all relevant details needed
to verify the issue. We welcome logs, screenshots, photos, and videos.
At the bottom of the form, click Submit report. The maintainer team will be notified and will get back to you ASAP.
At the bottom of the form, click **Submit report**.
## Response Process
1. **Acknowledgment**: The maintainer team will acknowledge your report within **7 days**.
2. **Triage**: We will assess severity and impact and communicate next steps.
3. **Disclosure**: We coordinate disclosure with the reporter. We follow responsible disclosure practices and will credit reporters in the advisory unless they request anonymity.
If you do not receive acknowledgment within 7 days, please follow up by emailing the [release managers](MAINTAINERS.md).
## Secure Development Practices
The PX4 development team applies the following practices to reduce security risk:
- **Code review**: All changes require peer review before merging.
- **Static analysis**: [clang-tidy](https://clang.llvm.org/extra/clang-tidy/) runs on every pull request with warnings treated as errors.
- **Fuzzing**: A daily fuzzing pipeline using [Google fuzztest](https://github.com/google/fuzztest) tests MAVLink message handling and GNSS driver protocol parsing.
- **Input validation**: All external inputs (MAVLink messages, RC signals, sensor data) are validated against expected ranges before use.
- **Compiler hardening**: Builds use `-Wall -Werror`, stack protectors, and other hardening flags where supported by the target platform.
+32 -20
View File
@@ -6,32 +6,42 @@ cp **/**/*.elf artifacts/ 2>/dev/null || true
for build_dir_path in build/*/ ; do
build_dir_path=${build_dir_path::${#build_dir_path}-1}
build_dir=${build_dir_path#*/}
mkdir artifacts/$build_dir
mkdir -p artifacts/$build_dir
find artifacts/ -maxdepth 1 -type f -name "*$build_dir*"
# Airframe
cp $build_dir_path/airframes.xml artifacts/$build_dir/
# Airframe (NuttX: build root, SITL: docs/ subdirectory)
airframes_src=""
if [ -f "$build_dir_path/airframes.xml" ]; then
airframes_src="$build_dir_path/airframes.xml"
elif [ -f "$build_dir_path/docs/airframes.xml" ]; then
airframes_src="$build_dir_path/docs/airframes.xml"
fi
if [ -n "$airframes_src" ]; then
cp "$airframes_src" "artifacts/$build_dir/"
fi
# Parameters
cp $build_dir_path/parameters.xml artifacts/$build_dir/
cp $build_dir_path/parameters.json artifacts/$build_dir/
cp $build_dir_path/parameters.json.xz artifacts/$build_dir/
cp $build_dir_path/parameters.xml artifacts/$build_dir/ 2>/dev/null || true
cp $build_dir_path/parameters.json artifacts/$build_dir/ 2>/dev/null || true
cp $build_dir_path/parameters.json.xz artifacts/$build_dir/ 2>/dev/null || true
# Actuators
cp $build_dir_path/actuators.json artifacts/$build_dir/
cp $build_dir_path/actuators.json.xz artifacts/$build_dir/
cp $build_dir_path/actuators.json artifacts/$build_dir/ 2>/dev/null || true
cp $build_dir_path/actuators.json.xz artifacts/$build_dir/ 2>/dev/null || true
# Events
cp $build_dir_path/events/all_events.json.xz artifacts/$build_dir/
# ROS 2 msgs
cp $build_dir_path/events/all_events.json.xz artifacts/$build_dir/
# Module Docs
mkdir -p artifacts/$build_dir/events/
cp $build_dir_path/events/all_events.json.xz artifacts/$build_dir/events/ 2>/dev/null || true
ls -la artifacts/$build_dir
echo "----------"
done
if [ -d artifacts/px4_sitl_default ]; then
# general metadata
mkdir artifacts/_general/
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
# general metadata (used by Flight Review and other downstream consumers)
mkdir -p artifacts/_general/
# Airframe
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
if [ -f artifacts/px4_sitl_default/airframes.xml ]; then
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
else
echo "Error: expected 'artifacts/px4_sitl_default/airframes.xml' not found." >&2
exit 1
fi
# Parameters
cp artifacts/px4_sitl_default/parameters.xml artifacts/_general/
cp artifacts/px4_sitl_default/parameters.json artifacts/_general/
@@ -40,9 +50,11 @@ if [ -d artifacts/px4_sitl_default ]; then
cp artifacts/px4_sitl_default/actuators.json artifacts/_general/
cp artifacts/px4_sitl_default/actuators.json.xz artifacts/_general/
# Events
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
# ROS 2 msgs
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
# Module Docs
if [ -f artifacts/px4_sitl_default/events/all_events.json.xz ]; then
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
else
echo "Error: expected 'artifacts/px4_sitl_default/events/all_events.json.xz' not found." >&2
exit 1
fi
ls -la artifacts/_general/
fi
+3 -3
View File
@@ -259,7 +259,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -286,7 +286,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -452,7 +452,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+1 -1
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+3 -3
View File
@@ -273,7 +273,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -295,7 +295,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -455,7 +455,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -108,7 +108,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_HIPOWER_EN(false);
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
SPI6_RESET(true);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
@@ -124,7 +124,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_5V_PERIPH_EN(true);
@@ -221,7 +221,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
/* Power on Interfaces */
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
SPI6_RESET(false);
+2 -2
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -71,7 +71,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+2 -2
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
// initSPIBus(SPI::Bus::SPI5, {
// initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -69,7 +69,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
// initSPIBus(SPI::Bus::SPI5, {
// initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+3 -3
View File
@@ -262,7 +262,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -289,7 +289,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -453,7 +453,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -215,7 +215,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+1 -1
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+3 -3
View File
@@ -271,7 +271,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -297,7 +297,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -463,7 +463,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_SYNC, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+1 -1
View File
@@ -49,7 +49,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -65,7 +65,6 @@ adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-logger"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-manual_control"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-mavlink"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-mavlink_bridge"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-mavlink_tests"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-mb12xx"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-mc_att_control"
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-mc_pos_control"
+1 -1
View File
@@ -143,7 +143,7 @@ if [ "$GPS" != "NONE" ]; then
if [ "$PLATFORM" == "M0197" ]; then
gps start -d /dev/ttyHS7
else
qshell gps start
qshell gps start -d 6
fi
fi
@@ -202,7 +202,7 @@
*(.text._ZN21MavlinkStreamAltitude8get_sizeEv)
*(.text._ZN7Mavlink29check_requested_subscriptionsEv)
*(.text.imxrt_lpspi_setmode)
*(.text._ZN3Ekf34controlZeroInnovationHeadingUpdateEv)
*(.text._ZN3Ekf36uncorrelateAndLimitHeadingCovarianceEv)
*(.text.perf_begin)
*(.text.imxrt_lpspi_setfrequency)
*(.text._ZN17FlightModeManager9_initTaskE15FlightTaskIndex)
@@ -202,7 +202,7 @@
*(.text._ZN21MavlinkStreamAltitude8get_sizeEv)
*(.text._ZN7Mavlink29check_requested_subscriptionsEv)
*(.text.imxrt_lpspi_setmode)
*(.text._ZN3Ekf34controlZeroInnovationHeadingUpdateEv)
*(.text._ZN3Ekf36uncorrelateAndLimitHeadingCovarianceEv)
*(.text.perf_begin)
*(.text.imxrt_lpspi_setfrequency)
*(.text._ZN17FlightModeManager9_initTaskE15FlightTaskIndex)
+3 -3
View File
@@ -233,7 +233,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PF12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTF|GPIO_PIN12)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -258,7 +258,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -409,7 +409,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PH11, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -217,7 +217,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+3 -3
View File
@@ -49,7 +49,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -73,7 +73,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -96,7 +96,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+1 -1
View File
@@ -185,7 +185,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
/* Tone alarm output */
+3 -3
View File
@@ -268,7 +268,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -290,7 +290,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -454,7 +454,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+7 -7
View File
@@ -49,7 +49,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -73,7 +73,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -97,7 +97,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -120,7 +120,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -143,7 +143,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -166,7 +166,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -190,7 +190,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -205,7 +205,7 @@
*(.text._ZN21MavlinkStreamAltitude8get_sizeEv)
*(.text._ZN7Mavlink29check_requested_subscriptionsEv)
*(.text.imxrt_lpspi_setmode)
*(.text._ZN3Ekf34controlZeroInnovationHeadingUpdateEv)
*(.text._ZN3Ekf36uncorrelateAndLimitHeadingCovarianceEv)
*(.text.perf_begin)
*(.text.imxrt_lpspi_setfrequency)
*(.text._ZN17FlightModeManager9_initTaskE15FlightTaskIndex)
+1 -1
View File
@@ -161,7 +161,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
+3 -3
View File
@@ -108,7 +108,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -123,7 +123,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -212,7 +212,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
@@ -210,7 +210,7 @@
#define GPIO_VDD_3V5_LTE_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PF12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTF|GPIO_PIN12)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
/* Spare GPIO */
@@ -227,7 +227,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_3V5_LTE_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V5_LTE_nEN, on_true)
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, on_true)
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
/* Tone alarm output */
@@ -342,7 +342,7 @@
GPIO_VDD_3V5_LTE_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_PH11, \
GPIO_NFC_GPIO, \
GPIO_TONE_ALARM_IDLE, \
@@ -109,7 +109,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_3V5_LTE_EN(false);
VDD_5V_HIPOWER_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
/* wait for the peripheral rail to reach GND */
usleep(ms * 1000);
@@ -121,7 +121,7 @@ __EXPORT void board_peripheral_reset(int ms)
board_control_spi_sensors_power(true, 0xffff);
VDD_3V5_LTE_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
}
@@ -211,7 +211,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
/* Power on Interfaces */
VDD_3V5_LTE_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
/* Need hrt running before using the ADC */
+3 -3
View File
@@ -259,7 +259,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -276,7 +276,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -420,7 +420,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_ETH_POWER_EN, \
+1 -1
View File
@@ -212,7 +212,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+3 -3
View File
@@ -267,7 +267,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -289,7 +289,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -452,7 +452,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
@@ -2,7 +2,7 @@
#
# Stack: PX4 Pro
# Vehicle: Amovlab F410
# Version: 1.15.4
# Version: 1.15.4
# Git Revision: 99c40407ff000000
#
# Vehicle-Id Component-Id Name Value Type
@@ -301,7 +301,6 @@
1 1 COM_FLTMODE5 -1 6
1 1 COM_FLTMODE6 8 6
1 1 COM_FLTT_LOW_ACT 3 6
1 1 COM_FLT_PROFILE 0 6
1 1 COM_FLT_TIME_MAX -1 6
1 1 COM_FORCE_SAFETY 0 6
1 1 COM_HLDL_LOSS_T 120 6
@@ -309,10 +308,8 @@
1 1 COM_HOME_EN 1 6
1 1 COM_HOME_IN_AIR 0 6
1 1 COM_IMB_PROP_ACT 0 6
1 1 COM_KILL_DISARM 5.000000000000000000 9
1 1 COM_LKDOWN_TKO 3.000000000000000000 9
1 1 COM_LOW_BAT_ACT 0 6
1 1 COM_MOT_TEST_EN 1 6
1 1 COM_OBC_LOSS_T 5.000000000000000000 9
1 1 COM_OBL_RC_ACT 0 6
1 1 COM_OBS_AVOID 0 6
@@ -479,11 +476,6 @@
1 1 EKF2_WIND_NSD 0.050000000745058060 9
1 1 EV_TSK_RC_LOSS 0 6
1 1 EV_TSK_STAT_DIS 0 6
1 1 FD_ACT_EN 1 6
1 1 FD_ACT_MOT_C2T 2.000000000000000000 9
1 1 FD_ACT_MOT_THR 0.200000002980232239 9
1 1 FD_ACT_MOT_TOUT 100 6
1 1 FD_ESCS_EN 1 6
1 1 FD_EXT_ATS_EN 0 6
1 1 FD_EXT_ATS_TRIG 1900 6
1 1 FD_FAIL_P 60 6
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 110 KiB

+1
View File
@@ -759,6 +759,7 @@
- [Receiving Messages](mavlink/receiving_messages.md)
- [Custom MAVLink Messages](mavlink/custom_messages.md)
- [Message Signing](mavlink/message_signing.md)
- [Security Hardening](mavlink/security_hardening.md)
- [Protocols/Microservices](mavlink/protocols.md)
- [Standard Modes Protocol](mavlink/standard_modes.md)
- [uXRCE-DDS (PX4-ROS 2/DDS Bridge)](middleware/uxrce_dds.md)
+67 -125
View File
@@ -5499,7 +5499,7 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 128 | | 128 | |
| &nbsp; | 127 | 127 | | 127 | |
### RBCLW_DIS2 (`INT32`) {#RBCLW_DIS2}
@@ -5513,7 +5513,7 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 128 | | 128 | |
| &nbsp; | 127 | 127 | | 127 | |
### RBCLW_FAIL1 (`INT32`) {#RBCLW_FAIL1}
@@ -5701,7 +5701,7 @@ Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 256 | | 256 | |
| &nbsp; | 127 | 254 | | 254 | |
### RBCLW_MAX2 (`INT32`) {#RBCLW_MAX2}
@@ -5713,7 +5713,7 @@ Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 256 | | 256 | |
| &nbsp; | 127 | 254 | | 254 | |
### RBCLW_MIN1 (`INT32`) {#RBCLW_MIN1}
@@ -5725,7 +5725,7 @@ Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 128 | | 1 | |
| &nbsp; | 0 | 127 | | 0 | |
### RBCLW_MIN2 (`INT32`) {#RBCLW_MIN2}
@@ -5737,7 +5737,7 @@ Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 128 | | 1 | |
| &nbsp; | 0 | 127 | | 0 | |
### RBCLW_REV (`INT32`) {#RBCLW_REV}
@@ -18620,25 +18620,6 @@ the estimated time it takes to reach the RTL destination.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | 1 | 0 | |
### COM_FLT_PROFILE (`INT32`) {#COM_FLT_PROFILE}
User Flight Profile.
Describes the intended use of the vehicle.
Can be used by ground control software or log post processing.
This param does not influence the behavior within the firmware. This means for example the control logic is independent of the setting of this param (but depends on other params).
**Values:**
- `0`: Default
- `100`: Pro User
- `200`: Flight Tester
- `300`: Developer
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### COM_FLT_TIME_MAX (`INT32`) {#COM_FLT_TIME_MAX}
Maximum allowed flight time.
@@ -18732,16 +18713,6 @@ See also FD_IMB_PROP_THR to set the failure threshold.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | 1 | 0 | |
### COM_KILL_DISARM (`FLOAT`) {#COM_KILL_DISARM}
Timeout value for disarming when kill switch is engaged.
Use RC_MAP_KILL_SW to map a kill switch.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 30.0 | 0.1 | 5.0 | s |
### COM_LKDOWN_TKO (`FLOAT`) {#COM_LKDOWN_TKO}
Timeout for detecting a failure after takeoff.
@@ -18878,17 +18849,6 @@ By default disabled for safety reasons
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) | |
### COM_MOT_TEST_EN (`INT32`) {#COM_MOT_TEST_EN}
Enable Actuator Testing.
If set, enables the actuator test interface via MAVLink (ACTUATOR_TEST), that
allows spinning the motors and moving the servos for testing purposes.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ----------- | ---- |
| &nbsp; | | | | Enabled (1) | |
### COM_OBC_LOSS_T (`FLOAT`) {#COM_OBC_LOSS_T}
Time-out to wait when onboard computer connection is lost before warning about loss connection.
@@ -19134,7 +19094,7 @@ Note: Only has an effect on multicopters, and VTOLs in multicopter mode.
Stick override threshold.
If COM_RC_OVERRIDE is enabled and the joystick input is moved more than this threshold
the autopilot the pilot takes over control.
the pilot takes over control.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
@@ -20502,7 +20462,8 @@ Measurement noise for magnetic heading fusion.
Determines the reference source of height data used by the EKF.
When multiple height sources are enabled at the same time, the height estimate will always converge towards the reference height source selected by this parameter. The range sensor and vision options should only be used when for operation over a flat surface as the local NED origin will move up and down with ground level. If GPS is set as reference but altitude fusion is disabled in EKF2_GPS_CTRL, the GPS altitude is still used to initiaize the bias of the other height sensors.
When multiple height sources are enabled at the same time, the height estimate will always converge towards the reference height source selected by this parameter. The range sensor and vision options should only be used when for operation over a flat surface as the local NED origin will move up and down with ground level.
If GPS is set as reference and EKF2_GPS_CTRL is not 0, the GPS altitude is still used to initiaize the bias of the other height sensors, regardless of the altitude fusion bit in EKF2_GPS_CTRL.
**Values:**
@@ -22729,82 +22690,6 @@ Yaw rate proportional gain.
## Failure Detector
### FD_ACT_EN (`INT32`) {#FD_ACT_EN}
Enable Actuator Failure check.
If enabled, failure detector will verify that for motors, a minimum amount of ESC current per throttle
level is being consumed.
Otherwise this indicates an motor failure.
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------------ | ---- |
| &check; | | | | Disabled (0) | |
### FD_ACT_HIGH_OFF (`FLOAT`) {#FD_ACT_HIGH_OFF}
Overcurrent motor failure limit offset.
threshold = FD_ACT_MOT_C2T \* thrust + FD_ACT_HIGH_OFF
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 30 | 1 | 10. | A |
### FD_ACT_LOW_OFF (`FLOAT`) {#FD_ACT_LOW_OFF}
Undercurrent motor failure limit offset.
threshold = FD_ACT_MOT_C2T \* thrust - FD_ACT_LOW_OFF
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 30 | 1 | 10. | A |
### FD_ACT_MOT_C2T (`FLOAT`) {#FD_ACT_MOT_C2T}
Motor Failure Current/Throttle Scale.
Determines the slope between expected steady state current and linearized, normalized thrust command.
E.g. FD_ACT_MOT_C2T A represents the expected steady state current at 100%.
FD_ACT_LOW_OFF and FD_ACT_HIGH_OFF offset the threshold from that slope.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 50.0 | 1 | 35. | A/% |
### FD_ACT_MOT_THR (`FLOAT`) {#FD_ACT_MOT_THR}
Motor Failure Thrust Threshold.
Failure detection per motor only triggers above this thrust value.
Set to 1 to disable the detection.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 1.0 | 0.01 | 0.2 | norm |
### FD_ACT_MOT_TOUT (`INT32`) {#FD_ACT_MOT_TOUT}
Motor Failure Hysteresis Time.
Motor failure only triggers after current thresholds are exceeded for this time.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 10 | 10000 | 100 | 1000 | ms |
### FD_ESCS_EN (`INT32`) {#FD_ESCS_EN}
Enable checks on ESCs that report their arming state.
If enabled, failure detector will verify that all the ESCs have successfully armed when the vehicle has transitioned to the armed state.
Timeout for receiving an acknowledgement from the ESCs is 0.3s, if no feedback is received the failure detector will auto disarm the vehicle.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ----------- | ---- |
| &nbsp; | | | | Enabled (1) | |
### FD_EXT_ATS_EN (`INT32`) {#FD_EXT_ATS_EN}
Enable PWM input on for engaging failsafe from an external automatic trigger system (ATS).
@@ -28378,6 +28263,63 @@ needs to be changed to match a custom setting
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 | |
## Motor Failure
### FD_ACT_EN (`INT32`) {#FD_ACT_EN}
Enable Actuator Failure check.
If enabled, the HealthAndArmingChecks will verify that for motors, a minimum amount of ESC current per throttle
level is being consumed.
Otherwise this indicates an motor failure.
This check only works for ESCs that report current consumption.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) | |
### MOTFAIL_C2T (`FLOAT`) {#MOTFAIL_C2T}
Motor Failure Current/Throttle Scale.
Determines the slope between expected steady state current and linearized, normalized thrust command.
E.g. FD_ACT_MOT_C2T A represents the expected steady state current at 100%.
FD_ACT_LOW_OFF and FD_ACT_HIGH_OFF offset the threshold from that slope.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 50.0 | 1 | 35. | A/% |
### MOTFAIL_HIGH_OFF (`FLOAT`) {#MOTFAIL_HIGH_OFF}
Overcurrent motor failure limit offset.
threshold = FD_ACT_MOT_C2T \* thrust + FD_ACT_HIGH_OFF
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 30 | 1 | 10. | A |
### MOTFAIL_LOW_OFF (`FLOAT`) {#MOTFAIL_LOW_OFF}
Undercurrent motor failure limit offset.
threshold = FD_ACT_MOT_C2T \* thrust - FD_ACT_LOW_OFF
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 30 | 1 | 10. | A |
### MOTFAIL_TIME (`FLOAT`) {#MOTFAIL_TIME}
Motor Failure Hysteresis Time.
Motor failure only triggers after current thresholds are exceeded for this time.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.01 | 10 | 1 | 1. | s |
## Mount
### MNT_DO_STAB (`INT32`) {#MNT_DO_STAB}
@@ -32001,7 +31943,7 @@ Emergency Kill switch channel.
This channel immediately sets all outputs to their disarmed values, parachutes are NOT deployed.
Unlike termination this can be undone. Quickly flipping the switch back restores control.
System auto-disarms after COM_KILL_DISARM seconds, preflight checks and re-arming are then required.
System auto-disarms after 5 seconds, preflight checks and re-arming are then required.
**Values:**
-1
View File
@@ -660,7 +660,6 @@ For each of the tilt servos:
- If a safety button is used, it must be pressed before actuator testing is allowed.
- The kill-switch can still be used to stop motors immediately.
- Servos do not actually move until the corresponding slider is changed.
- The parameter [COM_MOT_TEST_EN](../advanced_config/parameter_reference.md#COM_MOT_TEST_EN) can be used to completely disable actuator testing.
- On the shell, [actuator_test](../modules/modules_command.md#actuator-test) can be used as well for actuator testing.
- VTOLs will automatically turn off motors pointing upwards during **fixed-wing flight**:
- Standard VTOL : Motors defined as multicopter motors will be turned off
+2 -6
View File
@@ -364,11 +364,7 @@ This section lists the available emergency switches.
A kill switch immediately stops all motor outputs — if flying, the vehicle will start to fall!
[By default](#COM_KILL_DISARM) the motors will restart if the switch is reverted within 5 seconds, after which the vehicle will automatically disarm, and you will need to arm it again in order to start the motors.
| Parameter | Description |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| <a id="COM_KILL_DISARM"></a>[COM_KILL_DISARM](../advanced_config/parameter_reference.md#COM_KILL_DISARM) | Timeout value for disarming after kill switch is engaged. Default: `5` seconds. |
The motors will restart if the switch is reverted within 5 seconds, after which the vehicle will automatically disarm, and you will need to arm it again in order to start the motors.
::: info
There is also a [Kill Gesture](#kill-gesture), which cannot be reverted.
@@ -410,7 +406,7 @@ A return switch can be used to immediately engage [Return mode](../flight_modes/
A kill gesture immediately stops all motor outputs — if flying, the vehicle will start to fall!
The action cannot be reverted without a reboot (this differs from a [Kill Switch](#kill-switch), where the operation can be reverted within the time period defined by [COM_KILL_DISARM](#COM_KILL_DISARM)).
The action cannot be reverted without a reboot (this differs from a [Kill Switch](#kill-switch), where the operation can be reverted within 5 seconds).
| Parameter | Description |
| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+3
View File
@@ -84,6 +84,7 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- If using [Moving Baseline & GPS Heading](#setting-up-moving-baseline--gps-heading), set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ module. The moving base is preferred because the rover receiver in a moving baseline configuration can experience degraded navigation rate and increased data latency when corrections are intermittent.
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK RTK GPS from the vehicles centre of gravity.
@@ -136,6 +137,7 @@ Setup via CAN:
- On the _Moving Base_, set the following:
- [GPS_UBX_MODE](../advanced_config/parameter_reference.md#GPS_UBX_MODE) to `4`.
- [CANNODE_PUB_MBD](../advanced_config/parameter_reference.md#CANNODE_PUB_MBD) to `1`.
- On the _Flight Controller_, set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ (see [PX4 Configuration](#px4-configuration)).
Setup via UART:
@@ -154,6 +156,7 @@ Setup via UART:
- [GPS_YAW_OFFSET](../advanced_config/parameter_reference.md#GPS_YAW_OFFSET) to `0` if your _Rover_ is in front of your _Moving Base_, `90` if _Rover_ is right of _Moving Base_, `180` if _Rover_ is behind _Moving Base_, or `270` if _Rover_ is left of _Moving Base_.
- On the _Moving Base_, set the following:
- [GPS_UBX_MODE](../advanced_config/parameter_reference.md#GPS_UBX_MODE) to `2`.
- On the _Flight Controller_, set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ (see [PX4 Configuration](#px4-configuration)).
For more information see [Rover and Moving Base](../dronecan/index.md#rover-and-moving-base) in the DroneCAN guide.
+53 -23
View File
@@ -4,11 +4,11 @@
The _Return_ flight mode is used to _fly a vehicle to safety_ on an unobstructed path to a safe destination, where it should land.
The following topics should be read first if you're using these vehicle types:
Each vehicle has a **default** return mode behavior which is described in the linked topics (read those first if you plan on using the defaults):
- [Multicopter](../flight_modes_mc/return.md)
- [Fixed-wing (Plane)](../flight_modes_fw/return.md)
- [VTOL](../flight_modes_vtol/return.md)
- [Multicopter](../flight_modes_mc/return.md) — Home/rally point return
- [Fixed-wing (Plane)](../flight_modes_fw/return.md) — Mission landing/Rally point return
- [VTOL](../flight_modes_vtol/return.md) — Mission landing/Rally point return
::: info
@@ -40,11 +40,9 @@ This topic covers all the possible return types that any vehicle _might_ be conf
The following sections explain how to configure the [return type](#return_types), [minimum return altitude](#minimum-return-altitude) and [landing/arrival behaviour](#loiter-landing-at-destination).
<a id="return_types"></a>
## Return Types (RTL_TYPE) {#return_types}
## Return Types (RTL_TYPE)
PX4 provides four alternative approaches for finding an unobstructed path to a safe destination and/or landing, which are set using the [RTL_TYPE](#RTL_TYPE) parameter.
PX4 provides a number of alternative approaches for finding an unobstructed path to a safe destination and/or landing, which are set using the [RTL_TYPE](#RTL_TYPE) parameter.
At high level these are:
@@ -56,12 +54,16 @@ At high level these are:
If no _mission_ defined, return direct to home (rally points are ignored).
- [Closest safe destination return](#closest-safe-destination-return-type-rtl-type-3) (`RTL_TYPE=3`): Ascend to a safe altitude and return via direct path to closest destination: home, start of mission landing pattern, or rally point.
If the destination is a mission landing pattern, follow the pattern to land.
- [Reverse mission return or mission landing](#mission-landing-or-reverse-mission-return-type-rtl-type-4) (`RTL_TYPE=4`): Return to the planned mission landing, or to home via the reverse mission path, whichever is closer (counted by waypoints).
Do not consider rally points.
If no mission is defined, return direct to home.
- [Safe point return](#safe-point-return-type-rtl-type-5) (`RTL_TYPE=5`): Return directly to the closest rally (safe) point.
Do not consider the home position or mission landing.
If no rally point is defined, descend and loiter at the current position.
More detailed explanations for each of the types are provided in the following sections.
<a id="home_return"></a>
### Home/Rally Point Return Type (RTL_TYPE=0)
### Home/Rally Point Return Type (RTL_TYPE=0) {#home_return}
This is the default return type for a [multicopter](../flight_modes_mc/return.md) (see topic for more information).
@@ -147,6 +149,34 @@ In this return type the vehicle:
By default an MC or VTOL in MC mode will land, and a fixed-wing vehicle circles at the descent altitude.
A VTOL in FW mode aligns its heading to the destination point, transitions to MC mode, and then lands.
### Mission Landing or Reverse Mission Return Type (RTL_TYPE=4)
This return type uses the mission (if defined) to provide a safe return path (either forward or in reverse), and the [mission landing pattern](#mission-landing-pattern) (if defined) to provide landing behaviour:
- If a mission landing pattern exists and it is closer (by waypoint count) than home via the reverse mission, the vehicle flies forward to the mission landing.
- Otherwise it flies the mission in reverse to return home.
- If no valid mission is defined, the vehicle returns directly to home.
- Rally points are ignored.
Note that this is similar to [RTL_TYPE=2](#mission-path-return-type-rtl-type-2), but the choice between fast-forward and fast-reverse is based on which destination is _closer by waypoint count_ rather than which flight mode is active when return mode is activated.
### Safe Point Return Type (RTL_TYPE=5)
In this return type the vehicle returns directly to the closest rally point (only).
Home position and mission landings are not considered.
The vehicle:
- Ascends to a safe [minimum return altitude](#minimum-return-altitude) (above any expected obstacles).
- Flies via a direct path to the closest rally point.
- On [arrival](#loiter-landing-at-destination) descends to the descent altitude and [lands or waits](#loiter-landing-at-destination) (depending on landing parameters).
If no rally point is defined, the vehicle will descend and loiter at its current position (it will not return to home).
::: info
This type is useful when the home position is not a safe return point.
:::
## Minimum Return Altitude
For most [return types](#return_types) a vehicle will ascend to a _minimum safe altitude_ before returning (unless already above that altitude), in order to avoid any obstacles between it and the destination.
@@ -205,15 +235,15 @@ For this reason fixed-wing vehicles are configured to use [Mission landing/reall
The RTL parameters are listed in [Parameter Reference > Return Mode](../advanced_config/parameter_reference.md#return-mode) (and summarised below).
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="RTL_TYPE"></a>[RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) | Return mechanism (path and destination).<br>`0`: Return to a rally point or home (whichever is closest) via direct path.<br>`1`: Return to a rally point or the mission landing pattern start point (whichever is closest), via direct path. If neither mission landing or rally points are defined return home via a direct path. If the destination is a mission landing pattern, follow the pattern to land.<br>`2`: Use mission path fast-forward to landing if a landing pattern is defined, otherwise fast-reverse to home. Ignore rally points. Fly direct to home if no mission plan is defined.<br>`3`: Return via direct path to closest destination: home, start of mission landing pattern or safe point. If the destination is a mission landing pattern, follow the pattern to land. |
| <a id="RTL_RETURN_ALT"></a>[RTL_RETURN_ALT](../advanced_config/parameter_reference.md#RTL_RETURN_ALT) | Return altitude in meters (default: 60m) when [RTL_CONE_ANG](../advanced_config/parameter_reference.md#RTL_CONE_ANG) is 0. If already above this value the vehicle will return at its current altitude. |
| <a id="RTL_DESCEND_ALT"></a>[RTL_DESCEND_ALT](../advanced_config/parameter_reference.md#RTL_DESCEND_ALT) | Minimum return altitude and altitude at which the vehicle will slow or stop its initial descent from a higher return altitude (default: 30m) |
| <a id="RTL_LAND_DELAY"></a>[RTL_LAND_DELAY](../advanced_config/parameter_reference.md#RTL_LAND_DELAY) | Time to wait at `RTL_DESCEND_ALT` before landing (default: 0.5s) -by default this period is short so that the vehicle will simply slow and then land immediately. If set to -1 the system will loiter at `RTL_DESCEND_ALT` rather than landing. The delay is provided to allow you to configure time for landing gear to be deployed (triggered automatically). |
| <a id="RTL_MIN_DIST"></a>[RTL_MIN_DIST](../advanced_config/parameter_reference.md#RTL_MIN_DIST) | Minimum horizontal distance from home position to trigger ascent to the return altitude specified by the "cone". If the vehicle is horizontally closer than this distance to home, it will return at its current altitude or `RTL_DESCEND_ALT` (whichever is higher) instead of first ascending to RTL_RETURN_ALT. |
| <a id="RTL_CONE_ANG"></a>[RTL_CONE_ANG](../advanced_config/parameter_reference.md#RTL_CONE_ANG) | Half-angle of the cone that defines the vehicle RTL return altitude. Values (in degrees): 0, 25, 45, 65, 80, 90. Note that 0 is "no cone" (always return at `RTL_RETURN_ALT` or higher), while 90 indicates that the vehicle must return at the current altitude or `RTL_DESCEND_ALT` (whichever is higher). |
| <a id="COM_RC_OVERRIDE"></a>[COM_RC_OVERRIDE](../advanced_config/parameter_reference.md#COM_RC_OVERRIDE) | Controls whether stick movement on a multicopter (or VTOL in MC mode) causes a mode change to [Position mode](../flight_modes_mc/position.md) (except when vehicle is handling a critical battery failsafe). This can be separately enabled for auto modes and for offboard mode, and is enabled in auto modes by default. |
| <a id="COM_RC_STICK_OV"></a>[COM_RC_STICK_OV](../advanced_config/parameter_reference.md#COM_RC_STICK_OV) | The amount of stick movement that causes a transition to [Position mode](../flight_modes_mc/position.md) (if [COM_RC_OVERRIDE](#COM_RC_OVERRIDE) is enabled). |
| <a id="RTL_LOITER_RAD"></a>[RTL_LOITER_RAD](../advanced_config/parameter_reference.md#RTL_LOITER_RAD) | [Fixed-wing Only] The radius of the loiter circle (at [RTL_LAND_DELAY](#RTL_LAND_DELAY)). |
| <a id="MIS_TKO_LAND_REQ"></a>[MIS_TKO_LAND_REQ](../advanced_config/parameter_reference.md#MIS_TKO_LAND_REQ) | Specify whether a mission landing or takeoff pattern is _required_. Generally fixed-wing vehicles set this to require a landing pattern but VTOL do not. |
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <a id="RTL_TYPE"></a>[RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) | Return mechanism (path and destination).<br>`0`: Return to a rally point or home (whichever is closest) via direct path.<br>`1`: Return to a rally point or the mission landing pattern start point (whichever is closest), via direct path. If neither mission landing or rally points are defined return home via a direct path. If the destination is a mission landing pattern, follow the pattern to land.<br>`2`: Use mission path fast-forward to landing if a landing pattern is defined, otherwise fast-reverse to home. Ignore rally points. Fly direct to home if no mission plan is defined.<br>`3`: Return via direct path to closest destination: home, start of mission landing pattern or safe point. If the destination is a mission landing pattern, follow the pattern to land.<br>`4`: Return home via the reverse mission path or to the planned mission landing, whichever is closer by waypoint count. Ignore rally points. Fly direct to home if no mission is defined.<br>`5`: Return directly to the closest rally point (safe point). Ignore home and mission landing. If no rally point is defined, descend at current position. |
| <a id="RTL_RETURN_ALT"></a>[RTL_RETURN_ALT](../advanced_config/parameter_reference.md#RTL_RETURN_ALT) | Return altitude in meters (default: 60m) when [RTL_CONE_ANG](../advanced_config/parameter_reference.md#RTL_CONE_ANG) is 0. If already above this value the vehicle will return at its current altitude. |
| <a id="RTL_DESCEND_ALT"></a>[RTL_DESCEND_ALT](../advanced_config/parameter_reference.md#RTL_DESCEND_ALT) | Minimum return altitude and altitude at which the vehicle will slow or stop its initial descent from a higher return altitude (default: 30m) |
| <a id="RTL_LAND_DELAY"></a>[RTL_LAND_DELAY](../advanced_config/parameter_reference.md#RTL_LAND_DELAY) | Time to wait at `RTL_DESCEND_ALT` before landing (default: 0.5s) -by default this period is short so that the vehicle will simply slow and then land immediately. If set to -1 the system will loiter at `RTL_DESCEND_ALT` rather than landing. The delay is provided to allow you to configure time for landing gear to be deployed (triggered automatically). |
| <a id="RTL_MIN_DIST"></a>[RTL_MIN_DIST](../advanced_config/parameter_reference.md#RTL_MIN_DIST) | Minimum horizontal distance from home position to trigger ascent to the return altitude specified by the "cone". If the vehicle is horizontally closer than this distance to home, it will return at its current altitude or `RTL_DESCEND_ALT` (whichever is higher) instead of first ascending to RTL_RETURN_ALT. |
| <a id="RTL_CONE_ANG"></a>[RTL_CONE_ANG](../advanced_config/parameter_reference.md#RTL_CONE_ANG) | Half-angle of the cone that defines the vehicle RTL return altitude. Values (in degrees): 0, 25, 45, 65, 80, 90. Note that 0 is "no cone" (always return at `RTL_RETURN_ALT` or higher), while 90 indicates that the vehicle must return at the current altitude or `RTL_DESCEND_ALT` (whichever is higher). |
| <a id="COM_RC_OVERRIDE"></a>[COM_RC_OVERRIDE](../advanced_config/parameter_reference.md#COM_RC_OVERRIDE) | Controls whether stick movement on a multicopter (or VTOL in MC mode) causes a mode change to [Position mode](../flight_modes_mc/position.md) (except when vehicle is handling a critical battery failsafe). This can be separately enabled for auto modes and for offboard mode, and is enabled in auto modes by default. |
| <a id="COM_RC_STICK_OV"></a>[COM_RC_STICK_OV](../advanced_config/parameter_reference.md#COM_RC_STICK_OV) | The amount of stick movement that causes a transition to [Position mode](../flight_modes_mc/position.md) (if [COM_RC_OVERRIDE](#COM_RC_OVERRIDE) is enabled). |
| <a id="RTL_LOITER_RAD"></a>[RTL_LOITER_RAD](../advanced_config/parameter_reference.md#RTL_LOITER_RAD) | [Fixed-wing Only] The radius of the loiter circle (at [RTL_LAND_DELAY](#RTL_LAND_DELAY)). |
| <a id="MIS_TKO_LAND_REQ"></a>[MIS_TKO_LAND_REQ](../advanced_config/parameter_reference.md#MIS_TKO_LAND_REQ) | Specify whether a mission landing or takeoff pattern is _required_. Generally fixed-wing vehicles set this to require a landing pattern but VTOL do not. |
+5
View File
@@ -4,6 +4,11 @@
The _Return_ flight mode is used to _fly a vehicle to safety_ on an unobstructed path to a safe destination, where it can land.
This topic describes the [Mission Landing/Rally Point](../flight_modes/return.md#mission-landing-rally-point-return-type-rtl-type-1) return type that FW vehicles use by default.
See the [Return Mode (Generic Vehicle)](../flight_modes/return.md#return-types-rtl-type) for an overview of the other supported types.
## Overview
Fixed-wing vehicles use the [Mission Landing/Rally Point](../flight_modes/return.md#mission-landing-rally-point-return-type-rtl-type-1) return type by default, and are expected to always have a mission with a landing pattern.
With this configuration, return mode causes the vehicle to ascend to a minimum safe altitude above obstructions (if needed), fly to the start of the landing pattern defined in the mission plan, and then follow it to land.
+5
View File
@@ -4,6 +4,11 @@
The _Return_ flight mode is used to _fly a vehicle to safety_ on an unobstructed path to a safe destination, where it can land.
This topic describes the [home/rally point return type](../flight_modes/return.md#home-rally-point-return-type-rtl-type-0) return type that MC vehicles use by default.
See the [Return Mode (Generic Vehicle)](../flight_modes/return.md#return-types-rtl-type) for an overview of the other supported types.
## Overview
Multicopters use a [home/rally point return type](../flight_modes/return.md#home-rally-point-return-type-rtl-type-0) by default.
In this return type vehicles ascend to a safe altitude above obstructions if needed, fly directly to the closest safe landing point (a rally point or the home position), descend to the "descent altitude", wait briefly, and then land.
The return altitude, descent altitude, and landing delay are normally set to conservative "safe" values, but can be changed if needed.
+5
View File
@@ -4,6 +4,11 @@
The _Return_ flight mode is used to _fly a vehicle to safety_ on an unobstructed path to a safe destination, where it may either wait (hover or circle) or land.
This topic describes the [Mission Landing/Rally Point](../flight_modes/return.md#mission-landing-rally-point-return-type-rtl-type-1) return type that VTOL vehicles use by default.
See the [Return Mode (Generic Vehicle)](../flight_modes/return.md#return-types-rtl-type) for an overview of the other supported types.
## Overview
VTOL vehicles use the [Mission Landing/Rally Point](../flight_modes/return.md#mission-landing-rally-point-return-type-rtl-type-1) return type by default.
In this return type a vehicle ascends to a minimum safe altitude above obstructions (if needed), and then flies directly to a rally point or the start of a mission landing point (whichever is nearest), or the home position if neither rally points or mission landing pattern is defined.
If the destination is a mission landing pattern, the vehicle will then follow the pattern to land.
+44 -4
View File
@@ -163,6 +163,42 @@ $$\dot{B} = \gamma - \frac{\dot{V_T}}{g}$$
## Fixed-Wing Attitude Controller
### Setpoint modificaiton
Most fixed-wing aircraft cannot generate a sustained yaw rate using the rudder alone. As a result, the yaw component of the quaternion attitude error should be removed before computing the control action.
This is achieved by premultiplying the setpoint quaternion with a rotation about the global down axis. The additional rotation cancels the yaw component of the attitude error while preserving the roll and pitch components.
The yaw offset is
$$
\psi =-2\frac{\hat{q}_0 q_3 - \hat{q}_1 q_2 + \hat{q}_2 q_1 -\hat{q}_3 q_0}
{\hat{q}_0 q_0 - \hat{q}_1 q_1 - \hat{q}_2 q_2 + \hat{q}_3 q_3}
$$
The quaternion representing the yaw offset is
$$
_{\text{yaw}} =
\operatorname{normalize}
\left(
\begin{bmatrix}
1 \
0 \
0 \
\frac{\psi}{2}
\end{bmatrix}
\right)
$$
The corrected setpoint quaternion is then obtained by applying the rotation
$$
_{\text{sp, corrected}} = _{\text{yaw}} \otimes _{sp}
$$
### Quaternion based attitude controller
![FW Attitude Controller Diagram](../../assets/diagrams/px4_fw_attitude_controller_diagram.png)
<!-- The drawing is on draw.io: https://drive.google.com/file/d/1ibxekmtc6Ljq60DvNMplgnnU-JOvKYLQ/view?usp=sharing
@@ -185,12 +221,16 @@ In order to keep a constant rate, this damping can be compensated using feedforw
### Turn coordination
The roll and pitch controllers have the same structure and the longitudinal and lateral dynamics are assumed to be uncoupled enough to work independently.
The yaw controller, however, generates its yaw rate setpoint using the turn coordination constraint in order to minimize lateral acceleration, generated when the aircraft is slipping. The turn coordination algorithm is based solely on coordinated turn geometry calculation.
The yaw rate setpoint is generated using the turn coordination constraint in order to minimize lateral acceleration, generated when the aircraft is slipping.
$$\dot{\Psi}_{sp} = \frac{g}{V_T} \tan{\phi_{sp}} \cos{\theta_{sp}}$$
$$r_{sp} = \frac{2g}{V_T}\left(q_0 q_1 + q_2 q_3\right)$$
The yaw rate controller also helps to counteract [adverse yaw effects](https://youtu.be/sNV_SDDxuWk) and to damp the [Dutch roll mode](https://en.wikipedia.org/wiki/Dutch_roll) by providing extra directional damping.
This also helps to counteract [adverse yaw effects](https://youtu.be/sNV_SDDxuWk) and to damp the [Dutch roll mode](https://en.wikipedia.org/wiki/Dutch_roll) by providing extra directional damping.
To compensate for the non-zero pitch rate that naturally occurs during coordinated turns, a geometry-based feedforward term is added to the pitch-rate command.
This feedforward term accounts for the aircraft's current attitude and airspeed so that the controller does not need to generate this motion purely through feedback.
$$q_{sp}^{ff} = \frac{4g(q_0 q_1 + q_2 q_3)^2}{V(1 - 2q_1^2 - 2q_2^2)}$$
## VTOL Flight Controller
+4
View File
@@ -14,6 +14,10 @@ It also links instructions for how you can add PX4 support for:
- [Message Signing](../mavlink/message_signing.md)
- [Protocols/Microservices](../mavlink/protocols.md)
::: warning
MAVLink messages are unauthenticated by default. Without [message signing](../mavlink/message_signing.md) enabled, any device that can send MAVLink messages to the vehicle can execute commands including shell access, file operations, and flight termination. Production deployments must enable signing and follow the [Security Hardening](../mavlink/security_hardening.md) guide.
:::
::: info
We do not yet cover _command_ handling and sending, or how to implement your own microservices.
:::
+84
View File
@@ -0,0 +1,84 @@
# MAVLink Security Hardening for Production Deployments
<Badge type="tip" text="PX4 v1.17" />
MAVLink is an open communication protocol designed for lightweight, low-latency communication between drones and ground stations.
By default, all MAVLink messages are unauthenticated.
This is intentional for development and testing, but **production deployments must enable [message signing](message_signing.md)** to prevent unauthorized access.
::: warning
Without message signing enabled, any device that can send MAVLink messages to the vehicle (via radio, network, or serial) can execute any command, including shell access, file operations, parameter changes, mission uploads, arming, and flight termination.
:::
## What Is at Risk
When MAVLink signing is not enabled, an attacker within communication range can:
| Capability | MAVLink mechanism |
| ---------------------------- | ------------------------------------------------ |
| Execute shell commands | `SERIAL_CONTROL` with `SERIAL_CONTROL_DEV_SHELL` |
| Read, write, or delete files | MAVLink FTP protocol |
| Change any flight parameter | `PARAM_SET` / `PARAM_EXT_SET` |
| Upload or overwrite missions | Mission protocol |
| Arm or disarm motors | `MAV_CMD_COMPONENT_ARM_DISARM` |
| Terminate flight (crash) | `MAV_CMD_DO_FLIGHTTERMINATION` |
| Trigger emergency landing | Spoofed `BATTERY_STATUS` |
| Reboot the vehicle | `MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN` |
All of these are standard MAVLink capabilities used by ground control stations.
Without signing, there is no distinction between a legitimate GCS and an unauthorized sender.
## Hardening Checklist
### 1. Enable Message Signing
Message signing provides cryptographic authentication for all MAVLink communication.
See [Message Signing](message_signing.md) for full details.
Steps:
1. Connect the vehicle via **USB** (key provisioning only works over USB).
2. Provision a 32-byte secret key using the [SETUP_SIGNING](https://mavlink.io/en/messages/common.html#SETUP_SIGNING) message.
3. Set [MAV_SIGN_CFG](../advanced_config/parameter_reference.md#MAV_SIGN_CFG) to **1** (signing enabled on all links except USB) or **2** (signing on all links including USB).
4. Provision the same key on all ground control stations and companion computers that need to communicate with the vehicle.
5. Verify that unsigned messages from unknown sources are rejected.
::: info
`MAV_SIGN_CFG=1` is recommended for most deployments.
This enforces signing on telemetry radios and network links while allowing unsigned access over USB for maintenance.
USB connections require physical access to the vehicle, which provides equivalent security to physical key access.
:::
### 2. Secure Physical Access
- Protect access to the SD card. The signing key is stored at `/mavlink/mavlink-signing-key.bin` and can be read or removed by anyone with physical access.
- USB connections bypass signing when `MAV_SIGN_CFG=1`. Ensure USB ports are not exposed in deployed configurations.
### 3. Secure Network Links
- Do not expose MAVLink UDP/TCP ports to untrusted networks or the internet.
- Place MAVLink communication links behind firewalls or VPNs.
- Segment MAVLink networks from business or public networks.
- When using companion computers, audit which network interfaces MAVLink is bound to.
### 4. Understand the Limitations
- **No encryption**: Message signing provides authentication and integrity, but messages are sent in plaintext. An eavesdropper can read telemetry and commands but cannot forge them.
- **Allowlisted messages**: A small set of [safety-critical messages](message_signing.md#unsigned-message-allowlist) (RADIO_STATUS, ADSB_VEHICLE, COLLISION) are always accepted unsigned.
- **Key management**: There is no automatic key rotation. Keys must be reprovisioned manually via USB if compromised.
## Integrator Responsibility
PX4 is open-source flight controller firmware used by manufacturers and system integrators to build commercial and custom drone platforms.
Securing the communication links for a specific deployment is the responsibility of the system integrator.
This includes:
- Choosing appropriate radio hardware and link security
- Enabling and managing MAVLink message signing
- Restricting network access to MAVLink interfaces
- Applying firmware updates that address security issues
- Evaluating whether the default configuration meets the security requirements of the target application
PX4 provides the tools for securing MAVLink communication.
Integrators must enable and configure them for their deployment context.
+191 -191
View File
@@ -95,202 +95,202 @@ They are not build into the module, and hence are neither published or subscribe
::: details See messages
- [GpioRequest](../msg_docs/GpioRequest.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [VehicleGlobalPositionV0](../msg_docs/VehicleGlobalPositionV0.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [IridiumsbdStatus](../msg_docs/IridiumsbdStatus.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [EventV0](../msg_docs/EventV0.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [VehicleCommandAckV0](../msg_docs/VehicleCommandAckV0.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [Gripper](../msg_docs/Gripper.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [Rpm](../msg_docs/Rpm.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [EscReport](../msg_docs/EscReport.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [TuneControl](../msg_docs/TuneControl.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [Mission](../msg_docs/Mission.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [LedControl](../msg_docs/LedControl.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [Vtx](../msg_docs/Vtx.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [Ping](../msg_docs/Ping.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [Event](../msg_docs/Event.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [InputRc](../msg_docs/InputRc.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [EventV0](../msg_docs/EventV0.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [Gripper](../msg_docs/Gripper.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [VehicleGlobalPositionV0](../msg_docs/VehicleGlobalPositionV0.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [Mission](../msg_docs/Mission.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [Event](../msg_docs/Event.md)
- [EscReport](../msg_docs/EscReport.md)
- [Ping](../msg_docs/Ping.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [VehicleCommandAckV0](../msg_docs/VehicleCommandAckV0.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [Rpm](../msg_docs/Rpm.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [LedControl](../msg_docs/LedControl.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [MagnetometerBiasEstimate](../msg_docs/MagnetometerBiasEstimate.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [Vtx](../msg_docs/Vtx.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [IridiumsbdStatus](../msg_docs/IridiumsbdStatus.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [InputRc](../msg_docs/InputRc.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
:::
+2 -4
View File
@@ -1109,7 +1109,7 @@ px4io <command> [arguments...]
## rgbled
Source: [drivers/lights/rgbled_ncp5623c](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled_ncp5623c)
Source: [drivers/lights/rgbled](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled)
### Usage {#rgbled_usage}
@@ -1124,9 +1124,7 @@ rgbled <command> [arguments...]
[-f <val>] bus frequency in kHz
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 57
[-o <val>] RGB PWM Assignment
default: 123
default: 85
stop
+6 -6
View File
@@ -22,11 +22,11 @@ Published by the vehicle's allocation and consumed by the ESC protocol drivers e
## Constants
| Name | Type | Value | Description |
| --------------------------------------------------------------- | -------- | ----- | ----------- |
| Name | Type | Value | Description |
| --------------------------------------------------------------- | -------- | ----- | --------------------------------- |
| <a id="#MESSAGE_VERSION"></a> MESSAGE_VERSION | `uint32` | 0 |
| <a id="#ACTUATOR_FUNCTION_MOTOR1"></a> ACTUATOR_FUNCTION_MOTOR1 | `uint8` | 101 |
| <a id="#NUM_CONTROLS"></a> NUM_CONTROLS | `uint8` | 12 |
| <a id="#ACTUATOR_FUNCTION_MOTOR1"></a> ACTUATOR_FUNCTION_MOTOR1 | `uint8` | 101 | output_functions.yaml Motor.start |
| <a id="#NUM_CONTROLS"></a> NUM_CONTROLS | `uint8` | 12 | output_functions.yaml Motor.count |
## Source Message
@@ -47,9 +47,9 @@ uint64 timestamp_sample # [us] Sampling timestamp of the data this control respo
uint16 reversible_flags # [-] Bitset indicating which motors are configured to be reversible
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101 # output_functions.yaml Motor.start
uint8 NUM_CONTROLS = 12
uint8 NUM_CONTROLS = 12 # output_functions.yaml Motor.count
float32[12] control # [@range -1, 1] Normalized thrust. Where 1 means maximum positive thrust, -1 maximum negative (if not supported by the output, <0 maps to NaN). NaN maps to disarmed (stop the motors)
```
+2 -23
View File
@@ -29,17 +29,7 @@ pageClass: is-wide-page
| Name | Type | Value | Description |
| --------------------------------------------------------------------------- | ------- | ----- | ---------------------------------------------------------------------------- |
| <a id="#ACTUATOR_FUNCTION_MOTOR1"></a> ACTUATOR_FUNCTION_MOTOR1 | `uint8` | 101 |
| <a id="#ACTUATOR_FUNCTION_MOTOR2"></a> ACTUATOR_FUNCTION_MOTOR2 | `uint8` | 102 |
| <a id="#ACTUATOR_FUNCTION_MOTOR3"></a> ACTUATOR_FUNCTION_MOTOR3 | `uint8` | 103 |
| <a id="#ACTUATOR_FUNCTION_MOTOR4"></a> ACTUATOR_FUNCTION_MOTOR4 | `uint8` | 104 |
| <a id="#ACTUATOR_FUNCTION_MOTOR5"></a> ACTUATOR_FUNCTION_MOTOR5 | `uint8` | 105 |
| <a id="#ACTUATOR_FUNCTION_MOTOR6"></a> ACTUATOR_FUNCTION_MOTOR6 | `uint8` | 106 |
| <a id="#ACTUATOR_FUNCTION_MOTOR7"></a> ACTUATOR_FUNCTION_MOTOR7 | `uint8` | 107 |
| <a id="#ACTUATOR_FUNCTION_MOTOR8"></a> ACTUATOR_FUNCTION_MOTOR8 | `uint8` | 108 |
| <a id="#ACTUATOR_FUNCTION_MOTOR9"></a> ACTUATOR_FUNCTION_MOTOR9 | `uint8` | 109 |
| <a id="#ACTUATOR_FUNCTION_MOTOR10"></a> ACTUATOR_FUNCTION_MOTOR10 | `uint8` | 110 |
| <a id="#ACTUATOR_FUNCTION_MOTOR11"></a> ACTUATOR_FUNCTION_MOTOR11 | `uint8` | 111 |
| <a id="#ACTUATOR_FUNCTION_MOTOR12"></a> ACTUATOR_FUNCTION_MOTOR12 | `uint8` | 112 |
| <a id="#ACTUATOR_FUNCTION_MOTOR_MAX"></a> ACTUATOR_FUNCTION_MOTOR_MAX | `uint8` | 112 | output_functions.yaml Motor.start + Motor.count - 1 |
| <a id="#FAILURE_OVER_CURRENT"></a> FAILURE_OVER_CURRENT | `uint8` | 0 | (1 << 0) |
| <a id="#FAILURE_OVER_VOLTAGE"></a> FAILURE_OVER_VOLTAGE | `uint8` | 1 | (1 << 1) |
| <a id="#FAILURE_MOTOR_OVER_TEMPERATURE"></a> FAILURE_MOTOR_OVER_TEMPERATURE | `uint8` | 2 | (1 << 2) |
@@ -72,19 +62,8 @@ uint8 esc_cmdcount # Counter of number of commands
uint8 esc_state # State of ESC - depend on Vendor
uint8 actuator_function # actuator output function (one of Motor1...MotorN)
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR2 = 102
uint8 ACTUATOR_FUNCTION_MOTOR3 = 103
uint8 ACTUATOR_FUNCTION_MOTOR4 = 104
uint8 ACTUATOR_FUNCTION_MOTOR5 = 105
uint8 ACTUATOR_FUNCTION_MOTOR6 = 106
uint8 ACTUATOR_FUNCTION_MOTOR7 = 107
uint8 ACTUATOR_FUNCTION_MOTOR8 = 108
uint8 ACTUATOR_FUNCTION_MOTOR9 = 109
uint8 ACTUATOR_FUNCTION_MOTOR10 = 110
uint8 ACTUATOR_FUNCTION_MOTOR11 = 111
uint8 ACTUATOR_FUNCTION_MOTOR12 = 112
uint8 ACTUATOR_FUNCTION_MOTOR_MAX = 112 # output_functions.yaml Motor.start + Motor.count - 1
uint16 failures # Bitmask to indicate the internal ESC faults
int8 esc_power # Applied power 0-100 in % (negative values reserved)
+4
View File
@@ -61,6 +61,8 @@ pageClass: is-wide-page
| cs_gnss_fault | `bool` | | | 45 - true if GNSS true if GNSS measurements (lat, lon, vel) have been declared faulty |
| cs_yaw_manual | `bool` | | | 46 - true if yaw has been set manually |
| cs_gnss_hgt_fault | `bool` | | | 47 - true if GNSS true if GNSS measurements (alt) have been declared faulty |
| cs_in_transition | `bool` | | | 48 - true if the vehicle is in vtol transition |
| cs_heading_observable | `bool` | | | 49 - true when heading is observable |
| fault_status_changes | `uint32` | | | number of filter fault status (fs) changes |
| fs_bad_mag_x | `bool` | | | 0 - true if the fusion of the magnetometer X-axis has encountered a numerical error |
| fs_bad_mag_y | `bool` | | | 1 - true if the fusion of the magnetometer Y-axis has encountered a numerical error |
@@ -135,6 +137,8 @@ bool cs_gnss_vel # 44 - true if GNSS velocity measurement fusion
bool cs_gnss_fault # 45 - true if GNSS true if GNSS measurements (lat, lon, vel) have been declared faulty
bool cs_yaw_manual # 46 - true if yaw has been set manually
bool cs_gnss_hgt_fault # 47 - true if GNSS true if GNSS measurements (alt) have been declared faulty
bool cs_in_transition # 48 - true if the vehicle is in vtol transition
bool cs_heading_observable # 49 - true when heading is observable
# fault status
uint32 fault_status_changes # number of filter fault status (fs) changes
+4
View File
@@ -27,5 +27,9 @@
},
"devDependencies": {
"prettier": "^3.2.0"
},
"resolutions": {
"markdown-it": "^14.1.1",
"esbuild": "^0.25.0"
}
}
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
+487 -445
View File
File diff suppressed because it is too large Load Diff
+1 -12
View File
@@ -11,19 +11,8 @@ uint8 esc_cmdcount # Counter of number of commands
uint8 esc_state # State of ESC - depend on Vendor
uint8 actuator_function # actuator output function (one of Motor1...MotorN)
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR2 = 102
uint8 ACTUATOR_FUNCTION_MOTOR3 = 103
uint8 ACTUATOR_FUNCTION_MOTOR4 = 104
uint8 ACTUATOR_FUNCTION_MOTOR5 = 105
uint8 ACTUATOR_FUNCTION_MOTOR6 = 106
uint8 ACTUATOR_FUNCTION_MOTOR7 = 107
uint8 ACTUATOR_FUNCTION_MOTOR8 = 108
uint8 ACTUATOR_FUNCTION_MOTOR9 = 109
uint8 ACTUATOR_FUNCTION_MOTOR10 = 110
uint8 ACTUATOR_FUNCTION_MOTOR11 = 111
uint8 ACTUATOR_FUNCTION_MOTOR12 = 112
uint8 ACTUATOR_FUNCTION_MOTOR_MAX = 112 # output_functions.yaml Motor.start + Motor.count - 1
uint16 failures # Bitmask to indicate the internal ESC faults
int8 esc_power # Applied power 0-100 in % (negative values reserved)
+2
View File
@@ -52,6 +52,8 @@ bool cs_gnss_vel # 44 - true if GNSS velocity measurement fusion
bool cs_gnss_fault # 45 - true if GNSS true if GNSS measurements (lat, lon, vel) have been declared faulty
bool cs_yaw_manual # 46 - true if yaw has been set manually
bool cs_gnss_hgt_fault # 47 - true if GNSS true if GNSS measurements (alt) have been declared faulty
bool cs_in_transition # 48 - true if the vehicle is in vtol transition
bool cs_heading_observable # 49 - true when heading is observable
# fault status
uint32 fault_status_changes # number of filter fault status (fs) changes
+2 -2
View File
@@ -10,7 +10,7 @@ uint64 timestamp_sample # [us] Sampling timestamp of the data this control respo
uint16 reversible_flags # [-] Bitset indicating which motors are configured to be reversible
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101 # output_functions.yaml Motor.start
uint8 NUM_CONTROLS = 12
uint8 NUM_CONTROLS = 12 # output_functions.yaml Motor.count
float32[12] control # [@range -1, 1] Normalized thrust. Where 1 means maximum positive thrust, -1 maximum negative (if not supported by the output, <0 maps to NaN). NaN maps to disarmed (stop the motors)
+5
View File
@@ -92,6 +92,11 @@ public:
// copy assignment
Subscription &operator=(const Subscription &other)
{
// Check for self-assignment
if (this == &other) {
return *this;
}
unsubscribe();
_orb_id = other._orb_id;
_instance = other._instance;
@@ -645,7 +645,7 @@ int uORBTest::UnitTest::test_wrap_around()
}
#define CHECK_COPY(i_got, i_correct) \
orb_copy(ORB_ID(orb_test_medium_wrap_around), sfd, &u); \
if (i_got != i_correct) { \
if ((i_got) != (i_correct)) { \
return test_fail("got wrong element from the queue (got %i, should be %i)", i_got, i_correct); \
}
@@ -875,7 +875,7 @@ int uORBTest::UnitTest::test_queue()
}
#define CHECK_COPY(i_got, i_correct) \
orb_copy(ORB_ID(orb_test_medium_queue), sfd, &u); \
if (i_got != i_correct) { \
if ((i_got) != (i_correct)) { \
return test_fail("got wrong element from the queue (got %i, should be %i)", i_got, i_correct); \
}
-14
View File
@@ -72,20 +72,6 @@ endforeach()
# Mavlink test requires mavlink running
add_test(NAME sitl-mavlink
COMMAND $<TARGET_FILE:px4>
-s ${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_mavlink
-t ${PX4_SOURCE_DIR}/test_data
${PX4_SOURCE_DIR}/ROMFS/px4fmu_test
WORKING_DIRECTORY ${SITL_WORKING_DIR}
)
set_tests_properties(sitl-mavlink PROPERTIES FAIL_REGULAR_EXPRESSION "FAIL")
set_tests_properties(sitl-mavlink PROPERTIES PASS_REGULAR_EXPRESSION "ALL TESTS PASSED")
sanitizer_fail_test_on_error(sitl-mavlink)
# IMU filtering
add_test(NAME sitl-imu_filtering
COMMAND $<TARGET_FILE:px4>
-23
View File
@@ -1,23 +0,0 @@
#!/bin/sh
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
. px4-alias.sh
param load
param set CBRK_SUPPLY_CHK 894281
dataman start
battery_simulator start
simulator_mavlink start
tone_alarm start
pwm_out_sim start
ver all
mavlink start -x -u 14556 -r 2000000
mavlink boot_complete
mavlink_tests
shutdown
@@ -183,11 +183,11 @@ void VertiqIo::parameters_update()
}
}
void VertiqIo::OutputControls(uint16_t outputs[MAX_ACTUATORS])
void VertiqIo::OutputControls(float outputs[MAX_ACTUATORS])
{
//Put the mixer outputs into the output message
for (uint8_t i = 0; i < _transmission_message.num_cvs; i++) {
_transmission_message.commands[i] = outputs[i];
_transmission_message.commands[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
_operational_ifci.PackageIfciCommandsForTransmission(&_transmission_message, _output_message, &_output_len);
@@ -195,8 +195,7 @@ void VertiqIo::OutputControls(uint16_t outputs[MAX_ACTUATORS])
_serial_interface.ProcessSerialTx();
}
bool VertiqIo::updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated)
bool VertiqIo::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
#ifdef CONFIG_USE_IFCI_CONFIGURATION
@@ -94,14 +94,13 @@ public:
void print_info();
/** @see OutputModuleInterface */
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
/**
* @brief Used to package and transmit controls via IQUART
* @param outputs The output throttles calculated by the mixer
*/
void OutputControls(uint16_t outputs[MAX_ACTUATORS]);
void OutputControls(float outputs[MAX_ACTUATORS]);
private:
+16 -10
View File
@@ -957,7 +957,7 @@ int VoxlEsc::update_params()
return ret;
}
void VoxlEsc::update_leds(vehicle_control_mode_s mode, led_control_s control)
void VoxlEsc::update_leds(const vehicle_control_mode_s &mode, const led_control_s &control)
{
int i = 0;
uint8_t led_mask = _led_rsc.led_mask;
@@ -1237,8 +1237,7 @@ void VoxlEsc::mix_turtle_mode(uint16_t outputs[MAX_ACTUATORS])
}
/* OutputModuleInterface */
bool VoxlEsc::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool VoxlEsc::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
//in Run() we call _mixing_output.update(), which calls MixingOutput::limitAndUpdateOutputs which calls _interface.updateOutputs (this function)
//So, if Run() is blocked by a custom command, this function will not be called until Run is running again
@@ -1247,9 +1246,16 @@ bool VoxlEsc::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
return false;
}
// Convert float outputs to uint16_t hardware values
uint16_t hw_outputs[VOXL_ESC_OUTPUT_CHANNELS] {};
for (int i = 0; i < VOXL_ESC_OUTPUT_CHANNELS; i++) {
hw_outputs[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
// don't use mixed values... recompute now.
if (_turtle_mode_en) {
mix_turtle_mode(outputs);
mix_turtle_mode(hw_outputs);
}
for (int i = 0; i < VOXL_ESC_OUTPUT_CHANNELS; i++) {
@@ -1259,24 +1265,24 @@ bool VoxlEsc::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
} else {
if ((_turtle_mode_en) || (_parameters.cmd_type == VOXL_ESC_RPM_CMDS)) {
if (_extended_rpm) {
if (outputs[i] > VOXL_ESC_RPM_MAX_EXT) { outputs[i] = VOXL_ESC_RPM_MAX_EXT; }
if (hw_outputs[i] > VOXL_ESC_RPM_MAX_EXT) { hw_outputs[i] = VOXL_ESC_RPM_MAX_EXT; }
} else {
if (outputs[i] > VOXL_ESC_RPM_MAX) { outputs[i] = VOXL_ESC_RPM_MAX; }
if (hw_outputs[i] > VOXL_ESC_RPM_MAX) { hw_outputs[i] = VOXL_ESC_RPM_MAX; }
}
} else if (_parameters.cmd_type == VOXL_ESC_PWM_CMDS) {
if (outputs[i] > VOXL_ESC_PWM_MAX) { outputs[i] = VOXL_ESC_PWM_MAX; }
if (hw_outputs[i] > VOXL_ESC_PWM_MAX) { hw_outputs[i] = VOXL_ESC_PWM_MAX; }
else if (outputs[i] < _min_active_pwm) { outputs[i] = _min_active_pwm; }
else if (hw_outputs[i] < _min_active_pwm) { hw_outputs[i] = _min_active_pwm; }
}
if (!_turtle_mode_en) {
_esc_chans[i].rate_req = outputs[i] * _output_map[i].direction;
_esc_chans[i].rate_req = hw_outputs[i] * _output_map[i].direction;
} else {
// mapping updated in mixTurtleMode, no remap needed here, but reverse direction
_esc_chans[i].rate_req = outputs[i] * _output_map[i].direction * (-1);
_esc_chans[i].rate_req = hw_outputs[i] * _output_map[i].direction * (-1);
}
}
}
+2 -3
View File
@@ -83,8 +83,7 @@ public:
void print_params();
/** @see OutputModuleInterface */
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
virtual int init();
int device_init(); // function where uart port is opened and ESC queried
@@ -272,7 +271,7 @@ private:
bool _device_initialized{false};
void update_leds(vehicle_control_mode_s mode, led_control_s control);
void update_leds(const vehicle_control_mode_s &mode, const led_control_s &control);
int read_response(Command *out_cmd);
int parse_response(uint8_t *buf, uint8_t len, bool print_feedback);
@@ -88,7 +88,7 @@ typedef enum : int32_t {
TRIGGER_MODE_DISTANCE_ON_CMD
} trigger_mode_t;
#define commandParamToInt(n) static_cast<int>(n >= 0 ? n + 0.5f : n - 0.5f)
#define commandParamToInt(n) static_cast<int>((n) >= 0 ? (n) + 0.5f : (n) - 0.5f)
class CameraTrigger final : public px4::ScheduledWorkItem
{
+3 -3
View File
@@ -169,7 +169,7 @@ public:
{
}
void update_outputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs)
void update_outputs(float outputs[MAX_ACTUATORS], unsigned num_outputs)
{
if (_port_id == 0 || _port_id == CANARD_PORT_ID_UNSET) {
return;
@@ -178,7 +178,7 @@ public:
uint8_t max_num_outputs = MAX_ACTUATORS > num_outputs ? num_outputs : MAX_ACTUATORS;
for (int8_t i = max_num_outputs - 1; i >= _max_number_of_nonzero_outputs; i--) {
if (outputs[i] != 0) {
if (fabsf(outputs[i]) > FLT_EPSILON) {
_max_number_of_nonzero_outputs = i + 1;
break;
}
@@ -187,7 +187,7 @@ public:
uint16_t payload_buffer[reg_udral_service_actuator_common_sp_Vector31_0_1_value_ARRAY_CAPACITY_];
for (uint8_t i = 0; i < _max_number_of_nonzero_outputs; i++) {
payload_buffer[i] = nunavutFloat16Pack(outputs[i] / 8192.0);
payload_buffer[i] = nunavutFloat16Pack(outputs[i] / 8192.f); // Output is float16 so this would benefit rescaling to e.g. [-1,1]
}
const CanardTransferMetadata transfer_metadata = {
+1 -2
View File
@@ -435,8 +435,7 @@ void CyphalNode::sendPortList()
_uavcan_node_port_List_last = now;
}
bool UavcanMixingInterface::updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated)
bool UavcanMixingInterface::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
// Note: This gets called from MixingOutput from within its update() function
// Hence, the mutex lock in UavcanMixingInterface::Run() is in effect
+1 -2
View File
@@ -87,8 +87,7 @@ public:
_node_mutex(node_mutex),
_pub_manager(pub_manager) {}
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
void printInfo() { _mixing_output.printStatus(); }
+2 -3
View File
@@ -374,8 +374,7 @@ void DShot::mixerChanged()
update_num_motors();
}
bool DShot::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool DShot::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
if (!_outputs_on) {
return false;
@@ -391,7 +390,7 @@ bool DShot::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
for (int i = 0; i < (int)num_outputs; i++) {
uint16_t output = outputs[i];
uint16_t output = static_cast<uint16_t>(lroundf(outputs[i]));
if (output == DSHOT_DISARM_VALUE) {
+1 -2
View File
@@ -92,8 +92,7 @@ public:
bool telemetry_enabled() const { return _telemetry != nullptr; }
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
private:
+8 -3
View File
@@ -97,10 +97,15 @@ int LinuxPWMOut::task_spawn(int argc, char *argv[])
return PX4_ERROR;
}
bool LinuxPWMOut::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool LinuxPWMOut::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
_pwm_out->send_output_pwm(outputs, num_outputs);
uint16_t hw_outputs[MAX_ACTUATORS] {};
for (unsigned i = 0; i < num_outputs; i++) {
hw_outputs[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
_pwm_out->send_output_pwm(hw_outputs, num_outputs);
return true;
}
+1 -2
View File
@@ -73,8 +73,7 @@ public:
int init();
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
private:
static constexpr int MAX_ACTUATORS = 8;
+6 -6
View File
@@ -73,8 +73,7 @@ public:
static int custom_command(int argc, char *argv[]);
static int print_usage(const char *reason = nullptr);
bool updateOutputs(uint16_t *outputs, unsigned num_outputs,
unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
int print_status() override;
@@ -155,8 +154,7 @@ int PCA9685Wrapper::init()
return PX4_OK;
}
bool PCA9685Wrapper::updateOutputs(uint16_t *outputs, unsigned num_outputs,
unsigned num_control_groups_updated)
bool PCA9685Wrapper::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
if (_state != STATE::RUNNING) { return false; }
@@ -164,11 +162,13 @@ bool PCA9685Wrapper::updateOutputs(uint16_t *outputs, unsigned num_outputs,
num_outputs = num_outputs > PCA9685_PWM_CHANNEL_COUNT ? PCA9685_PWM_CHANNEL_COUNT : num_outputs;
for (uint8_t i = 0; i < num_outputs; ++i) {
uint16_t output = static_cast<uint16_t>(lroundf(outputs[i]));
if (param_duty_mode & (1 << i)) {
low_level_outputs[i] = outputs[i];
low_level_outputs[i] = output;
} else {
low_level_outputs[i] = pca9685->calcRawFromPulse(outputs[i]);
low_level_outputs[i] = pca9685->calcRawFromPulse(output);
}
}
+3 -4
View File
@@ -127,19 +127,18 @@ bool PWMOut::update_pwm_out_state(bool on)
return true;
}
bool PWMOut::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool PWMOut::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
/* output to the servos */
if (_pwm_initialized) {
for (size_t i = 0; i < num_outputs; i++) {
if (!_mixing_output.isFunctionSet(i)) {
// do not run any signal on disabled channels
outputs[i] = 0;
outputs[i] = 0.f;
}
if (_pwm_mask & (1 << i)) {
up_pwm_servo_set(i, outputs[i]);
up_pwm_servo_set(i, static_cast<uint16_t>(lroundf(outputs[i])));
}
}
}
+1 -2
View File
@@ -73,8 +73,7 @@ public:
/** @see ModuleBase::print_status() */
int print_status() override;
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
private:
void Run() override;
+8 -6
View File
@@ -155,8 +155,7 @@ public:
uint16_t system_status() const { return _status; }
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
private:
void Run() override;
@@ -364,19 +363,22 @@ PX4IO::~PX4IO()
perf_free(_interface_write_perf);
}
bool PX4IO::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool PX4IO::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
uint16_t hw_outputs[MAX_ACTUATORS] {};
for (size_t i = 0; i < num_outputs; i++) {
if (!_mixing_output.isFunctionSet(i)) {
// do not run any signal on disabled channels
outputs[i] = 0;
}
hw_outputs[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
if (!_test_fmu_fail) {
/* output to the servos */
io_reg_set(PX4IO_PAGE_DIRECT_PWM, 0, outputs, num_outputs);
io_reg_set(PX4IO_PAGE_DIRECT_PWM, 0, hw_outputs, num_outputs);
}
return true;
@@ -504,7 +506,7 @@ void PX4IO::updateFailsafe()
uint16_t values[PX4IO_MAX_ACTUATORS] {};
for (unsigned i = 0; i < _max_actuators; i++) {
values[i] = _mixing_output.actualFailsafeValue(i);
values[i] = static_cast<uint16_t>(lroundf(_mixing_output.actualFailsafeValue(i)));
}
io_reg_set(PX4IO_PAGE_FAILSAFE_PWM, 0, values, _max_actuators);
+9
View File
@@ -401,6 +401,15 @@ bool CrsfParser_TryParseCrsfPacket(CrsfPacket_t *const new_packet, CrsfParserSta
if (working_descriptor->packet_size == -1) {
working_segment_size = packet_size - PACKET_SIZE_TYPE_SIZE;
if (working_index + working_segment_size + CRC_SIZE > CRSF_MAX_PACKET_LEN) {
parser_statistics->invalid_known_packet_sizes++;
parser_state = PARSER_STATE_HEADER;
working_segment_size = HEADER_SIZE;
working_index = 0;
buffer_count = QueueBuffer_Count(&rx_queue);
continue;
}
} else {
if (packet_size != working_descriptor->packet_size + PACKET_SIZE_TYPE_SIZE) {
parser_statistics->invalid_known_packet_sizes++;
+7 -18
View File
@@ -156,15 +156,10 @@ int Roboclaw::initializeUART()
}
}
bool Roboclaw::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool Roboclaw::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
float right_motor_output = ((float)outputs[0] - 128.0f) / 127.f;
float left_motor_output = ((float)outputs[1] - 128.0f) / 127.f;
setMotorSpeed(Motor::Right, right_motor_output);
setMotorSpeed(Motor::Left, left_motor_output);
setMotorSpeed(Motor::Right, (outputs[0] - 127.0f) / 127.f);
setMotorSpeed(Motor::Left, (outputs[1] - 127.0f) / 127.f);
return true;
}
@@ -246,7 +241,7 @@ void Roboclaw::setMotorSpeed(Motor motor, float value)
// send command
if (motor == Motor::Right) {
if (value > 0) {
if (value > 0.f) {
command = Command::DriveForwardMotor1;
} else {
@@ -254,7 +249,7 @@ void Roboclaw::setMotorSpeed(Motor motor, float value)
}
} else if (motor == Motor::Left) {
if (value > 0) {
if (value > 0.f) {
command = Command::DriveForwardMotor2;
} else {
@@ -291,15 +286,9 @@ void Roboclaw::resetEncoders()
sendTransaction(Command::ResetEncoders, nullptr, 0);
}
void Roboclaw::sendUnsigned7Bit(Command command, float data)
void Roboclaw::sendUnsigned7Bit(Command command, const float data)
{
data = fabs(data);
if (data >= 1.0f) {
data = 0.99f;
}
auto byte = (uint8_t)(data * INT8_MAX);
uint8_t byte = static_cast<uint8_t>(lroundf(fabs(data) * INT8_MAX));
sendTransaction(command, &byte, 1);
}
+1 -2
View File
@@ -79,8 +79,7 @@ public:
void Run() override;
/** @see OutputModuleInterface */
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
void setMotorSpeed(Motor motor, float value); ///< rev/sec
void setMotorDutyCycle(Motor motor, float value);
+3 -3
View File
@@ -10,9 +10,9 @@ actuator_output:
- param_prefix: RBCLW
channel_label: 'Channel'
standard_params:
disarmed: { min: 128, max: 128, default: 128 }
min: { min: 1, max: 128, default: 1 }
max: { min: 128, max: 256, default: 256 }
disarmed: { min: 127, max: 127, default: 127 }
min: { min: 0, max: 127, default: 0 }
max: { min: 127, max: 254, default: 254 }
failsafe: { min: 0, max: 257 }
num_channels: 2
+12 -12
View File
@@ -243,7 +243,7 @@ void TAP_ESC::send_tune_packet(EscbusTunePacket &tune_packet)
tap_esc_common::send_packet(_uart_fd, buzzer_packet, -1);
}
bool TAP_ESC::updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
bool TAP_ESC::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated)
{
if (_initialized) {
@@ -252,26 +252,26 @@ bool TAP_ESC::updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_output
// We need to remap from the system default to what PX4's normal scheme is
switch (num_outputs) {
case 4:
motor_out[0] = outputs[2];
motor_out[1] = outputs[1];
motor_out[2] = outputs[3];
motor_out[3] = outputs[0];
motor_out[0] = static_cast<uint16_t>(lroundf(outputs[2]));
motor_out[1] = static_cast<uint16_t>(lroundf(outputs[1]));
motor_out[2] = static_cast<uint16_t>(lroundf(outputs[3]));
motor_out[3] = static_cast<uint16_t>(lroundf(outputs[0]));
break;
case 6:
motor_out[0] = outputs[3];
motor_out[1] = outputs[0];
motor_out[2] = outputs[4];
motor_out[3] = outputs[2];
motor_out[4] = outputs[1];
motor_out[5] = outputs[5];
motor_out[0] = static_cast<uint16_t>(lroundf(outputs[3]));
motor_out[1] = static_cast<uint16_t>(lroundf(outputs[0]));
motor_out[2] = static_cast<uint16_t>(lroundf(outputs[4]));
motor_out[3] = static_cast<uint16_t>(lroundf(outputs[2]));
motor_out[4] = static_cast<uint16_t>(lroundf(outputs[1]));
motor_out[5] = static_cast<uint16_t>(lroundf(outputs[5]));
break;
default:
// Use the system defaults
for (uint8_t i = 0; i < num_outputs; ++i) {
motor_out[i] = outputs[i];
motor_out[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
break;
+1 -2
View File
@@ -101,8 +101,7 @@ public:
int init();
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
private:

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