Compare commits

..

1 Commits

Author SHA1 Message Date
JaeyoungLim c765f0fe30 Add boiler plate for advanced liftdrag 2025-12-10 03:14:47 -08:00
367 changed files with 2554 additions and 7631 deletions
@@ -1,48 +0,0 @@
---
applyTo: "docs/en/**"
---
# Review Guidelines docs/en Tree
## File System & Structure
- **Naming:** Use `lowercase_with_underscores` for all filenames. No spaces.
- **Hierarchy:** Markdown files must reside exactly in a first-level category folder.
- Valid: `docs/en/category/file.md`
- Invalid: `docs/en/category/subcategory/file.md`
- **Text Files:** Any `.txt` or `.text` files must start with an underscore (e.g., `_notes.txt`).
- **Assets:** All images/non-docs must be in `/docs/assets/`. Deep nesting is permitted here.
- **Formats:** Prefer **SVG** for diagrams and **PNG** for screenshots. Flag JPG files.
## Markdown & Style
- **Headings:** Use Title Case ("First Letter Capitalisation").
- The Page Title must be the only H1 (`#`). All others must be `##` or lower.
- Do not apply bold or italic styling inside a heading.
- **Formatting:**
- **Bold:** Only for UI elements (buttons, menu items).
- **Italics (Emphasis):** For tool names (e.g., *QGroundControl*).
- **Inline Code:** Use backticks for file paths, parameters, and CLI commands (e.g., `prettier`).
- **Structure:** End every line at the end of a sentence (Semantic Line Breaks).
## Linking & Navigation
- **Standard Links:** Use standard inline syntax: `[link text](../category/filename.md)`.
Note relative link.
- **Table Links:** To keep tables readable, use reference-style links.
- Definition: `[Link Name]: https://example.com` (placed below the table).
- Usage: `[Link Name]` within the table cell.
- **Images:** All image links must include a descriptive, accessible alt-text in the brackets: `![Detailed description of the image content](../../assets/path/to/image.png)`.
Note that all images should be relative references to images stored in the assets folder, which should be two folders below the any markdown file (as they are stored in a "category" subfolder)
- **Standard Links:** Use standard inline syntax: `[link text](../category/filename.md)`. Note the use of relative links.
- **Table Links:** To keep tables easier to edit, prefer reference-style links.
- Definition: `[Link Name]: https://example.com` (placed below the table).
- Usage: `[Link Name]` within the table cell.
- **Images:** All image links must include a descriptive, accessible alt-text: `![Detailed description of the image content](../../assets/path/to/image.png)`.
- **Note:** All images must be relative references to the `/docs/assets/` folder. Since documents are nested in a category folder, this is usually two levels up (`../../assets/`).
## Quality Control
- **Prettier Check:** Ensure Prettier rules have been applied. If there is evidence of inconsistent indentation or spacing, request the author run `npx prettier --write .` before merging.
- **Language:** Enforce **UK English** spelling and grammar.
+4 -4
View File
@@ -15,7 +15,7 @@ jobs:
stale-issue-label: 'stale'
stale-pr-label: 'stale'
remove-stale-when-updated: true
stale-issue-message: ''
close-issue-message: 'This issue has been automatically closed due to 120 days of inactivity. If you believe this is still relevant, please feel free to reopen it or create a new issue.'
stale-pr-message: ''
close-pr-message: 'This pull request has been automatically closed due to 120 days of inactivity. If you would like to continue, please feel free to reopen it or submit a new PR.'
stale-issue-message: 'This issue has been marked as stale due to 90 days of inactivity. If no further activity occurs, it will be automatically closed in 30 days. Please leave a comment, add a reaction, make an update, or remove the stale label if youd like to keep it open.'
close-issue-message: 'This issue has been closed due to prolonged inactivity after being marked as stale. If you believe this was closed in error or the topic is still relevant, please feel free to reopen it or create a new issue.'
stale-pr-message: 'This PR was identified as stale and it will be closed in 30 days unless any activity is detected.'
close-pr-message: 'This pull request has been closed after being marked as stale with no further activity. Thank you for the time and effort you put into this contribution. If youd like to continue the discussion or update the work, please feel free to reopen it or submit a new PR.'
@@ -1,167 +0,0 @@
#!/bin/sh
#
# @name KTH-ATMOS
#
# @type Free-Flyer
# @class Spacecraft
#
# @output Motor1 back left thruster, +x thrust
# @output Motor2 front left thruster, -x thrust
# @output Motor3 back right thruster, +x thrust
# @output Motor4 front right thruster, -x thrust
# @output Motor5 front left thruster, +y thrust
# @output Motor6 front right thruster, -y thrust
# @output Motor7 back left thruster, +y thrust
# @output Motor8 back right thruster, -y thrust
#
# @maintainer discower-io
# @url https://atmos.discower.io
#
. ${R}etc/init.d/rc.sc_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=atmos_dual}
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
param set-default CA_ROTOR_COUNT 8
param set-default CA_R_REV 0
# Auto to be provided by Custom Airframe
param set-default CA_METHOD 0
# Set proper failsafes
param set-default COM_ACT_FAIL_ACT 0
param set-default COM_LOW_BAT_ACT 0
param set-default NAV_DLL_ACT 0
param set-default GF_ACTION 1
param set-default NAV_RCL_ACT 1
# disable attitude failure detection
param set-default FD_FAIL_P 0
param set-default FD_FAIL_R 0
param set-default CA_ROTOR0_PX -0.12
param set-default CA_ROTOR0_PY -0.12
param set-default CA_ROTOR0_PZ 0.0
param set-default CA_ROTOR0_CT 1.4
param set-default CA_ROTOR0_AX 1.0
param set-default CA_ROTOR0_AY 0.0
param set-default CA_ROTOR0_AZ 0.0
param set-default CA_ROTOR1_PX 0.12
param set-default CA_ROTOR1_PY -0.12
param set-default CA_ROTOR1_PZ 0.0
param set-default CA_ROTOR1_CT 1.4
param set-default CA_ROTOR1_AX -1.0
param set-default CA_ROTOR1_AY 0.0
param set-default CA_ROTOR1_AZ 0.0
param set-default CA_ROTOR2_PX -0.12
param set-default CA_ROTOR2_PY 0.12
param set-default CA_ROTOR2_PZ 0.0
param set-default CA_ROTOR2_CT 1.4
param set-default CA_ROTOR2_AX 1.0
param set-default CA_ROTOR2_AY 0.0
param set-default CA_ROTOR2_AZ 0.0
param set-default CA_ROTOR3_PX 0.12
param set-default CA_ROTOR3_PY 0.12
param set-default CA_ROTOR3_PZ 0.0
param set-default CA_ROTOR3_CT 1.4
param set-default CA_ROTOR3_AX -1.0
param set-default CA_ROTOR3_AY 0.0
param set-default CA_ROTOR3_AZ 0.0
param set-default CA_ROTOR4_PX 0.12
param set-default CA_ROTOR4_PY -0.12
param set-default CA_ROTOR4_PZ 0.0
param set-default CA_ROTOR4_CT 1.4
param set-default CA_ROTOR4_AX 0.0
param set-default CA_ROTOR4_AY 1.0
param set-default CA_ROTOR4_AZ 0.0
param set-default CA_ROTOR5_PX 0.12
param set-default CA_ROTOR5_PY 0.12
param set-default CA_ROTOR5_PZ 0.0
param set-default CA_ROTOR5_CT 1.4
param set-default CA_ROTOR5_AX 0.0
param set-default CA_ROTOR5_AY -1.0
param set-default CA_ROTOR5_AZ 0.0
param set-default CA_ROTOR6_PX -0.12
param set-default CA_ROTOR6_PY -0.12
param set-default CA_ROTOR6_PZ 0.0
param set-default CA_ROTOR6_CT 1.4
param set-default CA_ROTOR6_AX 0.0
param set-default CA_ROTOR6_AY 1.0
param set-default CA_ROTOR6_AZ 0.0
param set-default CA_ROTOR7_PX -0.12
param set-default CA_ROTOR7_PY 0.12
param set-default CA_ROTOR7_PZ 0.0
param set-default CA_ROTOR7_CT 1.4
param set-default CA_ROTOR7_AX 0.0
param set-default CA_ROTOR7_AY -1.0
param set-default CA_ROTOR7_AZ 0.0
param set-default SIM_GZ_EC_FUNC1 101
param set-default SIM_GZ_EC_FUNC2 102
param set-default SIM_GZ_EC_FUNC3 103
param set-default SIM_GZ_EC_FUNC4 104
param set-default SIM_GZ_EC_FUNC5 105
param set-default SIM_GZ_EC_FUNC6 106
param set-default SIM_GZ_EC_FUNC7 107
param set-default SIM_GZ_EC_FUNC8 108
param set-default SIM_GZ_EC_FUNC9 301
param set-default SIM_GZ_EC_FUNC10 302
param set-default SIM_GZ_EC_FUNC11 303
param set-default SIM_GZ_EC_FUNC12 304
param set-default SIM_GZ_EC_MIN1 0
param set-default SIM_GZ_EC_MIN2 0
param set-default SIM_GZ_EC_MIN3 0
param set-default SIM_GZ_EC_MIN4 0
param set-default SIM_GZ_EC_MIN5 0
param set-default SIM_GZ_EC_MIN6 0
param set-default SIM_GZ_EC_MIN7 0
param set-default SIM_GZ_EC_MIN8 0
param set-default SIM_GZ_EC_MIN9 1100
param set-default SIM_GZ_EC_MIN10 1100
param set-default SIM_GZ_EC_MIN11 1100
param set-default SIM_GZ_EC_MIN12 1100
param set-default SIM_GZ_EC_MAX1 10000
param set-default SIM_GZ_EC_MAX2 10000
param set-default SIM_GZ_EC_MAX3 10000
param set-default SIM_GZ_EC_MAX4 10000
param set-default SIM_GZ_EC_MAX5 10000
param set-default SIM_GZ_EC_MAX6 10000
param set-default SIM_GZ_EC_MAX7 10000
param set-default SIM_GZ_EC_MAX8 10000
param set-default SIM_GZ_EC_MAX9 1900
param set-default SIM_GZ_EC_MAX10 1900
param set-default SIM_GZ_EC_MAX11 1900
param set-default SIM_GZ_EC_MAX12 1900
# Controller Tunings
param set SC_YAWRATE_P 3.335
param set SC_YAWRATE_I 0.87
param set SC_YAWRATE_D 0.15
param set SC_YR_INT_LIM 0.2
param set SC_YAW_P 3.0
param set SPC_POS_P 0.20
param set SPC_VEL_P 6.55
param set SPC_VEL_I 0.0
param set SPC_VEL_D 0.0
param set SPC_VEL_MAX 12.0
@@ -118,7 +118,6 @@ px4_add_romfs_files(
60002_gz_uuv_bluerov2_heavy
70000_gz_atmos
70001_gz_atmos_dual
# [22000, 22999] Reserve for custom models
)
@@ -18,8 +18,6 @@
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v6x exclude
# @board ark_fmu-v6x exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -16,8 +16,6 @@
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v6x exclude
# @board ark_fmu-v6x exclude
#
. ${R}etc/init.d/rc.fw_defaults
@@ -7,8 +7,6 @@
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v6x exclude
# @board ark_fmu-v6x exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -11,8 +11,6 @@
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v6x exclude
# @board ark_fmu-v6x exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -9,8 +9,6 @@
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v6x exclude
# @board ark_fmu-v6x exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -12,9 +12,7 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board px4_fmu-v6x exclude
# @board bitcraze_crazyflie exclude
# @board ark_fmu-v6x exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -20,9 +20,6 @@
. ${R}etc/init.d/rc.sc_defaults
# Overwrite DDS AG IP to `192.168.0.1`
param set-default UXRCE_DDS_AG_IP -1062731775
param set-default CA_AIRFRAME 14
param set-default MAV_TYPE 45
@@ -8,6 +8,9 @@ set VEHICLE_TYPE spacecraft
# MAV_TYPE_SPACECRAFT_ORBITTER
param set-default MAV_TYPE 45
# Set micro-dds-client to use ethernet and IP-address 192.168.0.1
param set-default UXRCE_DDS_AG_IP -1062731775
# Disable preflight disarm to not interfere with external launching
param set-default COM_DISARM_PRFLT -1
param set-default CBRK_SUPPLY_CHK 894281
+28 -3
View File
@@ -17,12 +17,37 @@ if [[ -f $1"/.git" || -d $1"/.git" ]]; then
SUBMODULE_STATUS=$(git submodule summary "$1")
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
if ! [[ -z "$STATUSRETVAL" ]]; then
echo -e "\033[33mWarning: $1 submodule has uncommitted changes:\033[0m"
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
echo ""
echo -e "Different commits:"
echo -e "$SUBMODULE_STATUS"
echo ""
echo -e "To update submodules to the expected version, run:"
echo -e " \033[94mgit submodule sync --recursive && git submodule update --init --recursive\033[0m"
echo ""
echo -e " *******************************************************************************"
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
echo -e " * (performs \033[94mgit submodule sync --recursive\033[0m *"
echo -e " * and \033[94mgit submodule update --init --recursive\033[0m ) *"
echo -e " *******************************************************************************"
echo ""
echo ""
echo -e " Only for EXPERTS:"
echo -e " $1 submodule is not in the recommended version."
echo -e " Hit 'y' and <ENTER> to continue the build with this version. Hit <ENTER> to resolve manually."
echo -e " Use \033[94mgit add $1 && git commit -m 'Updated $1'\033[0m to choose this version (careful!)"
echo ""
read user_cmd
if [ "$user_cmd" == "y" ]; then
echo "Continuing build with manually overridden submodule.."
elif [ "$user_cmd" == "u" ]; then
git submodule sync --recursive -- $1
git submodule update --init --recursive -- $1 || true
git submodule update --init --recursive --force -- $1
echo "Submodule fixed, continuing build.."
else
echo "Build aborted."
exit 1
fi
fi
else
git submodule --quiet sync --recursive --quiet -- $1
+44 -8
View File
@@ -98,6 +98,40 @@ class firmware(object):
desc = {}
image = bytes()
crctab = array.array('I', [
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d])
crcpad = bytearray(b'\xff\xff\xff\xff')
def __init__(self, path):
@@ -115,15 +149,17 @@ class firmware(object):
def property(self, propname):
return self.desc[propname]
def crc(self, padlen):
state = 0xFFFFFFFF
state = zlib.crc32(self.image, state)
padding_length = padlen - len(self.image)
if padding_length > 0:
padding = b'\xff' * padding_length
state = zlib.crc32(padding, state)
def __crc32(self, bytes, state):
for byte in bytes:
index = (state ^ byte) & 0xff
state = self.crctab[index] ^ (state >> 8)
return state
return (state ^ 0xFFFFFFFF) & 0xFFFFFFFF
def crc(self, padlen):
state = self.__crc32(self.image, int(0))
for _ in range(len(self.image), (padlen - 1), 4):
state = self.__crc32(self.crcpad, state)
return state
class uploader:
@@ -71,5 +71,6 @@ else()
nuttx_arch # sdio
nuttx_drivers # sdio
px4_layer
platform_gpio_mcp23009
)
endif()
+8
View File
@@ -74,6 +74,7 @@
#include <px4_platform/gpio.h>
#include <px4_platform/board_determine_hw_info.h>
#include <px4_platform/board_dma_alloc.h>
#include <px4_platform/gpio/mcp23009.hpp>
/****************************************************************************
* Pre-Processor Definitions
@@ -285,6 +286,13 @@ __EXPORT int board_app_initialize(uintptr_t arg)
# endif /* CONFIG_MMCSD */
ret = mcp23009_register_gpios(3, 0x25);
if (ret != OK) {
led_on(LED_RED);
return ret;
}
#endif /* !defined(BOOTLOADER) */
return OK;
+1 -1
View File
@@ -35,11 +35,11 @@ CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
CONFIG_DRIVERS_MAGNETOMETER_LSM303AGR=y
CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
CONFIG_DRIVERS_MAGNETOMETER_MEMSIC_MMC5983MA=y
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
CONFIG_DRIVERS_PWM_OUT=y
CONFIG_DRIVERS_PX4IO=y
CONFIG_COMMON_RC=y
-6
View File
@@ -97,11 +97,5 @@ bmm150 -I start
# Internal Baro on I2C
bmp388 -I start
# Start an external PWM generator
if param greater PCA9685_EN_BUS 0
then
pca9685_pwm_out start
fi
unset HAVE_PM2
unset HAVE_PM3
+1 -10
View File
@@ -19,17 +19,8 @@ CONFIG_DRIVERS_HEATER=y
CONFIG_DRIVERS_IMU_INVENSENSE_IIM42653=y
CONFIG_DRIVERS_IMU_MURATA_SCH16T=y
CONFIG_COMMON_LIGHT=y
CONFIG_DRIVERS_MAGNETOMETER_BOSCH_BMM150=y
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
CONFIG_DRIVERS_MAGNETOMETER_LSM303AGR=y
CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
CONFIG_COMMON_MAGNETOMETER=y
CONFIG_DRIVERS_OSD_MSP_OSD=y
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
CONFIG_DRIVERS_PWM_OUT=y
CONFIG_COMMON_RC=y
CONFIG_DRIVERS_UAVCAN=y
-6
View File
@@ -16,9 +16,3 @@ iis2mdc -R 0 -I -b 4 start
# Internal Baro on I2C
bmp388 -I -b 2 start
# Start an external PWM generator
if param greater PCA9685_EN_BUS 0
then
pca9685_pwm_out start
fi
-1
View File
@@ -19,7 +19,6 @@ CONFIG_COMMON_LIGHT=y
CONFIG_DRIVERS_MAGNETOMETER_MEMSIC_MMC5983MA=y
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
CONFIG_DRIVERS_PWM_OUT=y
CONFIG_COMMON_RC=y
-6
View File
@@ -34,9 +34,3 @@ paw3902 -s -b 3 start -Y 90
# Internal distance sensor
afbrs50 start
# Start an external PWM generator
if param greater PCA9685_EN_BUS 0
then
pca9685_pwm_out start
fi
@@ -74,5 +74,5 @@ ist8310 -X -b 1 -R 10 start
# Start an external PWM generator
if param greater PCA9685_EN_BUS 0
then
pca9685_pwm_out start
pca9685_pwm_out start -b 1
fi
@@ -20,9 +20,9 @@ safety_button start
if ver hwbasecmp 009 010 011
then
# No USB
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -M 0 -U 10
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -U 10
fi
if ver hwbasecmp 00a 008
then
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -M 0 -U 10
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -U 10
fi
@@ -86,5 +86,8 @@ fi
#external baro
bmp388 -X start
# Don't try to start external baro on I2C3 as it can conflict with the MS5525DSO airspeed sensor.
#ms5611 -X start
unset INA_CONFIGURED
unset HAVE_PM2
+1 -1
View File
@@ -69,6 +69,6 @@ else()
nuttx_arch # sdio
nuttx_drivers # sdio
px4_layer
platform_gpio_mcp
platform_gpio_mcp23009
)
endif()
+8
View File
@@ -74,6 +74,7 @@
#include <px4_platform/gpio.h>
#include <px4_platform/board_determine_hw_info.h>
#include <px4_platform/board_dma_alloc.h>
#include <px4_platform/gpio/mcp23009.hpp>
/****************************************************************************
* Pre-Processor Definitions
@@ -281,6 +282,13 @@ __EXPORT int board_app_initialize(uintptr_t arg)
# endif /* CONFIG_MMCSD */
ret = mcp23009_register_gpios(3, 0x25);
if (ret != OK) {
led_on(LED_RED);
return ret;
}
#endif /* !defined(BOOTLOADER) */
return OK;
@@ -11,7 +11,3 @@ param set BAT1_V_DIV 5.7
# Always keep current config
param set SYS_AUTOCONFIG 0
# PCA9685 PWM Out defaults
param set-default PCA9685_EN_BUS 4
param set-default PCA9685_I2C_ADDR 64
@@ -28,7 +28,7 @@ then
echo "ads1115 not found."
fi
if ! pca9685_pwm_out start
if ! pca9685_pwm_out start -a 0x40 -b 4
then
echo "pca9685_pwm_out not found."
fi
+1 -1
View File
@@ -68,7 +68,7 @@ fi
bmi088 -A -R 4 -s start
bmi088 -G -R 4 -s start
iim42652 -R 6 -s -C 32768 start
iim42652 -R 6 -s start
icm45686 -R 2 -s start
rm3100 -I -b 4 start
+1
View File
@@ -71,5 +71,6 @@ else()
nuttx_arch # sdio
nuttx_drivers # sdio
px4_layer
platform_gpio_mcp23009
)
endif()
+8
View File
@@ -74,6 +74,7 @@
#include <px4_platform/gpio.h>
#include <px4_platform/board_determine_hw_info.h>
#include <px4_platform/board_dma_alloc.h>
#include <px4_platform/gpio/mcp23009.hpp>
/****************************************************************************
* Pre-Processor Definitions
@@ -285,6 +286,13 @@ __EXPORT int board_app_initialize(uintptr_t arg)
# endif /* CONFIG_MMCSD */
ret = mcp23009_register_gpios(3, 0x25);
if (ret != OK) {
led_on(LED_RED);
return ret;
}
#endif /* !defined(BOOTLOADER) */
return OK;
@@ -13,7 +13,7 @@ CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/narinfc/h7/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_BOARD_CUSTOM_NAME="PX4 NarinFC-H7"
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32H743XI=y
CONFIG_ARCH_CHIP_STM32H7=y
@@ -31,11 +31,11 @@ CONFIG_BOARD_LOOPSPERMSEC=22114
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_CDCACM=y
CONFIG_CDCACM_IFLOWCONTROL=y
CONFIG_CDCACM_PRODUCTID=0x0047
CONFIG_CDCACM_PRODUCTSTR="PX4 BL VOLOLAND NarinFC-H7"
CONFIG_CDCACM_PRODUCTID=0x004c
CONFIG_CDCACM_PRODUCTSTR="PX4 BL NarinFC H7"
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=12000
CONFIG_CDCACM_VENDORID=0x3fc5
CONFIG_CDCACM_VENDORID=0x3163
CONFIG_CDCACM_VENDORSTR="VOLOLAND"
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
+2 -2
View File
@@ -29,9 +29,9 @@ safety_button start
if ver hwbasecmp 009
then
# No USB
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -M 0 -U 10
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -U 10
fi
if ver hwbasecmp 00a 008
then
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -M 0 -U 10
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -U 10
fi
+3 -1
View File
@@ -43,6 +43,8 @@ add_library(drivers_board
usb.c
)
add_dependencies(drivers_board platform_gpio_mcp23009)
target_link_libraries(drivers_board
PRIVATE
arch_io_pins
@@ -52,5 +54,5 @@ target_link_libraries(drivers_board
nuttx_arch # sdio
nuttx_drivers # sdio
px4_layer
platform_gpio_mcp
platform_gpio_mcp23009
)
+8
View File
@@ -74,6 +74,7 @@
#include <px4_platform/gpio.h>
#include <px4_platform/board_determine_hw_info.h>
#include <px4_platform/board_dma_alloc.h>
#include <px4_platform/gpio/mcp23009.hpp>
/****************************************************************************
* Pre-Processor Definitions
@@ -279,5 +280,12 @@ __EXPORT int board_app_initialize(uintptr_t arg)
#endif /* CONFIG_MMCSD */
ret = mcp23009_register_gpios(3, 0x25);
if (ret != OK) {
led_on(LED_RED);
return ret;
}
return OK;
}
+1
View File
@@ -12,6 +12,7 @@ CONFIG_DRIVERS_ADC_ADS1115=y
CONFIG_DRIVERS_ADC_BOARD_ADC=y
CONFIG_DRIVERS_BAROMETER_BMP388=y
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP201XX=y
CONFIG_DRIVERS_BAROMETER_MS5611=y
CONFIG_DRIVERS_CAMERA_CAPTURE=y
CONFIG_DRIVERS_CAMERA_TRIGGER=y
CONFIG_DRIVERS_CDCACM_AUTOSTART=y
+3
View File
@@ -146,5 +146,8 @@ else
bmp388 -X start
fi
# Don't try to start external baro on I2C3 as it can conflict with the MS5525DSO airspeed sensor.
#ms5611 -X start
unset INA_CONFIGURED
unset HAVE_PM2
-1
View File
@@ -1,2 +1 @@
CONFIG_MAVLINK_DIALECT="development"
CONFIG_MODULES_UXRCE_DDS_CLIENT=n
-1
View File
@@ -47,7 +47,6 @@ CONFIG_DRIVERS_SAFETY_BUTTON=y
CONFIG_COMMON_TELEMETRY=y
CONFIG_DRIVERS_TONE_ALARM=y
CONFIG_DRIVERS_UAVCAN=y
CONFIG_BOARD_UAVCAN_INTERFACES=3
CONFIG_COMMON_UWB=y
CONFIG_MODULES_AIRSPEED_SELECTOR=y
CONFIG_MODULES_BATTERY_STATUS=y
@@ -54,7 +54,6 @@ CONFIG_DEBUG_MEMFAULT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_TCBINFO=y
CONFIG_DEV_FIFO_SIZE=0
CONFIG_DEV_GPIO=y
CONFIG_DEV_PIPE_SIZE=70
CONFIG_DEV_URANDOM=y
CONFIG_ETH0_PHY_MULTI=y
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

+4 -8
View File
@@ -312,17 +312,15 @@
- [Actuator Allocation](config/actuators.md)
- [ESC Calibration](advanced_config/esc_calibration.md)
- [ESCs & Motors](peripherals/esc_motors.md)
- [ESC Protocols](esc/esc_protocols.md)
- [PWM ESCs and Servos](peripherals/pwm_escs_and_servo.md)
- [DShot ESCs](peripherals/dshot.md)
- [OneShot ESCs and Servos](peripherals/oneshot.md)
- [DroneCAN ESCs](dronecan/escs.md)
- [Zubax Telega](dronecan/zubax_telega.md)
- [PX4 Sapog ESC Firmware](dronecan/sapog.md)
- [ARK 4IN1 ESC](esc/ark_4in1_esc.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq Motor/ESC Modules](peripherals/vertiq.md)
- [VESC Project ESCs](peripherals/vesc.md)
- [Zubax Telega ESCs](dronecan/zubax_telega.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq](peripherals/vertiq.md)
- [VESC](peripherals/vesc.md)
- [Radio Control (RC)](getting_started/rc_transmitter_receiver.md)
- [Radio Setup](config/radio.md)
- [Flight Modes](config/flight_mode.md)
@@ -501,7 +499,6 @@
- [PPS Time Synchronization](advanced/pps_time_sync.md)
- [Middleware](middleware/index.md)
- [uORB Messaging](middleware/uorb.md)
- [uORB Docs Standard](uorb/uorb_documentation.md)
- [uORB Graph](middleware/uorb_graph.md)
- [uORB Message Reference](msg_docs/index.md)
- [Versioned](msg_docs/versioned_messages.md)
@@ -564,7 +561,6 @@
- [DebugKeyValue](msg_docs/DebugKeyValue.md)
- [DebugValue](msg_docs/DebugValue.md)
- [DebugVect](msg_docs/DebugVect.md)
- [DeviceInformation](msg_docs/DeviceInformation.md)
- [DifferentialPressure](msg_docs/DifferentialPressure.md)
- [DistanceSensor](msg_docs/DistanceSensor.md)
- [DistanceSensorModeChangeRequest](msg_docs/DistanceSensorModeChangeRequest.md)
@@ -25,7 +25,6 @@ It may also be supported on other boards.
Supported flight controllers include:
- [ARK Electronics ARKV6X](../flight_controller/ark_v6x.md)
- [CUAV Pixhawk V6X](../flight_controller/cuav_pixhawk_v6x.md)
- [Holybro Pixhawk 5X](../flight_controller/pixhawk5x.md)
- [Holybro Pixhawk 6X](../flight_controller/pixhawk6x.md)
+17 -518
View File
@@ -1798,16 +1798,6 @@ The default failsafe value is set according to the selected function:
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### PCA9685_I2C_ADDR (`INT32`) {#PCA9685_I2C_ADDR}
I2C address of PCA9685.
The default address is 0x40 (64).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 127 | | 64 |
### PCA9685_MAX1 (`INT32`) {#PCA9685_MAX1}
PCA9685 Output Channel 1 Maximum Value.
@@ -4924,39 +4914,6 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_DIS10 (`INT32`) {#SIM_GZ_EC_DIS10}
SIM_GZ ESC 10 Disarmed Value.
This is the output value that is set when not armed.
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_DIS11 (`INT32`) {#SIM_GZ_EC_DIS11}
SIM_GZ ESC 11 Disarmed Value.
This is the output value that is set when not armed.
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_DIS12 (`INT32`) {#SIM_GZ_EC_DIS12}
SIM_GZ ESC 12 Disarmed Value.
This is the output value that is set when not armed.
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_DIS2 (`INT32`) {#SIM_GZ_EC_DIS2}
SIM_GZ ESC 2 Disarmed Value.
@@ -5034,17 +4991,6 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_DIS9 (`INT32`) {#SIM_GZ_EC_DIS9}
SIM_GZ ESC 9 Disarmed Value.
This is the output value that is set when not armed.
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_FAIL1 (`INT32`) {#SIM_GZ_EC_FAIL1}
SIM_GZ ESC 1 Failsafe Value.
@@ -5056,39 +5002,6 @@ When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC1
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 1000 | | -1 |
### SIM_GZ_EC_FAIL10 (`INT32`) {#SIM_GZ_EC_FAIL10}
SIM_GZ ESC 10 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC10).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 1000 | | -1 |
### SIM_GZ_EC_FAIL11 (`INT32`) {#SIM_GZ_EC_FAIL11}
SIM_GZ ESC 11 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC11).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 1000 | | -1 |
### SIM_GZ_EC_FAIL12 (`INT32`) {#SIM_GZ_EC_FAIL12}
SIM_GZ ESC 12 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC12).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 1000 | | -1 |
### SIM_GZ_EC_FAIL2 (`INT32`) {#SIM_GZ_EC_FAIL2}
SIM_GZ ESC 2 Failsafe Value.
@@ -5166,17 +5079,6 @@ When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC8
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 1000 | | -1 |
### SIM_GZ_EC_FAIL9 (`INT32`) {#SIM_GZ_EC_FAIL9}
SIM_GZ ESC 9 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC9).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 1000 | | -1 |
### SIM_GZ_EC_FUNC1 (`INT32`) {#SIM_GZ_EC_FUNC1}
SIM_GZ ESC 1 Output Function.
@@ -5248,219 +5150,6 @@ The default failsafe value is set according to the selected function:
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### SIM_GZ_EC_FUNC10 (`INT32`) {#SIM_GZ_EC_FUNC10}
SIM_GZ ESC 10 Output Function.
Select what should be output on SIM_GZ ESC 10.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### SIM_GZ_EC_FUNC11 (`INT32`) {#SIM_GZ_EC_FUNC11}
SIM_GZ ESC 11 Output Function.
Select what should be output on SIM_GZ ESC 11.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### SIM_GZ_EC_FUNC12 (`INT32`) {#SIM_GZ_EC_FUNC12}
SIM_GZ ESC 12 Output Function.
Select what should be output on SIM_GZ ESC 12.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### SIM_GZ_EC_FUNC2 (`INT32`) {#SIM_GZ_EC_FUNC2}
SIM_GZ ESC 2 Output Function.
@@ -5958,77 +5647,6 @@ The default failsafe value is set according to the selected function:
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### SIM_GZ_EC_FUNC9 (`INT32`) {#SIM_GZ_EC_FUNC9}
SIM_GZ ESC 9 Output Function.
Select what should be output on SIM_GZ ESC 9.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### SIM_GZ_EC_MAX1 (`INT32`) {#SIM_GZ_EC_MAX1}
SIM_GZ ESC 1 Maximum Value.
@@ -6039,36 +5657,6 @@ Maxmimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 1000 |
### SIM_GZ_EC_MAX10 (`INT32`) {#SIM_GZ_EC_MAX10}
SIM_GZ ESC 10 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 1000 |
### SIM_GZ_EC_MAX11 (`INT32`) {#SIM_GZ_EC_MAX11}
SIM_GZ ESC 11 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 1000 |
### SIM_GZ_EC_MAX12 (`INT32`) {#SIM_GZ_EC_MAX12}
SIM_GZ ESC 12 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 1000 |
### SIM_GZ_EC_MAX2 (`INT32`) {#SIM_GZ_EC_MAX2}
SIM_GZ ESC 2 Maximum Value.
@@ -6139,16 +5727,6 @@ Maxmimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 1000 |
### SIM_GZ_EC_MAX9 (`INT32`) {#SIM_GZ_EC_MAX9}
SIM_GZ ESC 9 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 1000 |
### SIM_GZ_EC_MIN1 (`INT32`) {#SIM_GZ_EC_MIN1}
SIM_GZ ESC 1 Minimum Value.
@@ -6159,36 +5737,6 @@ Minimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_MIN10 (`INT32`) {#SIM_GZ_EC_MIN10}
SIM_GZ ESC 10 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_MIN11 (`INT32`) {#SIM_GZ_EC_MIN11}
SIM_GZ ESC 11 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_MIN12 (`INT32`) {#SIM_GZ_EC_MIN12}
SIM_GZ ESC 12 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_MIN2 (`INT32`) {#SIM_GZ_EC_MIN2}
SIM_GZ ESC 2 Minimum Value.
@@ -6259,16 +5807,6 @@ Minimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_MIN9 (`INT32`) {#SIM_GZ_EC_MIN9}
SIM_GZ ESC 9 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1000 | | 0 |
### SIM_GZ_EC_REV (`INT32`) {#SIM_GZ_EC_REV}
Reverse Output Range for SIM_GZ.
@@ -6286,14 +5824,10 @@ Note: this is only useful for servos.
- `5`: SIM_GZ ESC 6
- `6`: SIM_GZ ESC 7
- `7`: SIM_GZ ESC 8
- `8`: SIM_GZ ESC 9
- `9`: SIM_GZ ESC 10
- `10`: SIM_GZ ESC 11
- `11`: SIM_GZ ESC 12
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 4095 | | 0 |
| &nbsp; | 0 | 255 | | 0 |
### SIM_GZ_SV_DIS1 (`INT32`) {#SIM_GZ_SV_DIS1}
@@ -15009,21 +14543,16 @@ If non-negative, then this will be used instead of the online estimated internal
Battery 1 monitoring source.
This parameter controls the source of battery data. The value 'Power Module / Analog'
means that measurements are expected to come from either analog (ADC) inputs
or an I2C power monitor (e.g. INA226). Analog inputs are voltage and current
measurements read from the board's ADC channels, typically from an onboard
voltage divider and current shunt, or an external analog power module.
I2C power monitors are digital sensors on the I2C bus.
If the value is set to 'External' then the system expects to receive MAVLink
or CAN battery status messages, or the battery data is published by an external driver.
This parameter controls the source of battery data. The value 'Power Module'
means that measurements are expected to come from a power module. If the value is set to
'External' then the system expects to receive mavlink battery status messages.
If the value is set to 'ESCs', the battery information are taken from the esc_status message.
This requires the ESC to provide both voltage as well as current (via ESC telemetry).
This requires the ESC to provide both voltage as well as current.
**Values:**
- `-1`: Disabled
- `0`: Power Module / Analog
- `0`: Power Module
- `1`: External
- `2`: ESCs
@@ -15174,21 +14703,16 @@ If non-negative, then this will be used instead of the online estimated internal
Battery 2 monitoring source.
This parameter controls the source of battery data. The value 'Power Module / Analog'
means that measurements are expected to come from either analog (ADC) inputs
or an I2C power monitor (e.g. INA226). Analog inputs are voltage and current
measurements read from the board's ADC channels, typically from an onboard
voltage divider and current shunt, or an external analog power module.
I2C power monitors are digital sensors on the I2C bus.
If the value is set to 'External' then the system expects to receive MAVLink
or CAN battery status messages, or the battery data is published by an external driver.
This parameter controls the source of battery data. The value 'Power Module'
means that measurements are expected to come from a power module. If the value is set to
'External' then the system expects to receive mavlink battery status messages.
If the value is set to 'ESCs', the battery information are taken from the esc_status message.
This requires the ESC to provide both voltage as well as current (via ESC telemetry).
This requires the ESC to provide both voltage as well as current.
**Values:**
- `-1`: Disabled
- `0`: Power Module / Analog
- `0`: Power Module
- `1`: External
- `2`: ESCs
@@ -15300,21 +14824,16 @@ If non-negative, then this will be used instead of the online estimated internal
Battery 3 monitoring source.
This parameter controls the source of battery data. The value 'Power Module / Analog'
means that measurements are expected to come from either analog (ADC) inputs
or an I2C power monitor (e.g. INA226). Analog inputs are voltage and current
measurements read from the board's ADC channels, typically from an onboard
voltage divider and current shunt, or an external analog power module.
I2C power monitors are digital sensors on the I2C bus.
If the value is set to 'External' then the system expects to receive MAVLink
or CAN battery status messages, or the battery data is published by an external driver.
This parameter controls the source of battery data. The value 'Power Module'
means that measurements are expected to come from a power module. If the value is set to
'External' then the system expects to receive mavlink battery status messages.
If the value is set to 'ESCs', the battery information are taken from the esc_status message.
This requires the ESC to provide both voltage as well as current (via ESC telemetry).
This requires the ESC to provide both voltage as well as current.
**Values:**
- `-1`: Disabled
- `0`: Power Module / Analog
- `0`: Power Module
- `1`: External
- `2`: ESCs
@@ -17741,11 +17260,10 @@ Each threshold value is defined by the parameter indicated next to the check. Dr
- `8`: Vertical speed offset (EKF2_REQ_VDRIFT)
- `9`: Spoofing
- `10`: GPS fix type (EKF2_REQ_FIX)
- `11`: Jamming
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 4095 | | 2047 |
| &nbsp; | 0 | 2047 | | 2047 |
### EKF2_GPS_CTRL (`INT32`) {#EKF2_GPS_CTRL}
@@ -20642,14 +20160,6 @@ Mode 6 is intended for use with a ground control station (not necessarily an RTK
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 1 | | 0 |
### GPS_UBX_PPK (`INT32`) {#GPS_UBX_PPK}
Enable MSM7 message output for PPK workflow.
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------------ | ---- |
| &check; | | | | Disabled (0) |
### GPS_YAW_OFFSET (`FLOAT`) {#GPS_YAW_OFFSET}
Heading/Yaw offset for dual antenna GPS.
@@ -39937,17 +39447,6 @@ uavcan::equipment::ahrs::MagneticFieldStrength2
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
### UAVCAN_SUB_MBD (`INT32`) {#UAVCAN_SUB_MBD}
subscription MovingBaselineData.
Enable UAVCAN MovingBaselineData subscription.
ardupilot::gnss::MovingBaselineData
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------------ | ---- |
| &check; | | | | Disabled (0) |
### UAVCAN_SUB_RNG (`INT32`) {#UAVCAN_SUB_RNG}
subscription range finder.
+2 -1
View File
@@ -284,7 +284,7 @@ A particular vehicle might have more/fewer motors and actuators, but the wiring
The following sections explain each part in more detail.
::: tip
If you're using [DroneCAN ESC](../dronecan/escs.md) the control signals will be connected to the CAN BUS instead of the PWM outputs as shown.
If you're using [DroneCAN ESC](../peripherals/esc_motors.md#dronecan) the control signals will be connected to the CAN BUS instead of the PWM outputs as shown.
:::
### Flight Controller Power
@@ -425,6 +425,7 @@ They recommend sensors, power systems, and other components from the same manufa
- [Drone Components & Parts](../getting_started/px4_basic_concepts.md#drone-components-parts) (Basic Concepts)
- [Payloads](../getting_started/px4_basic_concepts.md#payloads) (Basic Concepts)
- [Hardware Selection & Setup](../hardware/drone_parts.md) — information about connecting and configuring specific flight controllers, sensors and other peripherals (e.g. airspeed sensor for planes).
- [Mounting the Flight Controller](../assembly/mount_and_orient_controller.md)
- [Vibration Isolation](../assembly/vibration_isolation.md)
- [Mounting a Compass](../assembly/mount_gps_compass.md)
+6 -41
View File
@@ -1,13 +1,7 @@
# CAN (DroneCAN & Cyphal)
# CAN
[Controller Area Network (CAN)](https://en.wikipedia.org/wiki/CAN_bus) is a robust wired network that allows drone components such as flight controller, ESCs, sensors, and other peripherals, to communicate with each other.
It is particularly recommended on larger vehicles.
## Overview
CAN it is designed to be democratic and uses differential signaling.
For this reason it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
Because it is designed to be democratic and uses differential signaling, it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
CAN also allows status feedback from peripherals and convenient firmware upgrades over the bus.
PX4 supports two software protocols for communicating with CAN devices:
@@ -24,35 +18,29 @@ In 2022 the project split into two: the original version of UAVCAN (UAVCAN v0) w
The differences between the two protocols are outlined in [Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814).
:::
:::warning
PX4 does not support other CAN software protocols for drones such as KDECAN (at time of writing).
:::
## Wiring
The wiring for CAN networks is the same for both DroneCAN and Cyphal/CAN (in fact, for all CAN networks).
Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port).
:::warning Don't connect each CAN peripheral to a separate CAN port!
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy).
:::
Devices are connected in a chain in any order.
At either end of the chain, a 120Ω termination resistor should be connected between the two data lines.
Flight controllers and some GNSS modules have built in termination resistors for convenience, thus should be placed at opposite ends of the chain.
Otherwise, you can use a termination resistor such as [this one from Zubax Robotics](https://shop.zubax.com/products/uavcan-micro-termination-plug?variant=6007985111069), or solder one yourself if you have access to a JST-GH crimper.
The following diagram shows an example of a CAN bus connecting a flight controller to 4 CAN ESCs and a GNSS.
It includes a redundant bus connected to `CAN 2`.
![CAN Wiring](../../assets/can/uavcan_wiring.svg)
The diagram does not show any power wiring.
Refer to your manufacturer instructions to confirm whether components require separate power or can be powered from the CAN bus itself.
::: info
For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax.com/public/cyphal/CyphalCAN-device-interconnection?pageId=2195476) (kb.zubax.com).
While the article is written with the Cyphal protocol in mind, it applies equally to DroneCAN hardware and any other CAN setup.
For more advanced scenarios, consult with [On CAN bus topology and termination](https://forum.opencyphal.org/t/on-can-bus-topology-and-termination/1685).
:::
### Connectors
@@ -66,30 +54,7 @@ However, as long as the device firmware supports DroneCAN or Cyphal, it can be u
DroneCAN and Cyphal/CAN support using a second (redundant) CAN interface.
This is completely optional but increases the robustness of the connection.
Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
### Flight Controllers with Multiple CAN Ports
[Flight Controllers](../flight_controller/index.md) may have up to three independent CAN ports, such as `CAN1`, `CAN2`, `CAN3` (neither DroneCAN or Cyphal support more than three).
Note that you can't have both DroneCAN and Cyphal running on PX4 at the same time.
::: tip
You only _need_ one CAN port to support an arbitrary number of CAN devices using a particular CAN protocol.
Don't connect each CAN peripheral to a separate CAN port!
:::
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy).
If three are three ports, you might use the remaining network for devices that support another CAN protocol.
The documentation for your flight controller should indicate which ports are supported/enabled.
At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console):
```sh
uavcan status
```
Note that you can also check the number of supported CAN interfaces for a board by searching for `CONFIG_BOARD_UAVCAN_INTERFACES` in its [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#) configuration file.
All Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
## Firmware
+10 -42
View File
@@ -10,7 +10,7 @@ If you have [mounted the compass](../assembly/mount_gps_compass.md#compass-orien
## Overview
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to [recalibrate](#recalibration) it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to recalibrate it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
:::tip
Indications of a poor compass calibration include multicopter circling during hover, toilet bowling (circling at increasing radius/spiraling-out, usually constant altitude, leading to fly-way), or veering off-path when attempting to fly straight.
@@ -20,16 +20,13 @@ _QGroundControl_ should also notify the error `mag sensors inconsistent`.
The process calibrates all compasses and autodetects the orientation of any external compasses.
If any external magnetometers are available, it then disables the internal magnetometers (these are primarily needed for automatic rotation detection of external magnetometers).
### Types of Calibration
Several types of compass calibration are available:
1. [Complete](#complete-calibration): This calibration is required after installing the autopilot on an airframe for the first time or when the configuration of the vehicle has changed significantly.
It compensates for hard and soft iron effects by estimating an offset and a scale factor for each axis.
1. [Partial](#partial-quick-calibration): This calibration can be performed as a routine when preparing the vehicle for a flight, after changing the payload, or simply when the compass rose seems inaccurate.
This type of calibration only estimates the offsets to compensate for a hard iron effect.
1. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration.
This type of calibration only estimates the offsets to compensate for a hard iron effect.
1. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration. This type of calibration only estimates the offsets to compensate for a hard iron effect.
## Performing the Calibration
@@ -51,27 +48,23 @@ Before starting the calibration:
The calibration steps are:
1. Start _QGroundControl_ and connect the vehicle.
2. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
3. Click the **Compass** sensor button.
1. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
1. Click the **Compass** sensor button.
![Select Compass calibration PX4](../../assets/qgc/setup/sensor/sensor_compass_select_px4.png)
::: info
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md).
If not, you can also set it here.
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). If not, you can also set it here.
:::
4. Click **OK** to start the calibration.
5. Place the vehicle in any of the orientations shown in red (incomplete) and hold it still.
Once prompted (the orientation-image turns yellow) rotate the vehicle around the specified axis in either/both directions.
Once the calibration is complete for the current orientation the associated image on the screen will turn green.
1. Click **OK** to start the calibration.
1. Place the vehicle in any of the orientations shown in red (incomplete) and hold it still. Once prompted (the orientation-image turns yellow) rotate the vehicle around the specified axis in either/both directions. Once the calibration is complete for the current orientation the associated image on the screen will turn green.
![Compass calibration steps on PX4](../../assets/qgc/setup/sensor/sensor_compass_calibrate_px4.png)
6. Repeat the calibration process for all vehicle orientations.
1. Repeat the calibration process for all vehicle orientations.
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely).
You can then proceed to the next sensor.
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely). You can then proceed to the next sensor.
### Partial "Quick" Calibration
@@ -94,8 +87,7 @@ Notes:
This calibration process leverages external knowledge of vehicle's orientation and location, and a World Magnetic Model (WMM) to calibrate the hard iron biases.
1. Ensure GNSS Fix.
This is required to find the expected Earth magnetic field in WMM tables.
1. Ensure GNSS Fix. This is required to find the expected Earth magnetic field in WMM tables.
2. Align the vehicle to face True North.
Be as accurate as possible for best results.
3. Open the [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) and send the following command:
@@ -115,30 +107,6 @@ Notes:
After the calibration is complete, check that the heading indicator and the heading of the arrow on the map are stable and match the orientation of the vehicle when turning it e.g. to the cardinal directions.
## Recalibration
Recalibration is recommended whenever the magnetic environment of the vehicle has changed or when heading behavior appears unreliable.
You can use either complete calibration or mag quick calibration depending on the size of the vehicle and your ability to rotate it through the required orientations.
Complete calibration provides the most accurate soft-iron compensation.
Recalibrate the compass when:
- _The compass module or its mounting orientation has changed._
This includes replacing the GPS or mag unit, rotating the mast, or altering how the module is fixed to the airframe.
- _The vehicle has been exposed to a strong magnetic disturbance._
Examples include transport or storage near large steel structures, welding operations near the airframe, or operation close to high-current equipment.
- _Structural, wiring, or payload changes may have altered the magnetic field around the sensors._
New payloads, rerouted wires, additional batteries, or metal fasteners can introduce soft-iron effects that affect heading accuracy.
- _The vehicle is operated in a region with significantly different magnetic characteristics._
Large changes in latitude, longitude, or magnetic inclination can require re-estimation of offsets.
- _QGroundControl reports magnetometer inconsistencies_.
For example, if you see the error `mag sensors inconsistent`.
- _Heading behavior does not match the vehicles observed orientation._
Symptoms include drifting yaw, sudden heading jumps when attempting to fly straight, and toilet bowling
- _QGroundControl_ sends the error `mag sensors inconsistent`.
This indicates that multiple magnetometers are reporting different headings.
## Additional Calibration/Configuration
The process above will autodetect, [set default rotations](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT), calibrate, and prioritise, all available magnetometers.
+5 -5
View File
@@ -70,7 +70,7 @@ Airframes with more than two frequency noise spikes typically clean the first tw
Dynamic notch filters use ESC RPM feedback and/or the onboard FFT analysis.
The ESC RPM feedback is used to track the rotor blade pass frequency and its harmonics, while the FFT analysis can be used to track a frequency of another vibration source, such as a fuel engine.
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/dshot.md) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/esc_motors.md#dshot) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
Before enabling, make sure that the ESC RPM is correct.
You might have to adjust the [pole count of the motors](../advanced_config/parameter_reference.md#MOT_POLE_COUNT).
@@ -92,10 +92,10 @@ To reduce the control latency, we want to increase the cutoff frequency for the
The effect on latency of increasing `IMU_GYRO_CUTOFF` is approximated below.
| Cutoff (Hz) | Delay approx. (ms) |
| ----------- | ------------------ |
| 30 | 8 |
| 60 | 3.8 |
| 120 | 1.9 |
| ------------ | ------------------ |
| 30 | 8 |
| 60 | 3.8 |
| 120 | 1.9 |
However this is a trade-off as increasing `IMU_GYRO_CUTOFF` will also increase the noise of the signal that is fed to the motors.
Noise on the motors has the following consequences:
-1
View File
@@ -95,7 +95,6 @@ Set the following parameters in _QGroundControl_:
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.
-1
View File
@@ -92,7 +92,6 @@ Set the following parameters in _QGroundControl_:
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.
+1 -8
View File
@@ -1,14 +1,7 @@
# DroneCAN ESCs
PX4 supports DroneCAN compliant ESCs.
## Supported ESC
:::info
[Supported ESCs](../peripherals/esc_motors#supported-esc) in _ESCs & Motors_ may include additional devices that are not listed below.
:::
The following articles have specific hardware/firmware information:
For more information, see the following articles for specific hardware/firmware:
- [PX4 Sapog ESC Firmware](sapog.md)
- [Holybro Kotleta 20](holybro_kotleta.md)
-58
View File
@@ -1,58 +0,0 @@
# ARK 4IN1 ESC (with/without Connectors)
4 in 1 Electronic Speed Controller (ESC) that is made in the USA, NDAA compliant, and DIU Blue Framework listed.
The ESC comes in variants without connectors that you can solder in place, and a variant that has built-in motor and battery connectors (no soldering required).
![ARK 4IN1 ESC without connectors ](../../assets/hardware/esc/ark/ark_4_in_1_esc.jpg)![ARK 4IN1 ESC with connectors](../../assets/hardware/esc/ark/ark_4_in_1_esc_with_connectors.jpg)
## Where to Buy
Order this module from:
- [4IN1 ESC (with connectors)](https://arkelectron.com/product/ark-4in1-esc/) (ARK Electronics - US)
- [ARK Electronics (without connectors)](https://arkelectron.com/product/ark-4in1-esc-cons/) (ARK Electronics US)
## Hardware Specifications
- Battery Voltage: 3-8s
- 6V Minimum
- 65V Absolute Maximum
- Current Rating: 50A Continuous, 75A Burst Per Motor
- [STM32F0](https://www.st.com/en/microcontrollers-microprocessors/stm32f0-series.html)
- [AM32 Firmware](https://github.com/am32-firmware/AM32/pull/27)
- Onboard Current Sensor, Serial Telemetry
- 100V/A
- Input Protocols
- DShot (300, 600)
- Bi-directional DShot
- KISS Serial Telemetry
- PWM
- 8 Pin JST-SH Input/Output
- 10 Pin JST-SH Debug
- Motor & Battery Connectors (with-connector version)
- MR30 Connector Limit Per Motor: 30A Continuous, 40A Burst
- Four MR30 Motor Connectors
- Dimensions (with connectors)
- Size: 77.00mm x 42.00mm x 9.43mm
- Mounting Pattern: 30.5mm
- Weight: 24g
- Dimensions (without connectors)
- Size: 43.00mm x 40.50mm x 7.60mm
- Mounting Pattern: 30.5mm
- Weight: 14.5g
Other
- Made in the USA
- Open source AM32 firmware
- [DIU Blue Framework Listed](https://www.diu.mil/blue-uas/framework)
## See Also
- [ARK 4IN1 ESC CONS](https://docs.arkelectron.com/electronic-speed-controller/ark-4in1-esc) (ARK Docs)
-66
View File
@@ -1,66 +0,0 @@
# ESC Protocols
This topic lists the main [Electronic Speed Controller (ESC)](../peripherals/esc_motors.md) protocols supported by PX4.
## DShot
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduced latency, in particular racing multicopters, VTOL vehicles, and so on.
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can reverse motor spin directions.
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
Selecting a higher rate DShot ESC in the UI results in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
## DroneCAN
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
The PX4 implementation is currently limited to update rates of 200 Hz.
DroneCAN shares many similar benefits to [DShot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
## PWM
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired speed.
The pulse width typically ranges between 1000 μs for zero power and 2000 μs for full power.
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50 Hz and 490 Hz (the theoretical maximum being 500 Hz for a very small "off" cycle).
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
For PWM servos 50 Hz is usually sufficient, and many don't support higher rates.
![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png)
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the pulse widths representing low and high values can vary significantly.
Unlike [DShot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
## OneShot 125
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
There are a number of variants of the OneShot protocol, which support different rates.
PX4 only supports OneShot 125.
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125 μs to 250 μs for zero to full power).
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
The actual supported rate depends on the ESC used.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
-2
View File
@@ -280,8 +280,6 @@ For more information see: [Plotting uORB Topic Data in Real Time using PlotJuggl
## See Also
- [uORB Documentation Standard](../uorb/uorb_documentation.md)
- _PX4 uORB Explained_ Blog series
- [Part 1](https://px4.io/px4-uorb-explained-part-1/)
- [Part 2](https://px4.io/px4-uorb-explained-part-2/)
+32 -34
View File
@@ -15,6 +15,38 @@ Subcategories:
- [Rpm Sensor](modules_driver_rpm_sensor.md)
- [Transponder](modules_driver_transponder.md)
## MCP23009
Source: [drivers/gpio/mcp23009](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/gpio/mcp23009)
### Usage {#MCP23009_usage}
```
MCP23009 <command> [arguments...]
Commands:
start
[-I] Internal I2C bus(es)
[-X] External I2C bus(es)
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
(default=1))
[-f <val>] bus frequency in kHz
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 37
[-D <val>] Direction
default: 0
[-O <val>] Output
default: 0
[-P <val>] Pullups
default: 0
[-U <val>] Update Interval [ms]
default: 0
stop
status print status info
```
## atxxxx
Source: [drivers/osd/atxxxx](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/osd/atxxxx)
@@ -717,40 +749,6 @@ lsm303agr <command> [arguments...]
status print status info
```
## mcp230xx
Source: [lib/drivers/mcp_common](https://github.com/PX4/PX4-Autopilot/tree/main/src/lib/drivers/mcp_common)
### Usage {#mcp230xx_usage}
```
mcp230xx <command> [arguments...]
Commands:
start
[-I] Internal I2C bus(es)
[-X] External I2C bus(es)
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
(default=1))
[-f <val>] bus frequency in kHz
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 39
[-D <val>] Direction (1=Input, 0=Output)
default: 0
[-O <val>] Output
default: 0
[-P <val>] Pullups
default: 0
[-U <val>] Update Interval [ms]
default: 0
[-M <val>] First minor number
default: 0
stop
status print status info
```
## mcp9808
Source: [drivers/temperature_sensor/mcp9808](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/temperature_sensor/mcp9808)
-4
View File
@@ -127,10 +127,6 @@ commander <command> [arguments...]
check Run preflight checks
safety Change prearm safety state
on|off [on] to activate safety, [off] to deactivate safety and allow
control surface movements
arm
[-f] Force arming (do not run preflight checks)
+5 -5
View File
@@ -2,7 +2,7 @@
Battery status
Battery status information for up to 3 battery instances.
Battery status information for up to 4 battery instances.
These are populated from power module and smart battery device drivers, and one battery updated from MAVLink.
Battery instance information is also logged and streamed in MAVLink telemetry.
@@ -11,7 +11,7 @@ Battery instance information is also logged and streamed in MAVLink telemetry.
```c
# Battery status
#
# Battery status information for up to 3 battery instances.
# Battery status information for up to 4 battery instances.
# These are populated from power module and smart battery device drivers, and one battery updated from MAVLink.
# Battery instance information is also logged and streamed in MAVLink telemetry.
@@ -33,9 +33,9 @@ uint8 cell_count # [-] [@invalid 0] Number of cells
uint8 source # [@enum SOURCE] Battery source
uint8 SOURCE_POWER_MODULE = 0 # Power module (analog ADC or I2C power monitor)
uint8 SOURCE_EXTERNAL = 1 # External (MAVLink, CAN, or external driver)
uint8 SOURCE_ESCS = 2 # ESCs (via ESC telemetry)
uint8 SOURCE_POWER_MODULE = 0 # Power module
uint8 SOURCE_EXTERNAL = 1 # External
uint8 SOURCE_ESCS = 2 # ESCs
uint8 priority # [-] Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
uint16 capacity # [mAh] Capacity of the battery when fully charged
+3 -3
View File
@@ -32,9 +32,9 @@ uint8 cell_count # [@invalid 0] Number of cells
uint8 source # [@enum SOURCE] Battery source
uint8 SOURCE_POWER_MODULE = 0 # Power module (analog ADC or I2C power monitor)
uint8 SOURCE_EXTERNAL = 1 # External (MAVLink, CAN, or external driver)
uint8 SOURCE_ESCS = 2 # ESCs (via ESC telemetry)
uint8 SOURCE_POWER_MODULE = 0 # Power module
uint8 SOURCE_EXTERNAL = 1 # External
uint8 SOURCE_ESCS = 2 # ESCs
uint8 priority # Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
uint16 capacity # [mAh] Capacity of the battery when fully charged
-45
View File
@@ -1,45 +0,0 @@
# DeviceInformation (UORB message)
Device information
Can be used to uniquely associate a device_id from a sensor topic with a physical device using serial number.
as well as tracking of the used firmware versions on the devices.
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/DeviceInformation.msg)
```c
# Device information
#
# Can be used to uniquely associate a device_id from a sensor topic with a physical device using serial number.
# as well as tracking of the used firmware versions on the devices.
uint64 timestamp # time since system start (microseconds)
uint8 device_type # [@enum DEVICE_TYPE] Type of the device. Matches MAVLink DEVICE_TYPE enum
uint8 DEVICE_TYPE_GENERIC = 0 # Generic/unknown sensor
uint8 DEVICE_TYPE_AIRSPEED = 1 # Airspeed sensor
uint8 DEVICE_TYPE_ESC = 2 # ESC
uint8 DEVICE_TYPE_SERVO = 3 # Servo
uint8 DEVICE_TYPE_GPS = 4 # GPS
uint8 DEVICE_TYPE_MAGNETOMETER = 5 # Magnetometer
uint8 DEVICE_TYPE_PARACHUTE = 6 # Parachute
uint8 DEVICE_TYPE_RANGEFINDER = 7 # Rangefinder
uint8 DEVICE_TYPE_WINCH = 8 # Winch
uint8 DEVICE_TYPE_BAROMETER = 9 # Barometer
uint8 DEVICE_TYPE_OPTICAL_FLOW = 10 # Optical flow
uint8 DEVICE_TYPE_ACCELEROMETER = 11 # Accelerometer
uint8 DEVICE_TYPE_GYROSCOPE = 12 # Gyroscope
uint8 DEVICE_TYPE_DIFFERENTIAL_PRESSURE = 13 # Differential pressure
uint8 DEVICE_TYPE_BATTERY = 14 # Battery
uint8 DEVICE_TYPE_HYGROMETER = 15 # Hygrometer
char[32] vendor_name # Name of the device vendor
char[32] model_name # Name of the device model
uint32 device_id # [-] [@invalid 0 if not available] Unique device ID for the sensor. Does not change between power cycles.
char[24] firmware_version # [-] [@invalid empty if not available] Firmware version.
char[24] hardware_version # [-] [@invalid empty if not available] Hardware version.
char[33] serial_number # [-] [@invalid empty if not available] Device serial number or unique identifier.
```
-1
View File
@@ -21,7 +21,6 @@ uint8 GPS_CHECK_FAIL_MAX_VERT_DRIFT = 7 # 7 : maximum allowed vertical position
uint8 GPS_CHECK_FAIL_MAX_HORZ_SPD_ERR = 8 # 8 : maximum allowed horizontal speed fail - requires stationary vehicle
uint8 GPS_CHECK_FAIL_MAX_VERT_SPD_ERR = 9 # 9 : maximum allowed vertical velocity discrepancy fail
uint8 GPS_CHECK_FAIL_SPOOFED = 10 # 10 : GPS signal is spoofed
uint8 GPS_CHECK_FAIL_JAMMED = 11 # 11 : GPS signal is jammed
uint64 control_mode_flags # Bitmask to indicate EKF logic state
uint8 CS_TILT_ALIGN = 0 # 0 - true if the filter tilt alignment is complete
-1
View File
@@ -6,7 +6,6 @@ GPIO mask and state
```c
# GPIO mask and state
uint8 MAX_INSTANCES = 8
uint64 timestamp # time since system start (microseconds)
uint32 device_id # Device id
+1 -5
View File
@@ -9,15 +9,11 @@ This message is used to dump the raw gps communication to the log.
uint64 timestamp # time since system start (microseconds)
uint8 INSTANCE_MAIN = 0
uint8 INSTANCE_SECONDARY = 1
uint8 instance # Instance of GNSS receiver
uint32 device_id
uint8 len # length of data, MSB bit set = message to the gps device,
# clear = message from the device
uint8[79] data # data to write to the log
uint8 ORB_QUEUE_LENGTH = 16
uint8 ORB_QUEUE_LENGTH = 8
```
-5
View File
@@ -108,7 +108,6 @@ uint16 VEHICLE_CMD_LOGGING_START = 2510 # Start streaming ULog data.
uint16 VEHICLE_CMD_LOGGING_STOP = 2511 # Stop streaming ULog data.
uint16 VEHICLE_CMD_CONTROL_HIGH_LATENCY = 2600 # Control starting/stopping transmitting data over the high latency link.
uint16 VEHICLE_CMD_DO_VTOL_TRANSITION = 3000 # Command VTOL transition.
uint16 VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300 # Command safety on/off. |1 to activate safety, 0 to deactivate safety and allow control surface movements|Unused|Unused|Unused|Unused|Unused|Unused|
uint16 VEHICLE_CMD_ARM_AUTHORIZATION_REQUEST = 3001 # Request arm authorization.
uint16 VEHICLE_CMD_PAYLOAD_PREPARE_DEPLOY = 30001 # Prepare a payload deployment in the flight plan.
uint16 VEHICLE_CMD_PAYLOAD_CONTROL_DEPLOY = 30002 # Control a pre-programmed payload deployment.
@@ -188,10 +187,6 @@ int8 ARMING_ACTION_ARM = 1
uint8 GRIPPER_ACTION_RELEASE = 0
uint8 GRIPPER_ACTION_GRAB = 1
# Used as param1 in DO_SET_SAFETY_SWITCH_STATE command.
uint8 SAFETY_OFF = 0
uint8 SAFETY_ON = 1
uint8 ORB_QUEUE_LENGTH = 8
float32 param1 # Parameter 1, as defined by MAVLink uint16 VEHICLE_CMD enum.
-1
View File
@@ -105,7 +105,6 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [DebugKeyValue](DebugKeyValue.md)
- [DebugValue](DebugValue.md)
- [DebugVect](DebugVect.md)
- [DeviceInformation](DeviceInformation.md) — Device information
- [DifferentialPressure](DifferentialPressure.md) — Differential-pressure (airspeed) sensor
- [DistanceSensor](DistanceSensor.md) — DISTANCE_SENSOR message data
- [DistanceSensorModeChangeRequest](DistanceSensorModeChangeRequest.md)
+2 -4
View File
@@ -11,10 +11,6 @@ DShot is an alternative ESC protocol that has several advantages over [PWM](../p
This topic shows how to connect and configure DShot ESCs.
## Supported ESC
[ESCs & Motors > Supported ESCs](../peripherals/esc_motors#supported-esc) has a list of supported ESC (check "Protocols" column for DShot ESC).
## Wiring/Connections {#wiring}
DShot ESC are wired the same way as [PWM ESCs](pwm_escs_and_servo.md).
@@ -80,6 +76,7 @@ The most important ones are:
```
- Permanently set the spin direction of a motor connected to FMU output pin 1 (while motors are _not_ spinning):
- Set spin direction to `reversed`:
```sh
@@ -107,6 +104,7 @@ The most important ones are:
```
::: info
- The commands will have no effect if the motors are spinning, or if the ESC is already set to the corresponding direction.
- The ESC will revert to its last saved direction (normal or reversed) on reboot if `save` is not called after changing the direction.
+68 -32
View File
@@ -3,44 +3,80 @@
Many PX4 drones use brushless motors that are driven by the flight controller via an Electronic Speed Controller (ESC).
The ESC takes a signal from the flight controller and uses it to set control the level of power delivered to the motor.
PX4 supports a number of [common protocols](../esc/esc_protocols.md) for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
## Supported ESC
The following list is non-exhaustive.
| ESC Device | Protocols | Firmwares | Notes |
| ------------------------------ | ------------------------------------ | ------------------------ | ----------------------------------------------------- |
| [ARK 4IN1 ESC] | [Dshot], [PWM] | [AM32] | Has versions with/without connnectors |
| [Holybro Kotleta 20] | [DroneCAN], [PWM] | [PX4 Sapog ESC Firmware] | |
| [Vertiq Motor & ESC modules] | [Dshot], [OneShot], Multishot, [PWM] | Vertiq firmware | Larger modules support DroneCAN, ESC and Motor in one |
| [RaccoonLab CAN PWM ESC nodes] | [DroneCAN], Cyphal | | Cyphal and DroneCAN notes for PWM ESC |
| [VESC ESCs] | [DroneCAN], [PWM] | VESC project firmware | |
| [Zubax Telega] | [DroneCAN], [PWM] | Telega-based | ESC and Motor in one |
<!-- Links for table above -->
[ARK 4IN1 ESC]: ../esc/ark_4in1_esc.md
[AM32]: https://am32.ca/
[PX4 Sapog ESC Firmware]: ../dronecan/sapog.md
[VESC ESCs]: ../peripherals/vesc.md
[DroneCAN]: ../dronecan/escs.md
[Dshot]: ../peripherals/dshot.md
[OneShot]: ../peripherals/oneshot.md
[PWM]: ../peripherals/pwm_escs_and_servo.md
[Holybro Kotleta 20]: ../dronecan/holybro_kotleta.md
[Vertiq Motor & ESC modules]: ../peripherals/vertiq.md
[RaccoonLab CAN PWM ESC nodes]: ../dronecan/raccoonlab_nodes.md
[Zubax Telega]: ../dronecan/zubax_telega.md
## See Also
PX4 supports a number of common protocols for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
For more information see:
- [ESC Protocols](../esc/esc_protocols.md) — overview of main ESC/Servo protocols supported by PX4
- [PWM ESCs and Servos](../peripherals/pwm_escs_and_servo.md)
- [OneShot ESCs and Servos](../peripherals/oneshot.md)
- [DShot](../peripherals/dshot.md)
- [DroneCAN ESCs](../dronecan/escs.md)
- [ESC Calibration](../advanced_config/esc_calibration.md)
- [ESC Firmware and Protocols Overview](https://oscarliang.com/esc-firmware-protocols/) (oscarliang.com)
A high level overview of the main ESC/Servo protocols supported by PX4 is given below.
## ESC Protocols
### PWM
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired power level.
The pulse wdith typically ranges between 1000uS for zero power and 2000uS for full power.
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50Hz and 490 Hz (the theoretical maximum being 500Hz for a very small "off" cycle).
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
For PWM servos 50Hz is usually sufficient, and many don't support higher rates.
![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png)
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the range values representing low and high values can vary significantly.
Unlike [dshot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
### Oneshot 125
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
There are a number of variants of the OneShot protocol, which support different rates.
PX4 only supports OneShot 125.
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125us to 250us for zero to full power).
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
The actual supported rate depends on the ESC used.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
### DShot
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduce latency, in particular racing multicopters, VTOL vehicles, and so on.
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can revers motor spin directions
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
Selecting a higher rate DShot ESC in the UI result in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
### DroneCAN
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
The PX4 implementation is currently limited to update rates of 200Hz.
DroneCAN shares many similar benefits to [Dshot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
-1
View File
@@ -55,7 +55,6 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
### Sensors
- Add [sbgECom INS driver](../sensor/sbgecom.md) ([PX4-Autopilot#24137](https://github.com/PX4/PX4-Autopilot/pull/24137))
- Quick magnetometer calibration now supports specifying an arbitrary initial heading ([PX4-Autopilot#24637](https://github.com/PX4/PX4-Autopilot/pull/24637))
### Simulation
-170
View File
@@ -1,170 +0,0 @@
# uORB Documentation Standard
This topic demonstrates and explains how to document uORB messages.
::: info
At time of writing many topics have not been updated.
:::
## Overview
The [AirspeedValidated](../msg_docs/AirspeedValidated.md) message shown below is a good example of a uORB topic that has been documented to the current standard.
```py
# Validated airspeed
#
# Provides information about airspeed (indicated, true, calibrated) and the source of the data.
# Used by controllers, estimators and for airspeed reporting to operator.
uint32 MESSAGE_VERSION = 1
uint64 timestamp # [us] Time since system start
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
float32 calibrated_airspeed_m_s # [m/s] [@invalid NaN] Calibrated airspeed (CAS)
float32 true_airspeed_m_s # [m/s] [@invalid NaN] True airspeed (TAS)
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
int8 SOURCE_SENSOR_1 = 1 # Sensor 1
int8 SOURCE_SENSOR_2 = 2 # Sensor 2
int8 SOURCE_SENSOR_3 = 3 # Sensor 3
int8 SOURCE_SYNTHETIC = 4 # Synthetic airspeed
float32 calibrated_ground_minus_wind_m_s # [m/s] [@invalid NaN] CAS calculated from groundspeed - windspeed, where windspeed is estimated based on a zero-sideslip assumption
float32 calibraded_airspeed_synth_m_s # [m/s] [@invalid NaN] Synthetic airspeed
float32 airspeed_derivative_filtered # [m/s^2] Filtered indicated airspeed derivative
float32 throttle_filtered # [-] Filtered fixed-wing throttle
float32 pitch_filtered # [rad] Filtered pitch
```
The main things to note are:
- Documentation is added using formatted uORB comments.
Any text on a line after the `#` character is a comment, except for lines that start with the text `# TOPIC` (which indicates a multi-topic message).
- The message starts with a comment block consisting of short description (mandatory), followed by a longer description and then a space.
- Field and constants almost all have comments.
The comments are added on the same line as the field/constant, separated by one space.
- Fields:
- Comments are all on the same line as the field (extra lines become internal comments).
- Comments start with metadata, such as the units (`[m/s]`, `[rad/s]`) or allowed values (`[@enum SOURCE]`), and can also list invalid values (`[@invalid NaN]`) and allowed ranges (`[@range min, max]`).
- Units are required except for boolean fields or for fields with an enum value.
`[-]` is used to indicate unitless fields.
- Comments follow the metadata after a space.
The line should not be terminated in a full stop.
- Constants:
- Don't have metadata: the description follows the comment marker after one space.
- Some constants, such as `MESSAGE_VERSION`, don't need documentation because they are standardized.
- Constants with the same name prefix are grouped together as enums after the associated field.
The following sections expand on the allowed formats.
## Message Description
Every message should start with a comment block that describes the message:
```py
# Short description (mandatory)
#
# Longer description for the message if needed.
# Can be multiline, and should have punctuation.
# Should be followed by an empty line.
```
This consists of a mandatory short description, optionally followed by an empty comment line, and then a longer description.
Short description (mandatory):
- A succinct explanation for the purpose of the message.
- Usually just one line without a terminating full stop.
- Minimally it may just mirror the message name.
- For example, [`AirspeedValidated`](../msg_docs/AirspeedValidated.md) above has the short description `Validated airspeed`.
Long description (Optional):
- Additional context required to understand how the message is used.
- In particular this should be anything that can't be inferred from the name, fields or constants, such as the publishers and expected consumers.
It might also cover whether the message is only used for a particular frame type or mode.
- The message is often multiline and contains punctuation.
- May include comment lines that are empty, in order to indicate paragraphs.
Both short and long descriptions may be multi-line.
Single line descriptions should not include a terminating full stop, but multiline comments should do so.
The message description block ends at the first non-comment line, which should be an empty line, but might be a field or constant.
Any subsequent comment lines are considered "internal comments".
### Fields
A typical field comment looks like this:
```py
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
```
Field comments must all be on the same line as the field, and consist of optional metadata followed by a description:
- `metadata` (Optional)
- Information about the field units and allowed values:
- `[<unit>]`
- The unit of measurement inside square brackets (note, no `@` delineator indicates a unit), such as `[m]` for metres.
- Allowed units include: `m`, `m/s`, `m/s^2`, `rad`, `rad/s`, `rpm`, `V`, `A`, `mA`, `mAh`, `W`, `dBm`, `s`, `ms`, `us`, `Ohm`, `MB`, `Kb/s`, `degC`, `Pa`.
- Units are required unless clearly invalid, such as when the field is a boolean, or is an enum value.
- Unitless values should be specified as `[-]`.
Note though that units are not required for boolean fields or enum fields.
- `[@enum <enum_name>]`
- The `enum_name` gives the prefix of constant values in the message that can be assigned to the field.
Note that enums in uORB are just a naming convention: they are not explicitly declared.
Multiple enum names allowed for a field indicates a possible error in the field design.
- `[@range <lower_value>, <upper_value>]`
- The allowed range of the field, specified as a `lower_value` and/or an `upper_value`.
Either value can be omitted to indicate an unbounded upper or lower value.
For example `[@range 0, 3]`, `[@range 5.3, ]`, `[@range , 3]`.
- `[@invalid <value> <description>]`
- The `value` to set the field to indicate that the field doesn't contain valid data, such as `[@invalid NaN]`.
The `description` is optional, and might be used to indicate the conditions under which data is invalid.
- `[@frame <value>]`
- The `frame` in which the field is set, such as `[@frame NED]` or `[@frame Body]`.
- `description`
- A concise description of the purpose of the field, and including any important information that can't be inferred from the name!
Use a capital first letter, and omit the full stop if the description is a single sentence.
Multiple sentences may also omit the final full stop.
### Constants
Constants follow the documentation conventions as fields except they only have a description (no metadata).
Documentation for a constant might look like this:
```py
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
```
Constants are often grouped together following a field as enum values.
Note below how the prefix `SOURCE` for the values is specified as an enum against the _field_.
```py
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
...
```
A small number of constants have a standardised meaning and do not require documentation.
These are:
- `ORB_QUEUE_LENGTH`
- `MESSAGE_VERSION`
### `# TOPICS`
The prefix `# TOPICS` is used to indicate topic names for multi-topic messages.
For example, the [VehicleGlobalPosition.msg](../msg_docs/VehicleGlobalPosition.md) message definition is used to define the topic ids as shown:
```text
# TOPICS vehicle_global_position vehicle_global_position_groundtruth external_ins_global_position
# TOPICS estimator_global_position
# TOPICS aux_global_position
```
At time of writing there is no format for documenting these.
+4 -8
View File
@@ -315,17 +315,15 @@
- [ADSB/FLARM (트래픽 회피)](config/actuators.md)
- [ESC 보정](advanced_config/esc_calibration.md)
- [ESC와 모터](peripherals/esc_motors.md)
- [ESC Protocols](esc/esc_protocols.md)
- [PWM ESC와 서보](peripherals/pwm_escs_and_servo.md)
- [DShot ESCs](peripherals/dshot.md)
- [OneShot ESCs and Servos](peripherals/oneshot.md)
- [DroneCAN ESCs](dronecan/escs.md)
- [Zubax Telega](dronecan/zubax_telega.md)
- [PX4 Sapog ESC Firmware](dronecan/sapog.md)
- [ARK 4IN1 ESC](esc/ark_4in1_esc.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq Motor/ESC Modules](peripherals/vertiq.md)
- [VESC Project ESCs](peripherals/vesc.md)
- [Zubax Telega ESCs](dronecan/zubax_telega.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq](peripherals/vertiq.md)
- [VESC](peripherals/vesc.md)
- [Radio Control (RC)](getting_started/rc_transmitter_receiver.md)
- [무선 조종기 설정](config/radio.md)
@@ -521,7 +519,6 @@
- [PPS Time Synchronization](advanced/pps_time_sync.md)
- [미들웨어](middleware/index.md)
- [uORB 메시지 전송](middleware/uorb.md)
- [uORB Docs Standard](uorb/uorb_documentation.md)
- [uORB 그라프](middleware/uorb_graph.md)
- [uORB Message Reference](msg_docs/index.md)
- [Versioned](msg_docs/versioned_messages.md)
@@ -584,7 +581,6 @@
- [DebugKeyValue](msg_docs/DebugKeyValue.md)
- [DebugValue](msg_docs/DebugValue.md)
- [DebugVect](msg_docs/DebugVect.md)
- [DeviceInformation](msg_docs/DeviceInformation.md)
- [DifferentialPressure](msg_docs/DifferentialPressure.md)
- [DistanceSensor](msg_docs/DistanceSensor.md)
- [DistanceSensorModeChangeRequest](msg_docs/DistanceSensorModeChangeRequest.md)
-4
View File
@@ -26,10 +26,6 @@ If you are looking for more resources to learn about the module, a website has b
## Neural Network PX4 Firmware
:::warning
This module requires Ubuntu 24.04 or newer (it is not supported in Ubuntu 22.04).
:::
The module has been tested on a number of configurations, which can be build locally using the commands:
```sh
@@ -25,7 +25,6 @@ It may also be supported on other boards.
Supported flight controllers include:
- [ARK Electronics ARKV6X](../flight_controller/ark_v6x.md)
- [CUAV Pixhawk V6X](../flight_controller/cuav_pixhawk_v6x.md)
- [Holybro Pixhawk 5X](../flight_controller/pixhawk5x.md)
- [Holybro Pixhawk 6X](../flight_controller/pixhawk6x.md)
+2 -1
View File
@@ -285,7 +285,7 @@ A particular vehicle might have more/fewer motors and actuators, but the wiring
The following sections explain each part in more detail.
:::tip
If you're using [DroneCAN ESC](../dronecan/escs.md) the control signals will be connected to the CAN BUS instead of the PWM outputs as shown.
If you're using [DroneCAN ESC](../peripherals/esc_motors.md#dronecan) the control signals will be connected to the CAN BUS instead of the PWM outputs as shown.
:::
### Flight Controller Power
@@ -426,6 +426,7 @@ They recommend sensors, power systems, and other components from the same manufa
- [Drone Components & Parts](../getting_started/px4_basic_concepts.md#drone-components-parts) (Basic Concepts)
- [Payloads](../getting_started/px4_basic_concepts.md#payloads) (Basic Concepts)
- [Hardware Selection & Setup](../hardware/drone_parts.md) — information about connecting and configuring specific flight controllers, sensors and other peripherals (e.g. airspeed sensor for planes).
- [Mounting the Flight Controller](../assembly/mount_and_orient_controller.md)
- [Vibration Isolation](../assembly/vibration_isolation.md)
- [Mounting a Compass](../assembly/mount_gps_compass.md)
+6 -42
View File
@@ -1,13 +1,7 @@
# CAN (DroneCAN & Cyphal)
# CAN
[Controller Area Network (CAN)](https://en.wikipedia.org/wiki/CAN_bus) is a robust wired network that allows drone components such as flight controller, ESCs, sensors, and other peripherals, to communicate with each other.
It is particularly recommended on larger vehicles.
## 개요
CAN it is designed to be democratic and uses differential signaling.
For this reason it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
Because it is designed to be democratic and uses differential signaling, it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
CAN also allows status feedback from peripherals and convenient firmware upgrades over the bus.
PX4 supports two software protocols for communicating with CAN devices:
@@ -24,36 +18,29 @@ In 2022 the project split into two: the original version of UAVCAN (UAVCAN v0) w
The differences between the two protocols are outlined in [Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814).
:::
:::warning
PX4 does not support other CAN software protocols for drones such as KDECAN (at time of writing).
:::
## 배선
The wiring for CAN networks is the same for both DroneCAN and Cyphal/CAN (in fact, for all CAN networks).
Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port).
:::warning
Don't connect each CAN peripheral to a separate CAN port!
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy).
:::
Devices are connected in a chain in any order.
At either end of the chain, a 120Ω termination resistor should be connected between the two data lines.
Flight controllers and some GNSS modules have built in termination resistors for convenience, thus should be placed at opposite ends of the chain.
Otherwise, you can use a termination resistor such as [this one from Zubax Robotics](https://shop.zubax.com/products/uavcan-micro-termination-plug?variant=6007985111069), or solder one yourself if you have access to a JST-GH crimper.
The following diagram shows an example of a CAN bus connecting a flight controller to 4 CAN ESCs and a GNSS.
It includes a redundant bus connected to `CAN 2`.
![CAN Wiring](../../assets/can/uavcan_wiring.svg)
The diagram does not show any power wiring.
Refer to your manufacturer instructions to confirm whether components require separate power or can be powered from the CAN bus itself.
:::info
For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax.com/public/cyphal/CyphalCAN-device-interconnection?pageId=2195476) (kb.zubax.com).
While the article is written with the Cyphal protocol in mind, it applies equally to DroneCAN hardware and any other CAN setup.
For more advanced scenarios, consult with [On CAN bus topology and termination](https://forum.opencyphal.org/t/on-can-bus-topology-and-termination/1685).
:::
### 커넥터
@@ -67,30 +54,7 @@ However, as long as the device firmware supports DroneCAN or Cyphal, it can be u
DroneCAN and Cyphal/CAN support using a second (redundant) CAN interface.
This is completely optional but increases the robustness of the connection.
Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
### Flight Controllers with Multiple CAN Ports
[Flight Controllers](../flight_controller/index.md) may have up to three independent CAN ports, such as `CAN1`, `CAN2`, `CAN3` (neither DroneCAN or Cyphal support more than three).
Note that you can't have both DroneCAN and Cyphal running on PX4 at the same time.
:::tip
You only _need_ one CAN port to support an arbitrary number of CAN devices using a particular CAN protocol.
Don't connect each CAN peripheral to a separate CAN port!
:::
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy).
If three are three ports, you might use the remaining network for devices that support another CAN protocol.
The documentation for your flight controller should indicate which ports are supported/enabled.
At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console):
```sh
uavcan status
```
Note that you can also check the number of supported CAN interfaces for a board by searching for `CONFIG_BOARD_UAVCAN_INTERFACES` in its [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#) configuration file.
All Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
## 펌웨어
+6 -38
View File
@@ -10,7 +10,7 @@ If you have [mounted the compass](../assembly/mount_gps_compass.md#compass-orien
## 개요
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to [recalibrate](#recalibration) it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to recalibrate it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
:::tip
Indications of a poor compass calibration include multicopter circling during hover, toilet bowling (circling at increasing radius/spiraling-out, usually constant altitude, leading to fly-way), or veering off-path when attempting to fly straight.
@@ -20,16 +20,13 @@ _QGroundControl_ should also notify the error `mag sensors inconsistent`.
The process calibrates all compasses and autodetects the orientation of any external compasses.
If any external magnetometers are available, it then disables the internal magnetometers (these are primarily needed for automatic rotation detection of external magnetometers).
### Types of Calibration
Several types of compass calibration are available:
1. [Complete](#complete-calibration): This calibration is required after installing the autopilot on an airframe for the first time or when the configuration of the vehicle has changed significantly.
It compensates for hard and soft iron effects by estimating an offset and a scale factor for each axis.
2. [Partial](#partial-quick-calibration): This calibration can be performed as a routine when preparing the vehicle for a flight, after changing the payload, or simply when the compass rose seems inaccurate.
This type of calibration only estimates the offsets to compensate for a hard iron effect.
3. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration.
This type of calibration only estimates the offsets to compensate for a hard iron effect.
3. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration. This type of calibration only estimates the offsets to compensate for a hard iron effect.
## 보정 절차
@@ -60,23 +57,19 @@ Before starting the calibration:
![Select Compass calibration PX4](../../assets/qgc/setup/sensor/sensor_compass_select_px4.png)
::: info
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md).
미리 설정하지 않았다면, 여기에서 설정할 수 있습니다.
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). 미리 설정하지 않았다면, 여기에서 설정할 수 있습니다.
:::
4. Click **OK** to start the calibration.
5. 기체를 아래에 표시된 자세로 놓고 그대로 유지해주십시오
메시지가 표시되면(방향 이미지가 노란색으로 변함) 기체를 지정축을 기준으로 한 방향으로 회전시킵니다.
현재 방향에 대해 보정이 완료되면 화면의 그림이 녹색으로 바뀝니다.
5. 기체를 아래에 표시된 자세로 놓고 그대로 유지해주십시오 메시지가 표시되면(방향 이미지가 노란색으로 변함) 기체를 지정축을 기준으로 한 방향으로 회전시킵니다. 현재 방향에 대해 보정이 완료되면 화면의 그림이 녹색으로 바뀝니다.
![Compass calibration steps on PX4](../../assets/qgc/setup/sensor/sensor_compass_calibrate_px4.png)
6. 드론의 모든 방향에 대해 보정 과정을 반복합니다.
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely).
그런 다음 다음 센서의 보정 작업을 진행합니다.
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely). 그런 다음 다음 센서의 보정 작업을 진행합니다.
### Partial "Quick" Calibration
@@ -99,8 +92,7 @@ This calibration is similar to the well-known figure-8 compass calibration done
This calibration process leverages external knowledge of vehicle's orientation and location, and a World Magnetic Model (WMM) to calibrate the hard iron biases.
1. Ensure GNSS Fix.
This is required to find the expected Earth magnetic field in WMM tables.
1. Ensure GNSS Fix. This is required to find the expected Earth magnetic field in WMM tables.
2. Align the vehicle to face True North.
Be as accurate as possible for best results.
3. Open the [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) and send the following command:
@@ -120,30 +112,6 @@ This calibration process leverages external knowledge of vehicle's orientation a
After the calibration is complete, check that the heading indicator and the heading of the arrow on the map are stable and match the orientation of the vehicle when turning it e.g. to the cardinal directions.
## Recalibration
Recalibration is recommended whenever the magnetic environment of the vehicle has changed or when heading behavior appears unreliable.
You can use either complete calibration or mag quick calibration depending on the size of the vehicle and your ability to rotate it through the required orientations.
Complete calibration provides the most accurate soft-iron compensation.
Recalibrate the compass when:
- _The compass module or its mounting orientation has changed._
This includes replacing the GPS or mag unit, rotating the mast, or altering how the module is fixed to the airframe.
- _The vehicle has been exposed to a strong magnetic disturbance._
Examples include transport or storage near large steel structures, welding operations near the airframe, or operation close to high-current equipment.
- _Structural, wiring, or payload changes may have altered the magnetic field around the sensors._
New payloads, rerouted wires, additional batteries, or metal fasteners can introduce soft-iron effects that affect heading accuracy.
- _The vehicle is operated in a region with significantly different magnetic characteristics._
Large changes in latitude, longitude, or magnetic inclination can require re-estimation of offsets.
- _QGroundControl reports magnetometer inconsistencies_.
For example, if you see the error `mag sensors inconsistent`.
- _Heading behavior does not match the vehicles observed orientation._
Symptoms include drifting yaw, sudden heading jumps when attempting to fly straight, and toilet bowling
- _QGroundControl_ sends the error `mag sensors inconsistent`.
This indicates that multiple magnetometers are reporting different headings.
## Additional Calibration/Configuration
The process above will autodetect, [set default rotations](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT), calibrate, and prioritise, all available magnetometers.
+1 -1
View File
@@ -70,7 +70,7 @@ Airframes with more than two frequency noise spikes typically clean the first tw
Dynamic notch filters use ESC RPM feedback and/or the onboard FFT analysis.
The ESC RPM feedback is used to track the rotor blade pass frequency and its harmonics, while the FFT analysis can be used to track a frequency of another vibration source, such as a fuel engine.
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/dshot.md) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/esc_motors.md#dshot) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
Before enabling, make sure that the ESC RPM is correct.
You might have to adjust the [pole count of the motors](../advanced_config/parameter_reference.md#MOT_POLE_COUNT).
-1
View File
@@ -94,7 +94,6 @@ Set the following parameters in _QGroundControl_:
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.
-1
View File
@@ -91,7 +91,6 @@ Set the following parameters in _QGroundControl_:
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.
+1 -8
View File
@@ -1,14 +1,7 @@
# DroneCAN ESCs
PX4 supports DroneCAN compliant ESCs.
## Supported ESC
:::info
[Supported ESCs](../peripherals/esc_motors#supported-esc) in _ESCs & Motors_ may include additional devices that are not listed below.
:::
The following articles have specific hardware/firmware information:
For more information, see the following articles for specific hardware/firmware:
- [PX4 Sapog ESC Firmware](sapog.md)
- [Holybro Kotleta 20](holybro_kotleta.md)
-65
View File
@@ -1,65 +0,0 @@
# ARK 4IN1 ESC (with/without Connectors)
4 in 1 Electronic Speed Controller (ESC) that is made in the USA, NDAA compliant, and DIU Blue Framework listed.
The ESC comes in variants without connectors that you can solder in place, and a variant that has built-in motor and battery connectors (no soldering required).
![ARK 4IN1 ESC without connectors ](../../assets/hardware/esc/ark/ark_4_in_1_esc.jpg)![ARK 4IN1 ESC with connectors](../../assets/hardware/esc/ark/ark_4_in_1_esc_with_connectors.jpg)
## 구매처
Order this module from:
- [4IN1 ESC (with connectors)](https://arkelectron.com/product/ark-4in1-esc/) (ARK Electronics - US)
- [ARK Electronics (without connectors)](https://arkelectron.com/product/ark-4in1-esc-cons/) (ARK Electronics US)
## Hardware Specifications
- Battery Voltage: 3-8s
- 6V Minimum
- 65V Absolute Maximum
- Current Rating: 50A Continuous, 75A Burst Per Motor
- [STM32F0](https://www.st.com/en/microcontrollers-microprocessors/stm32f0-series.html)
- [AM32 Firmware](https://github.com/am32-firmware/AM32/pull/27)
- Onboard Current Sensor, Serial Telemetry
- 100V/A
- Input Protocols
- DShot (300, 600)
- Bi-directional DShot
- KISS Serial Telemetry
- PWM
- 8 Pin JST-SH Input/Output
- 10 Pin JST-SH Debug
- Motor & Battery Connectors (with-connector version)
- MR30 Connector Limit Per Motor: 30A Continuous, 40A Burst
- Four MR30 Motor Connectors
- Dimensions (with connectors)
- Size: 77.00mm x 42.00mm x 9.43mm
- Mounting Pattern: 30.5mm
- Weight: 24g
- Dimensions (without connectors)
- Size: 43.00mm x 40.50mm x 7.60mm
- Mounting Pattern: 30.5mm
- Weight: 14.5g
Other
- Made in the USA
- Open source AM32 firmware
- [DIU Blue Framework Listed](https://www.diu.mil/blue-uas/framework)
## See Also
- [ARK 4IN1 ESC CONS](https://docs.arkelectron.com/electronic-speed-controller/ark-4in1-esc) (ARK Docs)
-66
View File
@@ -1,66 +0,0 @@
# ESC Protocols
This topic lists the main [Electronic Speed Controller (ESC)](../peripherals/esc_motors.md) protocols supported by PX4.
## DShot
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduced latency, in particular racing multicopters, VTOL vehicles, and so on.
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can reverse motor spin directions.
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
Selecting a higher rate DShot ESC in the UI results in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
## DroneCAN
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
The PX4 implementation is currently limited to update rates of 200 Hz.
DroneCAN shares many similar benefits to [DShot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
## PWM
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired speed.
The pulse width typically ranges between 1000 μs for zero power and 2000 μs for full power.
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50 Hz and 490 Hz (the theoretical maximum being 500 Hz for a very small "off" cycle).
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
For PWM servos 50 Hz is usually sufficient, and many don't support higher rates.
![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png)
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the pulse widths representing low and high values can vary significantly.
Unlike [DShot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
## OneShot 125
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
There are a number of variants of the OneShot protocol, which support different rates.
PX4 only supports OneShot 125.
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125 μs to 250 μs for zero to full power).
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
The actual supported rate depends on the ESC used.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
+1 -1
View File
@@ -2,7 +2,7 @@
<Badge type="tip" text="PX4 v1.15" />
PX4 implements the MAVLink [Standard Modes Protocol](https://mavlink.io/en/services/standard_modes.html) from PX4 v1.15, with a corresponding implementation in QGroundControl Daily builds (and future release builds).
PX4 implements the MAVLink [Standard Modes Protocol](https://mavlink.io/en/services/standard_modes.md) from PX4 v1.15, with a corresponding implementation in QGroundControl Daily builds (and future release builds).
The protocol allows you to discover all flight modes available to the vehicle, including PX4 External modes created using the [PX4 ROS 2 Control Interface](../ros2/px4_ros2_control_interface.md), and get or set the current mode.
-2
View File
@@ -280,8 +280,6 @@ For more information see: [Plotting uORB Topic Data in Real Time using PlotJuggl
## See Also
- [uORB Documentation Standard](../uorb/uorb_documentation.md)
- _PX4 uORB Explained_ Blog series
- [Part 1](https://px4.io/px4-uorb-explained-part-1/)
- [Part 2](https://px4.io/px4-uorb-explained-part-2/)
+32 -34
View File
@@ -15,6 +15,38 @@
- [Rpm Sensor](modules_driver_rpm_sensor.md)
- [Transponder](modules_driver_transponder.md)
## MCP23009
Source: [drivers/gpio/mcp23009](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/gpio/mcp23009)
### Usage {#MCP23009_usage}
```
MCP23009 <command> [arguments...]
Commands:
start
[-I] Internal I2C bus(es)
[-X] External I2C bus(es)
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
(default=1))
[-f <val>] bus frequency in kHz
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 37
[-D <val>] Direction
default: 0
[-O <val>] Output
default: 0
[-P <val>] Pullups
default: 0
[-U <val>] Update Interval [ms]
default: 0
stop
status print status info
```
## atxxxx
Source: [drivers/osd/atxxxx](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/osd/atxxxx)
@@ -717,40 +749,6 @@ lsm303agr <command> [arguments...]
status print status info
```
## mcp230xx
Source: [lib/drivers/mcp_common](https://github.com/PX4/PX4-Autopilot/tree/main/src/lib/drivers/mcp_common)
### Usage {#mcp230xx_usage}
```
mcp230xx <command> [arguments...]
Commands:
start
[-I] Internal I2C bus(es)
[-X] External I2C bus(es)
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
(default=1))
[-f <val>] bus frequency in kHz
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 39
[-D <val>] Direction (1=Input, 0=Output)
default: 0
[-O <val>] Output
default: 0
[-P <val>] Pullups
default: 0
[-U <val>] Update Interval [ms]
default: 0
[-M <val>] First minor number
default: 0
stop
status print status info
```
## mcp9808
Source: [drivers/temperature_sensor/mcp9808](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/temperature_sensor/mcp9808)
-4
View File
@@ -127,10 +127,6 @@ commander <command> [arguments...]
check Run preflight checks
safety Change prearm safety state
on|off [on] to activate safety, [off] to deactivate safety and allow
control surface movements
arm
[-f] Force arming (do not run preflight checks)
+5 -5
View File
@@ -2,7 +2,7 @@
Battery status
Battery status information for up to 3 battery instances.
Battery status information for up to 4 battery instances.
These are populated from power module and smart battery device drivers, and one battery updated from MAVLink.
Battery instance information is also logged and streamed in MAVLink telemetry.
@@ -11,7 +11,7 @@ Battery instance information is also logged and streamed in MAVLink telemetry.
```c
# Battery status
#
# Battery status information for up to 3 battery instances.
# Battery status information for up to 4 battery instances.
# These are populated from power module and smart battery device drivers, and one battery updated from MAVLink.
# Battery instance information is also logged and streamed in MAVLink telemetry.
@@ -33,9 +33,9 @@ uint8 cell_count # [-] [@invalid 0] Number of cells
uint8 source # [@enum SOURCE] Battery source
uint8 SOURCE_POWER_MODULE = 0 # Power module (analog ADC or I2C power monitor)
uint8 SOURCE_EXTERNAL = 1 # External (MAVLink, CAN, or external driver)
uint8 SOURCE_ESCS = 2 # ESCs (via ESC telemetry)
uint8 SOURCE_POWER_MODULE = 0 # Power module
uint8 SOURCE_EXTERNAL = 1 # External
uint8 SOURCE_ESCS = 2 # ESCs
uint8 priority # [-] Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
uint16 capacity # [mAh] Capacity of the battery when fully charged
+3 -3
View File
@@ -32,9 +32,9 @@ uint8 cell_count # [@invalid 0] Number of cells
uint8 source # [@enum SOURCE] Battery source
uint8 SOURCE_POWER_MODULE = 0 # Power module (analog ADC or I2C power monitor)
uint8 SOURCE_EXTERNAL = 1 # External (MAVLink, CAN, or external driver)
uint8 SOURCE_ESCS = 2 # ESCs (via ESC telemetry)
uint8 SOURCE_POWER_MODULE = 0 # Power module
uint8 SOURCE_EXTERNAL = 1 # External
uint8 SOURCE_ESCS = 2 # ESCs
uint8 priority # Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
uint16 capacity # [mAh] Capacity of the battery when fully charged
-45
View File
@@ -1,45 +0,0 @@
# DeviceInformation (UORB message)
Device information
Can be used to uniquely associate a device_id from a sensor topic with a physical device using serial number.
as well as tracking of the used firmware versions on the devices.
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/DeviceInformation.msg)
```c
# Device information
#
# Can be used to uniquely associate a device_id from a sensor topic with a physical device using serial number.
# as well as tracking of the used firmware versions on the devices.
uint64 timestamp # time since system start (microseconds)
uint8 device_type # [@enum DEVICE_TYPE] Type of the device. Matches MAVLink DEVICE_TYPE enum
uint8 DEVICE_TYPE_GENERIC = 0 # Generic/unknown sensor
uint8 DEVICE_TYPE_AIRSPEED = 1 # Airspeed sensor
uint8 DEVICE_TYPE_ESC = 2 # ESC
uint8 DEVICE_TYPE_SERVO = 3 # Servo
uint8 DEVICE_TYPE_GPS = 4 # GPS
uint8 DEVICE_TYPE_MAGNETOMETER = 5 # Magnetometer
uint8 DEVICE_TYPE_PARACHUTE = 6 # Parachute
uint8 DEVICE_TYPE_RANGEFINDER = 7 # Rangefinder
uint8 DEVICE_TYPE_WINCH = 8 # Winch
uint8 DEVICE_TYPE_BAROMETER = 9 # Barometer
uint8 DEVICE_TYPE_OPTICAL_FLOW = 10 # Optical flow
uint8 DEVICE_TYPE_ACCELEROMETER = 11 # Accelerometer
uint8 DEVICE_TYPE_GYROSCOPE = 12 # Gyroscope
uint8 DEVICE_TYPE_DIFFERENTIAL_PRESSURE = 13 # Differential pressure
uint8 DEVICE_TYPE_BATTERY = 14 # Battery
uint8 DEVICE_TYPE_HYGROMETER = 15 # Hygrometer
char[32] vendor_name # Name of the device vendor
char[32] model_name # Name of the device model
uint32 device_id # [-] [@invalid 0 if not available] Unique device ID for the sensor. Does not change between power cycles.
char[24] firmware_version # [-] [@invalid empty if not available] Firmware version.
char[24] hardware_version # [-] [@invalid empty if not available] Hardware version.
char[33] serial_number # [-] [@invalid empty if not available] Device serial number or unique identifier.
```
-1
View File
@@ -21,7 +21,6 @@ uint8 GPS_CHECK_FAIL_MAX_VERT_DRIFT = 7 # 7 : maximum allowed vertical position
uint8 GPS_CHECK_FAIL_MAX_HORZ_SPD_ERR = 8 # 8 : maximum allowed horizontal speed fail - requires stationary vehicle
uint8 GPS_CHECK_FAIL_MAX_VERT_SPD_ERR = 9 # 9 : maximum allowed vertical velocity discrepancy fail
uint8 GPS_CHECK_FAIL_SPOOFED = 10 # 10 : GPS signal is spoofed
uint8 GPS_CHECK_FAIL_JAMMED = 11 # 11 : GPS signal is jammed
uint64 control_mode_flags # Bitmask to indicate EKF logic state
uint8 CS_TILT_ALIGN = 0 # 0 - true if the filter tilt alignment is complete
-1
View File
@@ -6,7 +6,6 @@ GPIO mask and state
```c
# GPIO mask and state
uint8 MAX_INSTANCES = 8
uint64 timestamp # time since system start (microseconds)
uint32 device_id # Device id
+1 -5
View File
@@ -9,15 +9,11 @@ This message is used to dump the raw gps communication to the log.
uint64 timestamp # time since system start (microseconds)
uint8 INSTANCE_MAIN = 0
uint8 INSTANCE_SECONDARY = 1
uint8 instance # Instance of GNSS receiver
uint32 device_id
uint8 len # length of data, MSB bit set = message to the gps device,
# clear = message from the device
uint8[79] data # data to write to the log
uint8 ORB_QUEUE_LENGTH = 16
uint8 ORB_QUEUE_LENGTH = 8
```
-6
View File
@@ -69,7 +69,6 @@ uint16 VEHICLE_CMD_DO_PARACHUTE=208 # Mission command to trigger a parachute. |a
uint16 VEHICLE_CMD_DO_MOTOR_TEST=209 # Motor test command. |Instance (@range 1, )|throttle type|throttle|timeout [s]|Motor count|Test order|Unused|
uint16 VEHICLE_CMD_DO_INVERTED_FLIGHT=210 # Change to/from inverted flight. |inverted (0=normal, 1=inverted)|Unused|Unused|Unused|Unused|Unused|Unused|
uint16 VEHICLE_CMD_DO_GRIPPER = 211 # Command to operate a gripper.
uint16 VEHICLE_CMD_DO_AUTOTUNE_ENABLE = 212 # Enable autotune module. |1 to enable|Unused|Unused|Unused|Unused|Unused|Unused|
uint16 VEHICLE_CMD_DO_SET_CAM_TRIGG_INTERVAL=214 # Mission command to set TRIG_INTERVAL for this flight. |[m] Camera trigger distance|Shutter integration time (ms)|Unused|Unused|Unused|Unused|Unused|
uint16 VEHICLE_CMD_DO_MOUNT_CONTROL_QUAT=220 # Mission command to control a camera or antenna mount, using a quaternion as reference. |q1 - quaternion param #1, w (1 in null-rotation)|q2 - quaternion param #2, x (0 in null-rotation)|q3 - quaternion param #3, y (0 in null-rotation)|q4 - quaternion param #4, z (0 in null-rotation)|Unused|Unused|Unused|
uint16 VEHICLE_CMD_DO_GUIDED_MASTER=221 # Set id of master controller. |System ID|Component ID|Unused|Unused|Unused|Unused|Unused|
@@ -108,7 +107,6 @@ uint16 VEHICLE_CMD_LOGGING_START = 2510 # Start streaming ULog data.
uint16 VEHICLE_CMD_LOGGING_STOP = 2511 # Stop streaming ULog data.
uint16 VEHICLE_CMD_CONTROL_HIGH_LATENCY = 2600 # Control starting/stopping transmitting data over the high latency link.
uint16 VEHICLE_CMD_DO_VTOL_TRANSITION = 3000 # Command VTOL transition.
uint16 VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300 # Command safety on/off. |1 to activate safety, 0 to deactivate safety and allow control surface movements|Unused|Unused|Unused|Unused|Unused|Unused|
uint16 VEHICLE_CMD_ARM_AUTHORIZATION_REQUEST = 3001 # Request arm authorization.
uint16 VEHICLE_CMD_PAYLOAD_PREPARE_DEPLOY = 30001 # Prepare a payload deployment in the flight plan.
uint16 VEHICLE_CMD_PAYLOAD_CONTROL_DEPLOY = 30002 # Control a pre-programmed payload deployment.
@@ -188,10 +186,6 @@ int8 ARMING_ACTION_ARM = 1
uint8 GRIPPER_ACTION_RELEASE = 0
uint8 GRIPPER_ACTION_GRAB = 1
# Used as param1 in DO_SET_SAFETY_SWITCH_STATE command.
uint8 SAFETY_OFF = 0
uint8 SAFETY_ON = 1
uint8 ORB_QUEUE_LENGTH = 8
float32 param1 # Parameter 1, as defined by MAVLink uint16 VEHICLE_CMD enum.
-1
View File
@@ -105,7 +105,6 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [DebugKeyValue](DebugKeyValue.md)
- [DebugValue](DebugValue.md)
- [DebugVect](DebugVect.md)
- [DeviceInformation](DeviceInformation.md) — Device information
- [DifferentialPressure](DifferentialPressure.md) — Differential-pressure (airspeed) sensor
- [DistanceSensor](DistanceSensor.md) — DISTANCE_SENSOR message data
- [DistanceSensorModeChangeRequest](DistanceSensorModeChangeRequest.md)
-4
View File
@@ -11,10 +11,6 @@ DShot is an alternative ESC protocol that has several advantages over [PWM](../p
이 항목에서는 DShot ESC 연결과 설정 방법을 설명합니다.
## Supported ESC
[ESCs & Motors > Supported ESCs](../peripherals/esc_motors#supported-esc) has a list of supported ESC (check "Protocols" column for DShot ESC).
## Wiring/Connections {#wiring}
DShot ESC are wired the same way as [PWM ESCs](pwm_escs_and_servo.md).
+68 -32
View File
@@ -3,44 +3,80 @@
Many PX4 drones use brushless motors that are driven by the flight controller via an Electronic Speed Controller (ESC).
The ESC takes a signal from the flight controller and uses it to set control the level of power delivered to the motor.
PX4 supports a number of [common protocols](../esc/esc_protocols.md) for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
## Supported ESC
The following list is non-exhaustive.
| ESC Device | Protocols | Firmwares | 참고 |
| ------------------------------ | ------------------------------------ | ------------------------ | ----------------------------------------------------- |
| [ARK 4IN1 ESC] | [Dshot], [PWM] | [AM32] | Has versions with/without connnectors |
| [Holybro Kotleta 20] | [DroneCAN], [PWM] | [PX4 Sapog ESC Firmware] | |
| [Vertiq Motor & ESC modules] | [Dshot], [OneShot], Multishot, [PWM] | Vertiq firmware | Larger modules support DroneCAN, ESC and Motor in one |
| [RaccoonLab CAN PWM ESC nodes] | [DroneCAN], Cyphal | | Cyphal and DroneCAN notes for PWM ESC |
| [VESC ESCs] | [DroneCAN], [PWM] | VESC project firmware | |
| [Zubax Telega] | [DroneCAN], [PWM] | Telega-based | ESC and Motor in one |
<!-- Links for table above -->
[ARK 4IN1 ESC]: ../esc/ark_4in1_esc.md
[AM32]: https://am32.ca/
[PX4 Sapog ESC Firmware]: ../dronecan/sapog.md
[VESC ESCs]: ../peripherals/vesc.md
[DroneCAN]: ../dronecan/escs.md
[Dshot]: ../peripherals/dshot.md
[OneShot]: ../peripherals/oneshot.md
[PWM]: ../peripherals/pwm_escs_and_servo.md
[Holybro Kotleta 20]: ../dronecan/holybro_kotleta.md
[Vertiq Motor & ESC modules]: ../peripherals/vertiq.md
[RaccoonLab CAN PWM ESC nodes]: ../dronecan/raccoonlab_nodes.md
[Zubax Telega]: ../dronecan/zubax_telega.md
## See Also
PX4 supports a number of common protocols for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
더 자세한 정보는 다음을 참고하십시오.
- [ESC Protocols](../esc/esc_protocols.md) — overview of main ESC/Servo protocols supported by PX4
- [PWM ESCs and Servos](../peripherals/pwm_escs_and_servo.md)
- [OneShot ESCs and Servos](../peripherals/oneshot.md)
- [DShot](../peripherals/dshot.md)
- [DroneCAN ESCs](../dronecan/escs.md)
- [ESC Calibration](../advanced_config/esc_calibration.md)
- [ESC Firmware and Protocols Overview](https://oscarliang.com/esc-firmware-protocols/) (oscarliang.com)
A high level overview of the main ESC/Servo protocols supported by PX4 is given below.
## ESC Protocols
### PWM
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired power level.
The pulse wdith typically ranges between 1000uS for zero power and 2000uS for full power.
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50Hz and 490 Hz (the theoretical maximum being 500Hz for a very small "off" cycle).
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
For PWM servos 50Hz is usually sufficient, and many don't support higher rates.
![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png)
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the range values representing low and high values can vary significantly.
Unlike [dshot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
### Oneshot 125
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
There are a number of variants of the OneShot protocol, which support different rates.
PX4 only supports OneShot 125.
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125us to 250us for zero to full power).
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
The actual supported rate depends on the ESC used.
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
- [ESC Calibration](../advanced_config/esc_calibration.md)
### DShot
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduce latency, in particular racing multicopters, VTOL vehicles, and so on.
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can revers motor spin directions
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
Selecting a higher rate DShot ESC in the UI result in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
Setup:
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
### DroneCAN
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
The PX4 implementation is currently limited to update rates of 200Hz.
DroneCAN shares many similar benefits to [Dshot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
-1
View File
@@ -55,7 +55,6 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
### 센서
- Add [sbgECom INS driver](../sensor/sbgecom.md) ([PX4-Autopilot#24137](https://github.com/PX4/PX4-Autopilot/pull/24137))
- Quick magnetometer calibration now supports specifying an arbitrary initial heading ([PX4-Autopilot#24637](https://github.com/PX4/PX4-Autopilot/pull/24637))
### 시뮬레이션
-170
View File
@@ -1,170 +0,0 @@
# uORB Documentation Standard
This topic demonstrates and explains how to document uORB messages.
:::info
At time of writing many topics have not been updated.
:::
## 개요
The [AirspeedValidated](../msg_docs/AirspeedValidated.md) message shown below is a good example of a uORB topic that has been documented to the current standard.
```py
# Validated airspeed
#
# Provides information about airspeed (indicated, true, calibrated) and the source of the data.
# Used by controllers, estimators and for airspeed reporting to operator.
uint32 MESSAGE_VERSION = 1
uint64 timestamp # [us] Time since system start
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
float32 calibrated_airspeed_m_s # [m/s] [@invalid NaN] Calibrated airspeed (CAS)
float32 true_airspeed_m_s # [m/s] [@invalid NaN] True airspeed (TAS)
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
int8 SOURCE_SENSOR_1 = 1 # Sensor 1
int8 SOURCE_SENSOR_2 = 2 # Sensor 2
int8 SOURCE_SENSOR_3 = 3 # Sensor 3
int8 SOURCE_SYNTHETIC = 4 # Synthetic airspeed
float32 calibrated_ground_minus_wind_m_s # [m/s] [@invalid NaN] CAS calculated from groundspeed - windspeed, where windspeed is estimated based on a zero-sideslip assumption
float32 calibraded_airspeed_synth_m_s # [m/s] [@invalid NaN] Synthetic airspeed
float32 airspeed_derivative_filtered # [m/s^2] Filtered indicated airspeed derivative
float32 throttle_filtered # [-] Filtered fixed-wing throttle
float32 pitch_filtered # [rad] Filtered pitch
```
The main things to note are:
- Documentation is added using formatted uORB comments.
Any text on a line after the `#` character is a comment, except for lines that start with the text `# TOPIC` (which indicates a multi-topic message).
- The message starts with a comment block consisting of short description (mandatory), followed by a longer description and then a space.
- Field and constants almost all have comments.
The comments are added on the same line as the field/constant, separated by one space.
- Fields:
- Comments are all on the same line as the field (extra lines become internal comments).
- Comments start with metadata, such as the units (`[m/s]`, `[rad/s]`) or allowed values (`[@enum SOURCE]`), and can also list invalid values (`[@invalid NaN]`) and allowed ranges (`[@range min, max]`).
- Units are required except for boolean fields or for fields with an enum value.
`[-]` is used to indicate unitless fields.
- Comments follow the metadata after a space.
The line should not be terminated in a full stop.
- Constants:
- Don't have metadata: the description follows the comment marker after one space.
- Some constants, such as `MESSAGE_VERSION`, don't need documentation because they are standardized.
- Constants with the same name prefix are grouped together as enums after the associated field.
The following sections expand on the allowed formats.
## Message Description
Every message should start with a comment block that describes the message:
```py
# Short description (mandatory)
#
# Longer description for the message if needed.
# Can be multiline, and should have punctuation.
# Should be followed by an empty line.
```
This consists of a mandatory short description, optionally followed by an empty comment line, and then a longer description.
Short description (mandatory):
- A succinct explanation for the purpose of the message.
- Usually just one line without a terminating full stop.
- Minimally it may just mirror the message name.
- For example, [`AirspeedValidated`](../msg_docs/AirspeedValidated.md) above has the short description `Validated airspeed`.
Long description (Optional):
- Additional context required to understand how the message is used.
- In particular this should be anything that can't be inferred from the name, fields or constants, such as the publishers and expected consumers.
It might also cover whether the message is only used for a particular frame type or mode.
- The message is often multiline and contains punctuation.
- May include comment lines that are empty, in order to indicate paragraphs.
Both short and long descriptions may be multi-line.
Single line descriptions should not include a terminating full stop, but multiline comments should do so.
The message description block ends at the first non-comment line, which should be an empty line, but might be a field or constant.
Any subsequent comment lines are considered "internal comments".
### Fields
A typical field comment looks like this:
```py
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
```
Field comments must all be on the same line as the field, and consist of optional metadata followed by a description:
- `metadata` (Optional)
- Information about the field units and allowed values:
- `[<unit>]`
- The unit of measurement inside square brackets (note, no `@` delineator indicates a unit), such as `[m]` for metres.
- Allowed units include: `m`, `m/s`, `m/s^2`, `rad`, `rad/s`, `rpm`, `V`, `A`, `mA`, `mAh`, `W`, `dBm`, `s`, `ms`, `us`, `Ohm`, `MB`, `Kb/s`, `degC`, `Pa`.
- Units are required unless clearly invalid, such as when the field is a boolean, or is an enum value.
- Unitless values should be specified as `[-]`.
Note though that units are not required for boolean fields or enum fields.
- `[@enum <enum_name>]`
- The `enum_name` gives the prefix of constant values in the message that can be assigned to the field.
Note that enums in uORB are just a naming convention: they are not explicitly declared.
Multiple enum names allowed for a field indicates a possible error in the field design.
- `[@range <lower_value>, <upper_value>]`
- The allowed range of the field, specified as a `lower_value` and/or an `upper_value`.
Either value can be omitted to indicate an unbounded upper or lower value.
For example `[@range 0, 3]`, `[@range 5.3, ]`, `[@range , 3]`.
- `[@invalid <value> <description>]`
- The `value` to set the field to indicate that the field doesn't contain valid data, such as `[@invalid NaN]`.
The `description` is optional, and might be used to indicate the conditions under which data is invalid.
- `[@frame <value>]`
- The `frame` in which the field is set, such as `[@frame NED]` or `[@frame Body]`.
- `description`
- A concise description of the purpose of the field, and including any important information that can't be inferred from the name!
Use a capital first letter, and omit the full stop if the description is a single sentence.
Multiple sentences may also omit the final full stop.
### Constants
Constants follow the documentation conventions as fields except they only have a description (no metadata).
Documentation for a constant might look like this:
```py
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
```
Constants are often grouped together following a field as enum values.
Note below how the prefix `SOURCE` for the values is specified as an enum against the _field_.
```py
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
...
```
A small number of constants have a standardised meaning and do not require documentation.
These are:
- `ORB_QUEUE_LENGTH`
- `MESSAGE_VERSION`
### `# TOPICS`
The prefix `# TOPICS` is used to indicate topic names for multi-topic messages.
For example, the [VehicleGlobalPosition.msg](../msg_docs/VehicleGlobalPosition.md) message definition is used to define the topic ids as shown:
```text
# TOPICS vehicle_global_position vehicle_global_position_groundtruth external_ins_global_position
# TOPICS estimator_global_position
# TOPICS aux_global_position
```
At time of writing there is no format for documenting these.
+5 -9
View File
@@ -315,17 +315,15 @@
- [Розподіл приводу](config/actuators.md)
- [Калібрування ESC (плати контролю двигунів)](advanced_config/esc_calibration.md)
- [ESCs & Двигуни](peripherals/esc_motors.md)
- [ESC Protocols](esc/esc_protocols.md)
- [PWM ESCs та сервоприводи](peripherals/pwm_escs_and_servo.md)
- [DShot ESCs](peripherals/dshot.md)
- [OneShot ESCs та сервоприводи](peripherals/oneshot.md)
- [DroneCAN ESCs](dronecan/escs.md)
- [PX4 Sapog ESC Firmware](dronecan/sapog.md)
- [ARK 4IN1 ESC](esc/ark_4in1_esc.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq Motor/ESC Modules](peripherals/vertiq.md)
- [VESC Project ESCs](peripherals/vesc.md)
- [Zubax Telega ESCs](dronecan/zubax_telega.md)
- [Zubax Telega](dronecan/zubax_telega.md)
- [Прошивка PX4 Sapog ESC](dronecan/sapog.md)
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
- [Vertiq](peripherals/vertiq.md)
- [VESC](peripherals/vesc.md)
- [Радіокерування (RC)](getting_started/rc_transmitter_receiver.md)
- [Налаштування радіо](config/radio.md)
@@ -521,7 +519,6 @@
- [PPS Time Synchronization](advanced/pps_time_sync.md)
- [Проміжне програмне забезпечення](middleware/index.md)
- [Повідомлення uORB](middleware/uorb.md)
- [uORB Docs Standard](uorb/uorb_documentation.md)
- [Граф uORB](middleware/uorb_graph.md)
- [Опис повідомлень uORB](msg_docs/index.md)
- [Versioned](msg_docs/versioned_messages.md)
@@ -584,7 +581,6 @@
- [DebugKeyValue](msg_docs/DebugKeyValue.md)
- [DebugValue](msg_docs/DebugValue.md)
- [DebugVect](msg_docs/DebugVect.md)
- [DeviceInformation](msg_docs/DeviceInformation.md)
- [DifferentialPressure](msg_docs/DifferentialPressure.md)
- [DistanceSensor](msg_docs/DistanceSensor.md)
- [DistanceSensorModeChangeRequest](msg_docs/DistanceSensorModeChangeRequest.md)

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