Compare commits
107 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6df1c6388 | |||
| 6fc9720e25 | |||
| 569849665f | |||
| db8a1f11a7 | |||
| 8669947bcb | |||
| 1aad8b6ec9 | |||
| 7b68c5dbfc | |||
| b2672910da | |||
| 05394162ce | |||
| d1da30911e | |||
| 264b8fe277 | |||
| 47c0fef8c8 | |||
| ae60c66613 | |||
| a20afc88c8 | |||
| 2e84e55d93 | |||
| 472e0657b5 | |||
| b4395d5960 | |||
| 63ec2f0406 | |||
| e0cdcdb436 | |||
| 3962419669 | |||
| 63e257782a | |||
| fd2b7cbea4 | |||
| 5f5a1aa4ab | |||
| 1840c0db48 | |||
| 89c6d24946 | |||
| af6bf931c1 | |||
| fc8e2021e7 | |||
| e6f60ef403 | |||
| 944b3e763a | |||
| 271cb49597 | |||
| 9015001b42 | |||
| ce207837cf | |||
| 3a734bc846 | |||
| 9062d0cc7d | |||
| b2b80e8075 | |||
| 2eac6cca38 | |||
| fe1abb5b92 | |||
| 073013cf85 | |||
| 547582b16b | |||
| 8f2c36689d | |||
| 30fcb4fcb1 | |||
| ec436d3be3 | |||
| 6ec8dec63a | |||
| edfcdaa008 | |||
| a1ee9eb2c4 | |||
| 4a697d0191 | |||
| db3f33760e | |||
| dd09cdf986 | |||
| 4a5eabb61e | |||
| 248f113141 | |||
| c1d15d0e09 | |||
| 8689c00be7 | |||
| 17e843a985 | |||
| 44ff6d9c62 | |||
| 747bcc9db5 | |||
| c41216376a | |||
| 88c1412d25 | |||
| 01bf700f3d | |||
| 0bb9e5952a | |||
| 70054fc567 | |||
| 7a98c87fcb | |||
| 80b5cf2ed7 | |||
| 9ffd31097d | |||
| f99759db87 | |||
| 231128c68e | |||
| 5622565eea | |||
| 7887f16daa | |||
| 0763bbe2cf | |||
| bac009c2b8 | |||
| ac2627cca9 | |||
| 61e2f566ca | |||
| 3d30eaae5f | |||
| e052f35664 | |||
| 2bc9cb4ead | |||
| 5211d9c92e | |||
| 575923b534 | |||
| e37f20e94d | |||
| cb74cee970 | |||
| 70536766db | |||
| 40bba0069d | |||
| 35004e357c | |||
| 923257779a | |||
| a24b3a121c | |||
| 85cab5a4db | |||
| 859ba81e33 | |||
| 4aff095f9b | |||
| 796efeebe7 | |||
| 9d02698987 | |||
| e1a7fbce71 | |||
| a87456b38b | |||
| 33a5122916 | |||
| b53ecf7f68 | |||
| 138427b3a8 | |||
| 785ea1a137 | |||
| 8e5cd59502 | |||
| df11aa1d69 | |||
| a1bc09a6ad | |||
| e81c62cc36 | |||
| 18d76b18b9 | |||
| 722580760c | |||
| c65b1d845a | |||
| 71b8e299fd | |||
| eeaf1d7959 | |||
| 35ff853f76 | |||
| 8b58c01cd7 | |||
| b3c7667f41 | |||
| 333b77cb38 |
@@ -43,7 +43,8 @@ jobs:
|
||||
- name: Save JSON file containing files to link check
|
||||
run: |
|
||||
echo "$ALL_CHANGED_FILES"
|
||||
echo "$ALL_CHANGED_FILES" > ./logs/prFiles.json
|
||||
# echo "$ALL_CHANGED_FILES" > ./logs/prFiles.json
|
||||
echo "$ALL_CHANGED_FILES" | sed 's/\\//g' | jq '.' > ./logs/prFiles.json
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.get_changed_markdown_english.outputs.all_changed_files }}
|
||||
|
||||
|
||||
@@ -100,3 +100,6 @@
|
||||
[submodule "src/drivers/ins/microstrain/mip_sdk"]
|
||||
path = src/drivers/ins/microstrain/mip_sdk
|
||||
url = https://github.com/PX4/LORD-MicroStrain_mip_sdk.git
|
||||
[submodule "src/drivers/ins/sbgecom/sbgECom"]
|
||||
path = src/drivers/ins/sbgecom/sbgECom
|
||||
url = https://github.com/PX4/sbgECom.git
|
||||
|
||||
@@ -36,6 +36,11 @@ CONFIG:
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_test
|
||||
px4_sitl_zenoh:
|
||||
short: px4_sitl_zenoh
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_test
|
||||
px4_io-v2_default:
|
||||
short: px4_io-v2
|
||||
buildType: MinSizeRel
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"files.watcherExclude": {
|
||||
"**/build/**": true
|
||||
},
|
||||
"git.detectSubmodulesLimit": 20,
|
||||
"git.detectSubmodulesLimit": 25,
|
||||
"git.ignoreLimitWarning": true,
|
||||
"githubPullRequests.defaultMergeMethod": "squash",
|
||||
"githubPullRequests.telemetry.enabled": false,
|
||||
|
||||
@@ -73,6 +73,11 @@ menu "Toolchain"
|
||||
help
|
||||
relative path to the ROMFS root directory
|
||||
|
||||
config BOARD_ADDITIONAL_INIT
|
||||
string "Additional init file"
|
||||
help
|
||||
additional configurable init file to include in the ROMFS
|
||||
|
||||
config BOARD_IO
|
||||
string "IO board name"
|
||||
default "px4_io-v2_default"
|
||||
|
||||
@@ -19,7 +19,7 @@ See [the documentation on Maintainers](https://docs.px4.io/main/en/contribute/ma
|
||||
| Matthias Grob | Multirotor | [@MaEtUgR](https://github.com/MaEtUgR) | maetugr |
|
||||
| Silvan Fuhrer | Fixed-Wing / VTOL | [@sfuhrer](https://github.com/sfuhrer) | sfuhrer |
|
||||
| Christian Friedrich | Rover | [@chfriedrich98](https://github.com/chfriedrich98) | christian982564 |
|
||||
| Pedro Roque | Spacecraft | [@Pedro-Roque](https://github.com/Pedro-Roque) | .pedroroque | <padr@kth.se>
|
||||
| Pedro Roque | Spacecraft | [@Pedro-Roque](https://github.com/Pedro-Roque) | .pedroroque | <roque@caltech.edu>
|
||||
| Jacob Dahl | Simulation | [@dakejahl](https://github.com/dakejahl) | dakejahl | <dahl.jakejacob@gmail.com>
|
||||
|
||||
|
||||
|
||||
@@ -511,6 +511,7 @@ validate_module_configs:
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f \
|
||||
-not -path "$(SRC_DIR)/src/lib/mixer_module/*" \
|
||||
-not -path "$(SRC_DIR)/src/modules/uxrce_dds_client/dds_topics.yaml" \
|
||||
-not -path "$(SRC_DIR)/src/modules/zenoh/dds_topics.yaml" \
|
||||
-not -path "$(SRC_DIR)/src/modules/zenoh/zenoh-pico/*" \
|
||||
-not -path "$(SRC_DIR)/src/lib/events/libevents/*" \
|
||||
-not -path "$(SRC_DIR)/src/lib/cdrstream/*" \
|
||||
|
||||
@@ -202,6 +202,31 @@ foreach(board_rc_file ${OPTIONAL_BOARD_RC})
|
||||
|
||||
endforeach()
|
||||
|
||||
if(config_additional_init)
|
||||
if(EXISTS "${PX4_BOARD_DIR}/init/${config_additional_init}")
|
||||
file(RELATIVE_PATH rc_file_relative ${PX4_SOURCE_DIR} ${PX4_BOARD_DIR}/init/${config_additional_init})
|
||||
message(STATUS "ROMFS: Adding ${rc_file_relative} -> /etc/init.d/rc.additional_init")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/rc.additional_init
|
||||
${config_additional_init}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_BOARD_DIR}/init/${config_additional_init} ${romfs_gen_root_dir}/init.d/rc.additional_init
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${config_additional_init}.stamp
|
||||
DEPENDS
|
||||
${PX4_BOARD_DIR}/init/${config_additional_init}
|
||||
romfs_copy.stamp
|
||||
COMMENT "ROMFS: copying ${config_additional_init}"
|
||||
)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${config_additional_init}.stamp
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "BOARD_ADDITIONAL_INIT file not found at: ${PX4_BOARD_DIR}/init/${config_additional_init}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# board extras
|
||||
set(OPTIONAL_BOARD_EXTRAS)
|
||||
|
||||
@@ -56,6 +56,17 @@ then
|
||||
fi
|
||||
unset BOARD_RC_DEFAULTS
|
||||
|
||||
#
|
||||
# Optional additional init file: rc.additional_init
|
||||
#
|
||||
set BOARD_RC_ADDITIONAL_INIT ${R}etc/init.d/rc.additional_init
|
||||
if [ -f $BOARD_RC_ADDITIONAL_INIT ]
|
||||
then
|
||||
echo "Board additional init: ${BOARD_RC_ADDITIONAL_INIT}"
|
||||
. $BOARD_RC_ADDITIONAL_INIT
|
||||
fi
|
||||
unset BOARD_RC_ADDITIONAL_INIT
|
||||
|
||||
#
|
||||
# Start system state indicator.
|
||||
#
|
||||
|
||||
@@ -34,7 +34,6 @@ 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
|
||||
param set-default COM_POSCTL_NAVL 2
|
||||
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DoF Spacecraft Model
|
||||
# @name KTH-ATMOS
|
||||
#
|
||||
# @type 2D Freeflyer with 8 thrusters - Planar motion
|
||||
# @type Free-Flyer
|
||||
# @class Spacecraft
|
||||
#
|
||||
# @maintainer Pedro Roque <padr@kth.se>
|
||||
# @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
|
||||
@@ -34,7 +45,6 @@ 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
|
||||
param set-default COM_POSCTL_NAVL 2
|
||||
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
|
||||
@@ -324,6 +324,11 @@ fi
|
||||
|
||||
uxrce_dds_client start -t udp -p $uxrce_dds_port $uxrce_dds_ns
|
||||
|
||||
if param greater -s ZENOH_ENABLE 0
|
||||
then
|
||||
zenoh start
|
||||
fi
|
||||
|
||||
if param greater -s MNT_MODE_IN -1
|
||||
then
|
||||
gimbal start
|
||||
|
||||
@@ -45,7 +45,6 @@ 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
|
||||
param set-default COM_POSCTL_NAVL 2
|
||||
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
|
||||
@@ -5,7 +5,17 @@
|
||||
# @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
|
||||
# @url https://atmos.discower.io
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.sc_defaults
|
||||
@@ -25,7 +35,6 @@ 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
|
||||
param set-default COM_POSCTL_NAVL 2
|
||||
|
||||
# Set Mocap Vision frame
|
||||
param set EKF2_EV_CTRL 15
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
# End Setup for board specific configurations. #
|
||||
###############################################################################
|
||||
|
||||
#
|
||||
# Set SD logging mode
|
||||
#
|
||||
if param compare SDLOG_MODE 1
|
||||
then
|
||||
set LOGGER_ARGS "${LOGGER_ARGS} -e"
|
||||
@@ -28,8 +31,28 @@ then
|
||||
set LOGGER_ARGS "${LOGGER_ARGS} -a"
|
||||
fi
|
||||
|
||||
#
|
||||
# Set logging backend
|
||||
#
|
||||
if param compare SDLOG_BACKEND 1
|
||||
then
|
||||
set LOGGER_ARGS "${LOGGER_ARGS} -m file"
|
||||
fi
|
||||
|
||||
if ! param compare SDLOG_MODE -1
|
||||
if param compare SDLOG_BACKEND 2
|
||||
then
|
||||
set LOGGER_ARGS "${LOGGER_ARGS} -m mavlink"
|
||||
fi
|
||||
|
||||
if param compare SDLOG_BACKEND 3
|
||||
then
|
||||
set LOGGER_ARGS "${LOGGER_ARGS} -m all"
|
||||
fi
|
||||
|
||||
#
|
||||
# Start logger if any logging backend is enabled
|
||||
#
|
||||
if ! param compare SDLOG_BACKEND 0
|
||||
then
|
||||
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
|
||||
fi
|
||||
|
||||
@@ -237,6 +237,7 @@ then
|
||||
qmc5883p -X -q start
|
||||
rm3100 -X -q start
|
||||
bmm350 -X -q start
|
||||
iis2mdc -X -q start
|
||||
|
||||
# start last (wait for possible icm20948 passthrough mode)
|
||||
ak09916 -X -q start
|
||||
|
||||
@@ -217,6 +217,17 @@ else
|
||||
fi
|
||||
unset BOARD_RC_DEFAULTS
|
||||
|
||||
#
|
||||
# Optional additional init file: rc.additional_init
|
||||
#
|
||||
set BOARD_RC_ADDITIONAL_INIT ${R}etc/init.d/rc.additional_init
|
||||
if [ -f $BOARD_RC_ADDITIONAL_INIT ]
|
||||
then
|
||||
echo "Board additional init: ${BOARD_RC_ADDITIONAL_INIT}"
|
||||
. $BOARD_RC_ADDITIONAL_INIT
|
||||
fi
|
||||
unset BOARD_RC_ADDITIONAL_INIT
|
||||
|
||||
# Load airframe configuration based on SYS_AUTOSTART parameter
|
||||
if ! param compare SYS_AUTOSTART 0
|
||||
then
|
||||
|
||||
@@ -38,7 +38,7 @@ if args.filter:
|
||||
default_container = 'ghcr.io/px4/px4-dev:v1.16.0-rc1-258-g0369abd556'
|
||||
build_configs = []
|
||||
grouped_targets = {}
|
||||
excluded_boards = ['modalai_voxl2', 'px4_ros2'] # TODO: fix and enable
|
||||
excluded_boards = ['modalai_voxl2', 'px4_ros2', 'espressif_esp32'] # TODO: fix and enable
|
||||
excluded_manufacturers = ['atlflight']
|
||||
excluded_platforms = ['qurt']
|
||||
excluded_labels = [
|
||||
|
||||
@@ -49,14 +49,14 @@ for field in spec.parsed_fields():
|
||||
(package, name) = genmsg.names.package_resource_name(field.base_type)
|
||||
package = package or spec.package # convert '' to package
|
||||
|
||||
print('typedef px4_msg_%s px4_msg_px4__msg__%s;' % (name,name))
|
||||
print('typedef px4_msgs_msg_%s px4_msgs_msg_px4_msgs__msg__%s;' % (name,name))
|
||||
}@
|
||||
|
||||
|
||||
|
||||
typedef struct @uorb_struct px4_msg_@(file_base_name);
|
||||
typedef struct @uorb_struct px4_msgs_msg_@(file_base_name);
|
||||
|
||||
extern const struct dds_cdrstream_desc px4_msg_@(file_base_name)_cdrstream_desc;
|
||||
extern const struct dds_cdrstream_desc px4_msgs_msg_@(file_base_name)_cdrstream_desc;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ class AirframeGroup(object):
|
||||
self.af_class = af_class
|
||||
self.airframes = []
|
||||
|
||||
|
||||
def AddAirframe(self, airframe):
|
||||
"""
|
||||
Add airframe to the airframe group
|
||||
@@ -107,6 +106,8 @@ class AirframeGroup(object):
|
||||
return "Balloon"
|
||||
elif (self.type == "Vectored 6 DOF UUV"):
|
||||
return "Vectored6DofUUV"
|
||||
elif self.type == "Free-Flyer":
|
||||
return "FreeFlyer"
|
||||
return "AirframeUnknown"
|
||||
|
||||
def GetAirframes(self):
|
||||
|
||||
@@ -29,6 +29,8 @@ RUN git config --global --add safe.directory '*'
|
||||
# Create user with id 1001 (jenkins docker workflow default)
|
||||
RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user
|
||||
|
||||
ENV PATH="${PATH}:/opt/xtensa-esp-elf/bin"
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
|
||||
@@ -54,6 +54,22 @@ if [[ ! -f "${DIR}/${REQUIREMENTS_FILE}" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Linux Mint compatibility: use upstream Ubuntu values
|
||||
if [ -r /etc/upstream-release/lsb-release ]; then
|
||||
. /etc/upstream-release/lsb-release
|
||||
UBUNTU_CODENAME="${DISTRIB_CODENAME:-${UBUNTU_CODENAME:-}}"
|
||||
UBUNTU_RELEASE="${DISTRIB_RELEASE:-${UBUNTU_RELEASE:-}}"
|
||||
|
||||
lsb_release() {
|
||||
if [ "$1" = "-cs" ]; then
|
||||
printf '%s' "$UBUNTU_CODENAME"
|
||||
elif [ "$1" = "-rs" ]; then
|
||||
printf '%s' "$UBUNTU_RELEASE"
|
||||
else
|
||||
command lsb_release "$@"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
# check ubuntu version
|
||||
# otherwise warn and point to docker?
|
||||
@@ -155,7 +171,14 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
g++-multilib \
|
||||
gcc-arm-none-eabi \
|
||||
gcc-multilib \
|
||||
esptool \
|
||||
;
|
||||
|
||||
echo
|
||||
echo "Fetching Xtensa compilers"
|
||||
wget -q -P $DIR https://github.com/espressif/crosstool-NG/releases/download/esp-13.2.0_20240530/xtensa-esp-elf-13.2.0_20240530-x86_64-linux-gnu.tar.xz
|
||||
sudo tar -xf $DIR/xtensa-esp-elf-13.2.0_20240530-x86_64-linux-gnu.tar.xz -C /opt
|
||||
echo 'export PATH=$PATH:/opt/xtensa-esp-elf/bin/' >> /home/$USER/.bashrc
|
||||
fi
|
||||
|
||||
if [[ "${INSTALL_ARCH}" == "aarch64" ]]; then
|
||||
|
||||
@@ -42,6 +42,7 @@ import os
|
||||
import argparse
|
||||
import re
|
||||
import sys
|
||||
import json
|
||||
|
||||
try:
|
||||
import em
|
||||
@@ -124,7 +125,7 @@ def generate_by_template(output_file, template_file, em_globals):
|
||||
return True
|
||||
|
||||
|
||||
def generate_topics_list_file_from_files(files, outputdir, template_filename, templatedir):
|
||||
def generate_topics_list_file_from_files(files, outputdir, template_filename, templatedir, rihs_path):
|
||||
# generate cpp file with topics list
|
||||
filenames = []
|
||||
for filename in [os.path.basename(p) for p in files if os.path.basename(p).endswith(".msg")]:
|
||||
@@ -138,11 +139,27 @@ def generate_topics_list_file_from_files(files, outputdir, template_filename, te
|
||||
for filename in [os.path.basename(p) for p in files if os.path.basename(p).endswith(".msg")]:
|
||||
full_base_names.append(filename.replace(".msg",""))
|
||||
|
||||
topics = []
|
||||
for msg_filename in files:
|
||||
topics.extend(get_topics(msg_filename))
|
||||
rihs01_hashes = dict()
|
||||
if rihs_path != '':
|
||||
for topic in full_base_names:
|
||||
with open(rihs_path + "/msg/" + topic + ".json") as f:
|
||||
d = json.load(f)
|
||||
assert d['type_hashes'][0]['hash_string'][:7] == 'RIHS01_'
|
||||
|
||||
tl_globals = {"msgs": filenames, "topics": topics, "datatypes": datatypes, "full_base_names": full_base_names}
|
||||
rihs01_hash = d['type_hashes'][0]['hash_string'][7:]
|
||||
|
||||
byte_array = [f"0x{rihs01_hash[i:i+2]}" for i in range(0, len(rihs01_hash), 2)]
|
||||
c_code = f"{{ {', '.join(byte_array)} }};"
|
||||
rihs01_hashes[topic] = c_code
|
||||
|
||||
topics = []
|
||||
datatypes_with_topics = dict()
|
||||
for msg_filename in files:
|
||||
datatype = re.sub(r'(?<!^)(?=[A-Z])', '_', os.path.basename(msg_filename)).lower().replace(".msg","")
|
||||
datatypes_with_topics[datatype] = get_topics(msg_filename)
|
||||
topics.extend(datatypes_with_topics[datatype])
|
||||
|
||||
tl_globals = {"msgs": filenames, "topics": topics, "datatypes": datatypes, "full_base_names": full_base_names, "rihs01_hashes": rihs01_hashes, "datatypes_with_topics": datatypes_with_topics}
|
||||
tl_template_file = os.path.join(templatedir, template_filename)
|
||||
tl_out_file = os.path.join(outputdir, template_filename.replace(".em", ""))
|
||||
|
||||
@@ -162,13 +179,15 @@ if __name__ == "__main__":
|
||||
parser.add_argument('-p', dest='prefix', default='',
|
||||
help='string added as prefix to the output file '
|
||||
' name when converting directories')
|
||||
parser.add_argument('--rihs', dest='rihs', default='',
|
||||
help='path where rihs01 json files located')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.zenoh_config:
|
||||
generate_topics_list_file_from_files(args.file, args.outputdir, ZENOH_TEMPLATE_FILE[0], args.templatedir)
|
||||
generate_topics_list_file_from_files(args.file, args.outputdir, ZENOH_TEMPLATE_FILE[0], args.templatedir, args.rihs)
|
||||
exit(0)
|
||||
elif args.zenoh_pub_sub:
|
||||
generate_topics_list_file_from_files(args.file, args.outputdir, ZENOH_TEMPLATE_FILE[1], args.templatedir)
|
||||
generate_topics_list_file_from_files(args.file, args.outputdir, ZENOH_TEMPLATE_FILE[1], args.templatedir, args.rihs)
|
||||
exit(0)
|
||||
else:
|
||||
print('Error: either --headers or --sources must be specified')
|
||||
|
||||
@@ -74,7 +74,7 @@ full_base_names.sort()
|
||||
|
||||
@[for idx, topic_name in enumerate(datatypes)]@
|
||||
@{
|
||||
type_topic_count = len([e for e in topic_names_all if e.startswith(topic_name)])
|
||||
type_topic_count = len(datatypes_with_topics[topic_name])
|
||||
}@
|
||||
#ifdef CONFIG_ZENOH_PUBSUB_@(topic_name.upper())
|
||||
# define CONFIG_ZENOH_PUBSUB_@(topic_name.upper())_COUNT @(type_topic_count)
|
||||
@@ -88,9 +88,28 @@ type_topic_count = len([e for e in topic_names_all if e.startswith(topic_name)])
|
||||
CONFIG_ZENOH_PUBSUB_@(topic_name.upper())_COUNT + \
|
||||
@[end for] 0
|
||||
|
||||
@[for topic_name, rihs01_hash in rihs01_hashes.items()]@
|
||||
const uint8_t @(topic_name)_hash[32] = @(rihs01_hash)
|
||||
@[end for]
|
||||
|
||||
@[for idx, topic_name in enumerate(datatypes)]@
|
||||
#ifdef CONFIG_ZENOH_PUBSUB_@(topic_name.upper())
|
||||
@{
|
||||
topic_names = datatypes_with_topics[topic_name]
|
||||
}@
|
||||
const orb_metadata* @(topic_name)_topic_meta[@(len(topic_names))] = {
|
||||
@[for topic_name_inst in topic_names]@
|
||||
ORB_ID(@(topic_name_inst)),
|
||||
@[end for]};
|
||||
#endif
|
||||
@[end for]
|
||||
|
||||
typedef struct {
|
||||
const char *data_type_name;
|
||||
const uint32_t *ops;
|
||||
const orb_metadata* orb_meta;
|
||||
const uint8_t *hash;
|
||||
const orb_metadata** orb_topic;
|
||||
const uint8_t orb_topics_size;
|
||||
} UorbPubSubTopicBinder;
|
||||
|
||||
const UorbPubSubTopicBinder _topics[ZENOH_PUBSUB_COUNT] {
|
||||
@@ -100,54 +119,95 @@ uorb_id_idx = 0
|
||||
@[for idx, topic_name in enumerate(datatypes)]@
|
||||
#ifdef CONFIG_ZENOH_PUBSUB_@(topic_name.upper())
|
||||
@{
|
||||
topic_names = [e for e in topic_names_all if e.startswith(topic_name)]
|
||||
topic_names = datatypes_with_topics[topic_name]
|
||||
}@
|
||||
@[for topic_name_inst in topic_names]@
|
||||
{
|
||||
px4_msg_@(topic_dict[topic_name])_cdrstream_desc.ops.ops,
|
||||
ORB_ID(@(topic_name_inst))
|
||||
"@(topic_name)",
|
||||
px4_msgs_msg_@(topic_dict[topic_name])_cdrstream_desc.ops.ops,
|
||||
@(topic_dict[topic_name])_hash,
|
||||
@(topic_name)_topic_meta,
|
||||
@(len(topic_names)),
|
||||
},
|
||||
@{
|
||||
uorb_id_idx += 1
|
||||
}@
|
||||
@[end for]#endif
|
||||
#endif
|
||||
@[end for]
|
||||
};
|
||||
|
||||
uORB_Zenoh_Publisher* genPublisher(const orb_metadata *meta) {
|
||||
uORB_Zenoh_Publisher* genPublisher(const orb_metadata *meta, int instance) {
|
||||
for (auto &pub : _topics) {
|
||||
if(pub.orb_meta->o_id == meta->o_id) {
|
||||
return new uORB_Zenoh_Publisher(meta, pub.ops);
|
||||
for(int i = 0; i < pub.orb_topics_size; i++) {
|
||||
if(pub.orb_topic[i]->o_id == meta->o_id) {
|
||||
return new uORB_Zenoh_Publisher(meta, pub.ops, instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
uORB_Zenoh_Publisher* genPublisher(const char *name) {
|
||||
uORB_Zenoh_Publisher* genPublisher(const char *name, int instance) {
|
||||
for (auto &pub : _topics) {
|
||||
if(strcmp(pub.orb_meta->o_name, name) == 0) {
|
||||
return new uORB_Zenoh_Publisher(pub.orb_meta, pub.ops);
|
||||
for(int i = 0; i < pub.orb_topics_size; i++) {
|
||||
if(strcmp(pub.orb_topic[i]->o_name, name) == 0) {
|
||||
return new uORB_Zenoh_Publisher(pub.orb_topic[i], pub.ops, instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Zenoh_Subscriber* genSubscriber(const orb_metadata *meta) {
|
||||
Zenoh_Subscriber* genSubscriber(const orb_metadata *meta, int instance) {
|
||||
for (auto &sub : _topics) {
|
||||
if(sub.orb_meta->o_id == meta->o_id) {
|
||||
return new uORB_Zenoh_Subscriber(meta, sub.ops);
|
||||
for(int i = 0; i < sub.orb_topics_size; i++) {
|
||||
if(sub.orb_topic[i]->o_id == meta->o_id) {
|
||||
return new uORB_Zenoh_Subscriber(meta, sub.ops, instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Zenoh_Subscriber* genSubscriber(const char *name) {
|
||||
Zenoh_Subscriber* genSubscriber(const char *name, int instance) {
|
||||
for (auto &sub : _topics) {
|
||||
if(strcmp(sub.orb_meta->o_name, name) == 0) {
|
||||
return new uORB_Zenoh_Subscriber(sub.orb_meta, sub.ops);
|
||||
for(int i = 0; i < sub.orb_topics_size; i++) {
|
||||
if(strcmp(sub.orb_topic[i]->o_name, name) == 0) {
|
||||
return new uORB_Zenoh_Subscriber(sub.orb_topic[i], sub.ops, instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* getTypeName(const char *name) {
|
||||
for (auto &sub : _topics) {
|
||||
for(int i = 0; i < sub.orb_topics_size; i++) {
|
||||
if(strcmp(sub.orb_topic[i]->o_name, name) == 0) {
|
||||
return sub.data_type_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const uint8_t* getRIHS01_Hash(const orb_metadata *meta) {
|
||||
for (auto &sub : _topics) {
|
||||
for(int i = 0; i < sub.orb_topics_size; i++) {
|
||||
if(sub.orb_topic[i]->o_id == meta->o_id) {
|
||||
return sub.hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const uint8_t* getRIHS01_Hash(const char *name) {
|
||||
for (auto &sub : _topics) {
|
||||
for(int i = 0; i < sub.orb_topics_size; i++) {
|
||||
if(strcmp(sub.orb_topic[i]->o_name, name) == 0) {
|
||||
return sub.hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -36,7 +36,6 @@ param set-default EKF2_MULTI_IMU 0
|
||||
param set-default EKF2_OF_CTRL 1
|
||||
param set-default EKF2_OF_N_MIN 0.05
|
||||
param set-default EKF2_RNG_A_HMAX 25
|
||||
param set-default EKF2_RNG_QLTY_T 0.1
|
||||
|
||||
param set-default SENS_FLOW_RATE 150
|
||||
param set-default SENS_IMU_MODE 1
|
||||
|
||||
@@ -21,6 +21,7 @@ CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_DATAMAN_PERSISTENT_STORAGE=n
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
|
||||
|
||||
@@ -14,7 +14,7 @@ param set-default SYS_DM_BACKEND 1
|
||||
# Set TELEM1 as default mavlink connection
|
||||
param set-default MAV_0_CONFIG 0
|
||||
# Disable logger writing to FRAM, only stream over MAVLINK
|
||||
set LOGGER_ARGS "-m mavlink"
|
||||
param set-default SDLOG_BACKEND 2
|
||||
|
||||
# 200kOhm/10kOhm voltage divider on V_BAT
|
||||
param set-default BAT1_V_DIV 21
|
||||
|
||||
@@ -12,17 +12,20 @@ board_adc start
|
||||
bmi088 -A -R 0 -s start
|
||||
bmi088 -G -R 0 -s start
|
||||
|
||||
# MAG on I2C4, ROTATION_ROLL_180=8
|
||||
if ver hwtypecmp V6S013 V6S015
|
||||
then
|
||||
# Revision(s) with BMM150
|
||||
# MAG on I2C4, ROTATION_ROLL_180=8
|
||||
bmm150 -I -R 8 start
|
||||
else
|
||||
# Revision(s) with BMM350
|
||||
# MAG on I2C4, ROTATION_ROLL_180=8
|
||||
bmm350 -I -R 8 start
|
||||
fi
|
||||
|
||||
# BARO on I2C4
|
||||
bmp388 -I -b 4 -a 0x77 start
|
||||
|
||||
|
||||
# External sensors on I2C1
|
||||
|
||||
if param compare SENS_EN_INA226 1
|
||||
then
|
||||
# Start Digital power monitors
|
||||
@@ -59,14 +62,17 @@ fi
|
||||
|
||||
if param compare BAT1_V_CHANNEL -2
|
||||
then
|
||||
if [ "$INA_CONFIGURED" != "yes" ]
|
||||
then
|
||||
param set BAT1_V_CHANNEL -1
|
||||
fi
|
||||
if [ "$INA_CONFIGURED" != "yes" ]
|
||||
then
|
||||
param set BAT1_V_CHANNEL -1
|
||||
fi
|
||||
fi
|
||||
|
||||
# External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer)
|
||||
# External compass IST8310 on I2C1
|
||||
ist8310 -X -b 1 -R 10 start
|
||||
|
||||
# BARO on I2C4
|
||||
bmp388 -I -b 4 -a 0x77 start
|
||||
# Start an external PWM generator
|
||||
if param greater PCA9685_EN_BUS 0
|
||||
then
|
||||
pca9685_pwm_out start -b 1
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
CONFIG_BOARD_TOOLCHAIN="xtensa-esp32-elf"
|
||||
CONFIG_BOARD_ARCHITECTURE="esp32"
|
||||
CONFIG_BOARD_ROMFSROOT="cannode"
|
||||
CONFIG_BOARD_EXTERNAL_METADATA=y
|
||||
CONFIG_BOARD_ETHERNET=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
CONFIG_MODULES_DATAMAN=y
|
||||
# CONFIG_DATAMAN_PERSISTENT_STORAGE is not set
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1
|
||||
CONFIG_MODULES_EVENTS=y
|
||||
CONFIG_MODULES_GIMBAL=y
|
||||
CONFIG_MODULES_LOAD_MON=y
|
||||
CONFIG_MODULES_LOGGER=y
|
||||
CONFIG_LOGGER_STACK_SIZE=4000
|
||||
CONFIG_MODULES_MAVLINK=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
# CONFIG_NAVIGATOR_ADSB is not set
|
||||
CONFIG_MODULES_PAYLOAD_DELIVERER=y
|
||||
CONFIG_SYSTEMCMDS_BSONDUMP=y
|
||||
CONFIG_SYSTEMCMDS_DMESG=y
|
||||
CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
CONFIG_SYSTEMCMDS_MFT=y
|
||||
CONFIG_SYSTEMCMDS_MTD=y
|
||||
CONFIG_SYSTEMCMDS_NETMAN=y
|
||||
CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
CONFIG_SYSTEMCMDS_PARAM=y
|
||||
CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
CONFIG_SYSTEMCMDS_SD_STRESS=y
|
||||
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
CONFIG_SYSTEMCMDS_TOP=y
|
||||
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
CONFIG_SYSTEMCMDS_UORB=y
|
||||
CONFIG_SYSTEMCMDS_VER=y
|
||||
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
|
||||
CONFIG_BOARD_PWM_FREQ=250
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"board_id": 42,
|
||||
"magic": "ESP32",
|
||||
"description": "Firmware for the ESP32",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "ESP32",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 1032192,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
dhcpd_start wlan0
|
||||
mavlink start -u 14550 -o 14550 -m 0 -r 1000 -x -p -s
|
||||
mavlink start -d /dev/ttyS1 -b 115200 -f -w -Z
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific MAVLink startup script.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Start MAVLink on the USB port
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific sensors init
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,61 @@
|
||||
/************************************************************************************
|
||||
* configs/px4fmu/include/board.h
|
||||
* include/arch/board/board.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ARCH_BOARD_BOARD_H
|
||||
#define __ARCH_BOARD_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <arch/board/esp32_board.h>
|
||||
|
||||
#define LED_STARTED 0 /* LED2 */
|
||||
#define LED_HEAPALLOCATE 1 /* LED3 */
|
||||
#define LED_IRQSENABLED 2 /* LED3 + LED2 */
|
||||
#define LED_STACKCREATED 3 /* LED3 */
|
||||
#define LED_INIRQ 4 /* LED1 + LED3 */
|
||||
#define LED_SIGNAL 5 /* LED2 + LED3 */
|
||||
#define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */
|
||||
#define LED_PANIC 7 /* LED1 + N/C + N/C */
|
||||
|
||||
|
||||
#endif /* __ARCH_BOARD_BOARD_H */
|
||||
@@ -0,0 +1,85 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/esp32-devkitc/include/board.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_XTENSA_ESP32_ESP32_CORE_INCLUDE_BOARD_H
|
||||
#define __BOARDS_XTENSA_ESP32_ESP32_CORE_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
/* The ESP32 Core board V2 is fitted with either a 26 a 40MHz crystal */
|
||||
|
||||
#ifdef CONFIG_ESP32_XTAL_26MHz
|
||||
# define BOARD_XTAL_FREQUENCY 26000000
|
||||
#else
|
||||
# define BOARD_XTAL_FREQUENCY 40000000
|
||||
#endif
|
||||
|
||||
/* Clock reconfiguration is currently disabled, so the CPU will be running
|
||||
* at the XTAL frequency or at two times the XTAL frequency, depending upon
|
||||
* how we load the code:
|
||||
*
|
||||
* - If we load the code into FLASH at address 0x1000 where it is started by
|
||||
* the second level bootloader, then the frequency is the crystal
|
||||
* frequency.
|
||||
* - If we load the code into IRAM after the second level bootloader has run
|
||||
* this frequency will be twice the crystal frequency.
|
||||
*
|
||||
* Don't ask me for an explanation.
|
||||
*/
|
||||
|
||||
/* Note: The bootloader (esp-idf bootloader.bin) configures:
|
||||
*
|
||||
* - CPU frequency to 80MHz
|
||||
* - The XTAL frequency according to the SDK config CONFIG_ESP32_XTAL_FREQ,
|
||||
* which is 40MHz by default.
|
||||
*
|
||||
* Reference:
|
||||
* https://github.com/espressif/esp-idf/blob
|
||||
* /6fd855ab8d00d23bad4660216bc2122c2285d5be/components
|
||||
* /bootloader_support/src/bootloader_clock.c#L38-L62
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ESP32_RUN_IRAM
|
||||
# define BOARD_CLOCK_FREQUENCY (2 * BOARD_XTAL_FREQUENCY)
|
||||
#else
|
||||
#ifdef CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ
|
||||
# define BOARD_CLOCK_FREQUENCY (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000)
|
||||
#else
|
||||
# define BOARD_CLOCK_FREQUENCY 80000000
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
|
||||
/* Define how many LEDs this board has (needed by userleds) */
|
||||
|
||||
#define BOARD_NLEDS 1
|
||||
|
||||
/* GPIO pins used by the GPIO Subsystem */
|
||||
|
||||
#define BOARD_NGPIOOUT 1 /* Amount of GPIO Output pins */
|
||||
#define BOARD_NGPIOIN 1 /* Amount of GPIO Input without Interruption */
|
||||
#define BOARD_NGPIOINT 1 /* Amount of GPIO Input w/ Interruption pins */
|
||||
|
||||
#endif /* __BOARDS_XTENSA_ESP32_ESP32_CORE_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,219 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ESP32_SPI3_DMA is not set
|
||||
# CONFIG_ESP32_SPI_SWCS is not set
|
||||
# CONFIG_ESP32_WIFI_RX_AMPDU is not set
|
||||
# CONFIG_ESP32_WIFI_TX_AMPDU is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_MMCSD_MMCSUPPORT is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
CONFIG_ARCH="xtensa"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/espressif/esp32/nuttx-config"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME=""
|
||||
CONFIG_ARCH_CHIP="esp32"
|
||||
CONFIG_ARCH_CHIP_ESP32=y
|
||||
CONFIG_ARCH_CHIP_ESP32WROOM32=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_XTENSA=y
|
||||
CONFIG_BOARDCTL_MKRD=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEBUG_TCBINFO=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_PIPE_MAXSIZE=1024
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_DEV_URANDOM=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ELF=y
|
||||
CONFIG_ESP32_FLASH_FREQ_80M=y
|
||||
CONFIG_ESP32_FLASH_MODE_QIO=y
|
||||
CONFIG_ESP32_I2C0=y
|
||||
CONFIG_ESP32_I2CTIMEOMS=10
|
||||
CONFIG_ESP32_LEDC=y
|
||||
CONFIG_ESP32_LEDC_CHANNEL1_PIN=13
|
||||
CONFIG_ESP32_LEDC_CHANNEL2_PIN=16
|
||||
CONFIG_ESP32_LEDC_CHANNEL3_PIN=17
|
||||
CONFIG_ESP32_LEDC_TIM0=y
|
||||
CONFIG_ESP32_LEDC_TIM0_CHANNELS=4
|
||||
CONFIG_ESP32_SPI3=y
|
||||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_UART1=y
|
||||
CONFIG_ESP32_UART1_RXPIN=14
|
||||
CONFIG_ESP32_UART1_TXPIN=12
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RXBUF_NUM=16
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TXBUF_NUM=16
|
||||
CONFIG_ESP32_WIFI_SAVE_PARAM=y
|
||||
CONFIG_ESP32_WIFI_STATION_SOFTAP_COEXISTENCE=y
|
||||
CONFIG_EXAMPLES_CALIB_UDELAY=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_FAT_DMAMEMORY=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FAT_LFN_ALIAS_HASH=y
|
||||
CONFIG_FAT_LFN_UTF8=y
|
||||
CONFIG_FSUTILS_IPCFG=y
|
||||
CONFIG_FS_BINFS=y
|
||||
CONFIG_FS_CROMFS=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
CONFIG_GRAN_INTR=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY="27"
|
||||
CONFIG_IEEE80211_BROADCOM_SCHED_PRIORITY=50
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=6000
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_IOB_THROTTLE=0
|
||||
CONFIG_IPCFG_BINARY=y
|
||||
CONFIG_IPCFG_CHARDEV=y
|
||||
CONFIG_IPCFG_PATH="/fs/mtd_net"
|
||||
CONFIG_LIBC_MAX_EXITFUNS=1
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_MM_REGIONS=3
|
||||
CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NAME_MAX=48
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETDEV_WIRELESS_IOCTL=y
|
||||
CONFIG_NETDOWN_NOTIFIER=y
|
||||
CONFIG_NETINIT_DNS=y
|
||||
CONFIG_NETINIT_DNSIPADDR=0xA290AFE
|
||||
CONFIG_NETINIT_DRIPADDR=0XA290AFE
|
||||
CONFIG_NETINIT_IPADDR=0xC0A80001
|
||||
CONFIG_NETINIT_MONITOR=y
|
||||
CONFIG_NETINIT_THREAD=y
|
||||
CONFIG_NETINIT_THREAD_PRIORITY=49
|
||||
CONFIG_NETINIT_WAPI_ALG=0
|
||||
CONFIG_NETINIT_WAPI_AUTHWPA=0x00000001
|
||||
CONFIG_NETINIT_WAPI_CIPHERMODE=0x00000001
|
||||
CONFIG_NETINIT_WAPI_PASSPHRASE="px4-esp32"
|
||||
CONFIG_NETINIT_WAPI_SSID="px4-esp32"
|
||||
CONFIG_NETINIT_WAPI_STAMODE=3
|
||||
CONFIG_NETUTILS_DHCPC_BOOTP_FLAGS=0x0000
|
||||
CONFIG_NETUTILS_DHCPD=y
|
||||
CONFIG_NETUTILS_DHCPD_DNSIP=0xc0a80001
|
||||
CONFIG_NETUTILS_DHCPD_MAXLEASES=2
|
||||
CONFIG_NETUTILS_DHCPD_ROUTERIP=0xc0a80001
|
||||
CONFIG_NETUTILS_DHCPD_STACKSIZE=3048
|
||||
CONFIG_NETUTILS_DHCPD_STARTIP=0xc0a80002
|
||||
CONFIG_NETUTILS_TELNETC=y
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_PKTSIZE=1518
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_NETLINK=y
|
||||
CONFIG_NET_SOLINGER=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCPBACKLOG=y
|
||||
CONFIG_NET_TCP_DELAYED_ACK=y
|
||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_UDP_WRITE_BUFFERS=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_CROMFSETC=y
|
||||
CONFIG_NSH_DISABLE_BASENAME=y
|
||||
CONFIG_NSH_DISABLE_CMP=y
|
||||
CONFIG_NSH_DISABLE_DD=y
|
||||
CONFIG_NSH_DISABLE_DIRNAME=y
|
||||
CONFIG_NSH_DISABLE_HEXDUMP=y
|
||||
CONFIG_NSH_DISABLE_LOSETUP=y
|
||||
CONFIG_NSH_DISABLE_MKFIFO=y
|
||||
CONFIG_NSH_DISABLE_MKRD=y
|
||||
CONFIG_NSH_DISABLE_PRINTF=y
|
||||
CONFIG_NSH_DISABLE_PUT=y
|
||||
CONFIG_NSH_DISABLE_TRUNCATE=y
|
||||
CONFIG_NSH_DISABLE_UNAME=y
|
||||
CONFIG_NSH_DISABLE_WGET=y
|
||||
CONFIG_NSH_DISABLE_XD=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
CONFIG_NSH_NESTDEPTH=8
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_PWM_MULTICHAN=y
|
||||
CONFIG_PWM_NCHANNELS=4
|
||||
CONFIG_RAMTRON_EMULATE_PAGE_SHIFT=10
|
||||
CONFIG_RAMTRON_EMULATE_SECTOR_SHIFT=10
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAM_SIZE=114688
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_READLINE_CMD_HISTORY_LEN=4
|
||||
CONFIG_READLINE_CMD_HISTORY_LINELEN=64
|
||||
CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=249
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=1280
|
||||
CONFIG_SCHED_INSTRUMENTATION=y
|
||||
CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
|
||||
CONFIG_SCHED_INSTRUMENTATION_SWITCH=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_LPWORKPRIOMAX=178
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SEM_PREALLOCHOLDERS=32
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SIG_SIGALRM_ACTION=y
|
||||
CONFIG_SIG_SIGCONDTIMEDOUT=19
|
||||
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||
CONFIG_SIG_SIGWORK=20
|
||||
CONFIG_SPIFFS_NAME_MAX=48
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=30
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_STDIO_BUFFER_SIZE=32
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_MDIO=y
|
||||
CONFIG_SYSTEM_NETDB=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NSH_STACKSIZE=1000
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_TLS_TASK_NELEM=4
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USEC_PER_TICK=1000
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_WAPI=y
|
||||
CONFIG_WIRELESS_WAPI_CMDTOOL=y
|
||||
CONFIG_WIRELESS_WAPI_STACKSIZE=4096
|
||||
@@ -0,0 +1,296 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/scripts/esp32.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Default entry point: */
|
||||
|
||||
ENTRY(__start);
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* Send .iram0 code to iram */
|
||||
|
||||
.iram0.vectors :
|
||||
{
|
||||
/* Vectors go to IRAM */
|
||||
|
||||
_init_start = ABSOLUTE(.);
|
||||
|
||||
/* Vectors according to builds/RF-2015.2-win32/esp108_v1_2_s5_512int_2/config.html */
|
||||
|
||||
. = 0x0;
|
||||
KEEP (*(.window_vectors.text));
|
||||
. = 0x180;
|
||||
KEEP (*(.xtensa_level2_vector.text));
|
||||
. = 0x1c0;
|
||||
KEEP (*(.xtensa_level3_vector.text));
|
||||
. = 0x200;
|
||||
KEEP (*(.xtensa_level4_vector.text));
|
||||
. = 0x240;
|
||||
KEEP (*(.xtensa_level5_vector.text));
|
||||
. = 0x280;
|
||||
KEEP (*(.debug_exception_vector.text));
|
||||
. = 0x2c0;
|
||||
KEEP (*(.nmi_vector.text));
|
||||
. = 0x300;
|
||||
KEEP (*(.kernel_exception_vector.text));
|
||||
. = 0x340;
|
||||
KEEP (*(.user_exception_vector.text));
|
||||
. = 0x3c0;
|
||||
KEEP (*(.double_exception_vector.text));
|
||||
. = 0x400;
|
||||
*(.*_vector.literal)
|
||||
|
||||
. = ALIGN (16);
|
||||
*(.entry.text)
|
||||
*(.init.literal)
|
||||
*(.init)
|
||||
_init_end = ABSOLUTE(.);
|
||||
} > iram0_0_seg
|
||||
|
||||
.iram0.text :
|
||||
{
|
||||
/* Code marked as running out of IRAM */
|
||||
|
||||
_iram_text_start = ABSOLUTE(.);
|
||||
*(.iram1 .iram1.*)
|
||||
*librtc.a:(.literal .text .literal.* .text.*)
|
||||
*libarch.a:esp32_spiflash.*(.literal .text .literal.* .text.*)
|
||||
*libarch.a:xtensa_cpupause.*(.literal .text .literal.* .text.*)
|
||||
*libarch.a:xtensa_copystate.*(.literal .text .literal.* .text.*)
|
||||
*libarch.a:xtensa_interruptcontext.*(.literal .text .literal.* .text.*)
|
||||
*libarch.a:xtensa_testset.*(.literal .text .literal.* .text.*)
|
||||
|
||||
*libsched.a:sched_suspendscheduler.*(.literal .text .literal.* .text.*)
|
||||
*libsched.a:sched_note.*(.literal .text .literal.* .text.*)
|
||||
*libsched.a:sched_thistask.*(.literal .text .literal.* .text.*)
|
||||
*libsched.a:spinlock.*(.literal .text .literal.* .text.*)
|
||||
*libsched.a:irq_csection.*(.literal .text .literal.* .text.*)
|
||||
*libsched.a:irq_dispatch.*(.literal .text .literal.* .text.*)
|
||||
|
||||
*(.wifirxiram .wifirxiram.*)
|
||||
*(.wifi0iram .wifi0iram.*)
|
||||
*(.wifislpiram .wifislpiram.*)
|
||||
*(.wifislprxiram .wifislprxiram.*)
|
||||
*(.phyiram .phyiram.*)
|
||||
_iram_text_end = ABSOLUTE(.);
|
||||
|
||||
/* IRAM heap starts at the end of iram0_0_seg */
|
||||
|
||||
. = ALIGN (4);
|
||||
_siramheap = ABSOLUTE(.);
|
||||
} > iram0_0_seg
|
||||
|
||||
/* Shared RAM */
|
||||
|
||||
.dram0.bss (NOLOAD) :
|
||||
{
|
||||
/* .bss initialized on power-up */
|
||||
|
||||
. = ALIGN (8);
|
||||
_sbss = ABSOLUTE(.);
|
||||
_bss_start = ABSOLUTE(.);
|
||||
*(.ext_ram.bss*)
|
||||
_bt_bss_start = ABSOLUTE(.);
|
||||
*libbt.a:(.bss .bss.* COMMON)
|
||||
. = ALIGN (4);
|
||||
_bt_bss_end = ABSOLUTE(.);
|
||||
_btdm_bss_start = ABSOLUTE(.);
|
||||
*libbtdm_app.a:(.bss .bss.* COMMON)
|
||||
. = ALIGN (4);
|
||||
_btdm_bss_end = ABSOLUTE(.);
|
||||
. = ALIGN (8);
|
||||
*(.dynsbss)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
*(.sbss2)
|
||||
*(.sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
*(.dynbss)
|
||||
KEEP (*(.bss))
|
||||
*(.bss.*)
|
||||
*(.share.mem)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
*libarch.a:esp32_spiflash.*(.bss .bss.* COMMON)
|
||||
*libarch.a:xtensa_cpupause.*(.bss .bss.* COMMON)
|
||||
*libarch.a:xtensa_copystate.*(.bss .bss.* COMMON)
|
||||
*libarch.a:xtensa_interruptcontext.*(.bss .bss.* COMMON)
|
||||
*libarch.a:xtensa_testset.*(.bss .bss.* COMMON)
|
||||
|
||||
*libsched.a:sched_suspendscheduler.*(.bss .bss.* COMMON)
|
||||
*libsched.a:sched_thistask.*(.bss .bss.* COMMON)
|
||||
*libsched.a:sched_note.*(.bss .bss.* COMMON)
|
||||
*libsched.a:spinlock.*(.bss .bss.* COMMON)
|
||||
*libsched.a:irq_csection.*(.bss .bss.* COMMON)
|
||||
*libsched.a:irq_dispatch.*(.bss .bss.* COMMON)
|
||||
|
||||
. = ALIGN(8);
|
||||
_bss_end = ABSOLUTE(.);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} >dram0_0_seg
|
||||
|
||||
.noinit (NOLOAD):
|
||||
{
|
||||
/* This section contains data that is not initialized during load,
|
||||
* or during the application's initialization sequence.
|
||||
*/
|
||||
|
||||
*(.noinit)
|
||||
} >dram0_0_seg
|
||||
|
||||
.dram0.data :
|
||||
{
|
||||
/* .data initialized on power-up in ROMed configurations. */
|
||||
|
||||
_sdata = ABSOLUTE(.);
|
||||
_bt_data_start = ABSOLUTE(.);
|
||||
*libbt.a:(.data .data.*)
|
||||
. = ALIGN (4);
|
||||
_bt_data_end = ABSOLUTE(.);
|
||||
_btdm_data_start = ABSOLUTE(.);
|
||||
*libbtdm_app.a:(.data .data.*)
|
||||
. = ALIGN (4);
|
||||
_btdm_data_end = ABSOLUTE(.);
|
||||
KEEP (*(.data))
|
||||
KEEP (*(.data.*))
|
||||
KEEP (*(.gnu.linkonce.d.*))
|
||||
KEEP (*(.data1))
|
||||
KEEP (*(.sdata))
|
||||
KEEP (*(.sdata.*))
|
||||
KEEP (*(.gnu.linkonce.s.*))
|
||||
KEEP (*(.sdata2))
|
||||
KEEP (*(.sdata2.*))
|
||||
KEEP (*(.gnu.linkonce.s2.*))
|
||||
KEEP (*(.jcr))
|
||||
*(.dram1 .dram1.*)
|
||||
*libphy.a:(.rodata .rodata.*)
|
||||
*libarch.a:esp32_spiflash.*(.rodata .rodata.*)
|
||||
*libarch.a:xtensa_cpupause.*(.rodata .rodata.*)
|
||||
*libarch.a:xtensa_copystate.*(.rodata .rodata.*)
|
||||
*libarch.a:xtensa_interruptcontext.*(.rodata .rodata.*)
|
||||
*libarch.a:xtensa_testset.*(.rodata .rodata.*)
|
||||
|
||||
*libsched.a:sched_suspendscheduler.*(.rodata .rodata.*)
|
||||
*libsched.a:sched_thistask.*(.rodata .rodata.*)
|
||||
*libsched.a:sched_note.*(.rodata .rodata.*)
|
||||
*libsched.a:spinlock.*(.rodata .rodata.*)
|
||||
*libsched.a:irq_csection.*(.rodata .rodata.*)
|
||||
*libsched.a:irq_dispatch.*(.rodata .rodata.*)
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
|
||||
/* Heap starts at the end of .data */
|
||||
|
||||
_sheap = ABSOLUTE(.);
|
||||
} >dram0_0_seg
|
||||
|
||||
/* External memory bss, from any global variable with EXT_RAM_ATTR attribute */
|
||||
|
||||
.extmem.bss (NOLOAD) :
|
||||
{
|
||||
_sbss_extmem = ABSOLUTE(.);
|
||||
*(.extmem.bss .extmem.bss.*)
|
||||
. = ALIGN(4);
|
||||
_ebss_extmem = ABSOLUTE(.);
|
||||
} > extmem_seg
|
||||
|
||||
.flash.rodata :
|
||||
{
|
||||
_srodata = ABSOLUTE(.);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||
*(.gnu.linkonce.r.*)
|
||||
*(.rodata1)
|
||||
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
|
||||
*(.xt_except_table)
|
||||
*(.gcc_except_table)
|
||||
*(.gcc_except_table.*)
|
||||
*(.gnu.linkonce.e.*)
|
||||
*(.gnu.version_r)
|
||||
*(.eh_frame)
|
||||
|
||||
. = (. + 3) & ~ 3;
|
||||
|
||||
/* C++ constructor and destructor tables, properly ordered: */
|
||||
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
_einit = ABSOLUTE(.);
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
|
||||
/* C++ exception handlers table: */
|
||||
|
||||
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
|
||||
*(.xt_except_desc)
|
||||
*(.gnu.linkonce.h.*)
|
||||
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
|
||||
*(.xt_except_desc_end)
|
||||
*(.dynamic)
|
||||
*(.gnu.version_d)
|
||||
_erodata = ABSOLUTE(.);
|
||||
/* Literals are also RO data. */
|
||||
_lit4_start = ABSOLUTE(.);
|
||||
*(*.lit4)
|
||||
*(.lit4.*)
|
||||
*(.gnu.linkonce.lit4.*)
|
||||
_lit4_end = ABSOLUTE(.);
|
||||
. = ALIGN(4);
|
||||
} >default_rodata_seg
|
||||
|
||||
.flash.text :
|
||||
{
|
||||
_stext = .;
|
||||
_text_start = ABSOLUTE(.);
|
||||
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
||||
*(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||
*(.fini.literal)
|
||||
*(.fini)
|
||||
*(.gnu.version)
|
||||
_text_end = ABSOLUTE(.);
|
||||
_etext = .;
|
||||
} >default_code_seg
|
||||
|
||||
.rtc.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rtc.literal .rtc.text)
|
||||
} >rtc_iram_seg
|
||||
|
||||
.rtc.data :
|
||||
{
|
||||
*(.rtc.data)
|
||||
*(.rtc.rodata)
|
||||
|
||||
/* Whatever is left from the RTC memory is used as a special heap. */
|
||||
|
||||
. = ALIGN (4);
|
||||
_srtcheap = ABSOLUTE(.);
|
||||
} > rtc_slow_seg
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/scripts/esp32.template.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
* ESP32 Linker Script Memory Layout
|
||||
*
|
||||
* This file describes the memory layout (memory blocks) as virtual
|
||||
* memory addresses.
|
||||
*
|
||||
* esp32.ld contains output sections to link compiler output into these
|
||||
* memory blocks.
|
||||
*
|
||||
* NOTE: That this is not the actual linker script but rather a "template"
|
||||
* for the esp32_out.ld script. This template script is passed through
|
||||
* the C preprocessor to include selected configuration options.
|
||||
*
|
||||
****************************************************************************/
|
||||
/* config.h -- Autogenerated! Do not edit. */
|
||||
/* Used to represent the values of tristate options */
|
||||
/* General Definitions ***********************************/
|
||||
/* Sanity Checks *****************************************/
|
||||
/* If the end of RAM is not specified then it is assumed to be
|
||||
* the beginning of RAM plus the RAM size.
|
||||
*/
|
||||
/* If the end of FLASH is not specified then it is assumed to be
|
||||
* the beginning of FLASH plus the FLASH size.
|
||||
*/
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/scripts/esp32_aliases.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
/* config.h -- Autogenerated! Do not edit. */
|
||||
/* Lower-case aliases for symbols not compliant to nxstyle */
|
||||
/* Bluetooth needs symbol alias, to be removed after IDF rename it */
|
||||
MEMORY
|
||||
{
|
||||
/* Below values assume the flash cache is on, and have the blocks this
|
||||
* uses subtracted from the length of the various regions. The 'data access
|
||||
* port' dram/drom regions map to the same iram/irom regions but are
|
||||
* connected to the data port of the CPU and e.g. allow bytewise access.
|
||||
*/
|
||||
/* IRAM for PRO cpu. Not sure if happy with this, this is MMU area... */
|
||||
iram0_0_seg (RX) : org = 0x40080000, len = 0x20000
|
||||
/* Flash mapped instruction data. */
|
||||
/* The 0x20 offset is a convenience for the app binary image generation.
|
||||
* Flash cache has 64KB pages. The .bin file which is flashed to the chip
|
||||
* has a 0x18 byte file header, and each segment has a 0x08 byte segment
|
||||
* header. Setting this offset makes it simple to meet the flash cache MMU's
|
||||
* constraint that (paddr % 64KB == vaddr % 64KB).
|
||||
*/
|
||||
irom0_0_seg (RX) : org = 0x400d0020, len = 0x330000 - 0x20
|
||||
/* Shared data RAM, excluding memory reserved for ROM bss/data/stack.
|
||||
* Enabling Bluetooth & Trace Memory features in menuconfig will decrease
|
||||
* the amount of RAM available.
|
||||
*
|
||||
* Note: The length of this section should be 0x50000, and this extra
|
||||
* DRAM is available in heap at runtime. However due to static ROM memory
|
||||
* usage at this 176KB mark, the additional static memory temporarily cannot
|
||||
* be used.
|
||||
*/
|
||||
dram0_0_seg (RW) : org = 0x3ffb0000 + 0,
|
||||
len = 0x2c200 - 0 - 0
|
||||
/* Flash mapped constant data */
|
||||
/* The 0x20 offset is a convenience for the app binary image generation.
|
||||
* Flash cache has 64KB pages. The .bin file which is flashed to the chip
|
||||
* has a 0x18 byte file header, and each segment has a 0x08 byte segment
|
||||
* header. Setting this offset makes it simple to meet the flash cache MMU's
|
||||
* constraint that (paddr % 64KB == vaddr % 64KB).
|
||||
*/
|
||||
drom0_0_seg (R) : org = 0x3f400020, len = 0x400000 - 0x20
|
||||
/* RTC fast memory (executable). Persists over deep sleep. */
|
||||
rtc_iram_seg (RWX) : org = 0x400c0000, len = 0x2000
|
||||
/* RTC slow memory (data accessible). Persists over deep sleep.
|
||||
* Start of RTC slow memory is reserved for ULP co-processor code + data,
|
||||
* if enabled.
|
||||
*/
|
||||
rtc_slow_seg (RW) : org = 0x50000000 + 0,
|
||||
len = 0x1000 - 0
|
||||
/* External memory, including data and text */
|
||||
extmem_seg (RWX) : org = 0x3f800000, len = 0x400000
|
||||
}
|
||||
REGION_ALIAS("default_rodata_seg", drom0_0_seg);
|
||||
REGION_ALIAS("default_code_seg", irom0_0_seg);
|
||||
/* Heap ends at top of dram0_0_seg */
|
||||
_eheap = 0x40000000 - 0;
|
||||
/* IRAM heap ends at top of dram0_0_seg */
|
||||
_eiramheap = 0x400a0000;
|
||||
/* Mark the end of the RTC heap (top of the RTC region) */
|
||||
_ertcheap = 0x50001fff;
|
||||
EXTERN(board_get_manifest)
|
||||
@@ -0,0 +1,78 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/scripts/esp32.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Default entry point: */
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* Below values assume the flash cache is on, and have the blocks this
|
||||
* uses subtracted from the length of the various regions. The 'data access
|
||||
* port' dram/drom regions map to the same iram/irom regions but are
|
||||
* connected to the data port of the CPU and e.g. allow bytewise access.
|
||||
*/
|
||||
/* IRAM for PRO cpu. Not sure if happy with this, this is MMU area... */
|
||||
iram0_0_seg (RX) : org = 0x40080000, len = 0x20000
|
||||
/* Flash mapped instruction data. */
|
||||
/* The 0x20 offset is a convenience for the app binary image generation.
|
||||
* Flash cache has 64KB pages. The .bin file which is flashed to the chip
|
||||
* has a 0x18 byte file header, and each segment has a 0x08 byte segment
|
||||
* header. Setting this offset makes it simple to meet the flash cache MMU's
|
||||
* constraint that (paddr % 64KB == vaddr % 64KB).
|
||||
*/
|
||||
irom0_0_seg (RX) : org = 0x400d0020, len = 0x330000 - 0x20
|
||||
/* Shared data RAM, excluding memory reserved for ROM bss/data/stack.
|
||||
* Enabling Bluetooth & Trace Memory features in menuconfig will decrease
|
||||
* the amount of RAM available.
|
||||
*
|
||||
* Note: The length of this section should be 0x50000, and this extra
|
||||
* DRAM is available in heap at runtime. However due to static ROM memory
|
||||
* usage at this 176KB mark, the additional static memory temporarily cannot
|
||||
* be used.
|
||||
*/
|
||||
dram0_0_seg (RW) : org = 0x3ffb0000 + 0,
|
||||
len = 0x2c200 - 0 - 0
|
||||
/* Flash mapped constant data */
|
||||
/* The 0x20 offset is a convenience for the app binary image generation.
|
||||
* Flash cache has 64KB pages. The .bin file which is flashed to the chip
|
||||
* has a 0x18 byte file header, and each segment has a 0x08 byte segment
|
||||
* header. Setting this offset makes it simple to meet the flash cache MMU's
|
||||
* constraint that (paddr % 64KB == vaddr % 64KB).
|
||||
*/
|
||||
drom0_0_seg (R) : org = 0x3f400020, len = 0x400000 - 0x20
|
||||
/* RTC fast memory (executable). Persists over deep sleep. */
|
||||
rtc_iram_seg (RWX) : org = 0x400c0000, len = 0x2000
|
||||
/* RTC slow memory (data accessible). Persists over deep sleep.
|
||||
* Start of RTC slow memory is reserved for ULP co-processor code + data,
|
||||
* if enabled.
|
||||
*/
|
||||
rtc_slow_seg (RW) : org = 0x50000000 + 0,
|
||||
len = 0x1000 - 0
|
||||
/* External memory, including data and text */
|
||||
extmem_seg (RWX) : org = 0x3f800000, len = 0x400000
|
||||
}
|
||||
REGION_ALIAS("default_rodata_seg", drom0_0_seg);
|
||||
REGION_ALIAS("default_code_seg", irom0_0_seg);
|
||||
/* Heap ends at top of dram0_0_seg */
|
||||
_eheap = 0x40000000 - 0;
|
||||
/* IRAM heap ends at top of dram0_0_seg */
|
||||
_eiramheap = 0x400a0000;
|
||||
/* Mark the end of the RTC heap (top of the RTC region) */
|
||||
_ertcheap = 0x50001fff;
|
||||
@@ -0,0 +1,72 @@
|
||||
############################################################################
|
||||
# boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/.config
|
||||
include $(TOPDIR)/tools/Config.mk
|
||||
include $(TOPDIR)/tools/esp32/Config.mk
|
||||
include $(TOPDIR)/arch/xtensa/src/lx6/Toolchain.defs
|
||||
|
||||
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
|
||||
|
||||
# Pick the linker scripts from the board level if they exist, if not
|
||||
# pick the common linker scripts.
|
||||
|
||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||
ARCHSCRIPT += $(call FINDSCRIPT,protected_memory.ld)
|
||||
ARCHSCRIPT += $(call FINDSCRIPT,kernel-space.ld)
|
||||
else
|
||||
ARCHSCRIPT += $(call FINDSCRIPT,flat_memory.ld)
|
||||
|
||||
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
|
||||
ARCHSCRIPT += $(call FINDSCRIPT,mcuboot_sections.ld)
|
||||
else
|
||||
ARCHSCRIPT += $(call FINDSCRIPT,legacy_sections.ld)
|
||||
endif
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
||||
# if SPIRAM/PSRAM is used then we need to include a workaround
|
||||
|
||||
ifeq ($(CONFIG_ESP32_SPIRAM),y)
|
||||
ARCHCFLAGS += -mfix-esp32-psram-cache-issue
|
||||
endif
|
||||
|
||||
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
CMODULEFLAGS = $(CFLAGS) -mtext-section-literals
|
||||
|
||||
LDMODULEFLAGS = -r -e module_initialize
|
||||
LDMODULEFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/modlib/gnu-elf.ld)
|
||||
|
||||
# ELF module definitions
|
||||
|
||||
CELFFLAGS = $(CFLAGS) -mtext-section-literals
|
||||
CXXELFFLAGS = $(CXXFLAGS) -mtext-section-literals
|
||||
|
||||
LDELFFLAGS = -r -e main
|
||||
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)binfmt$(DELIM)libelf$(DELIM)gnu-elf.ld)
|
||||
@@ -0,0 +1,54 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_library(drivers_board
|
||||
i2c.cpp
|
||||
init.c
|
||||
led.c
|
||||
spi.cpp
|
||||
timer_config.cpp
|
||||
# usb.c
|
||||
esp32_board_spiflash.c
|
||||
esp32_board_wlan_setup.c
|
||||
mtd.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
arch_io_pins
|
||||
arch_spi
|
||||
drivers__led # drv_led_start
|
||||
nuttx_arch # sdio
|
||||
nuttx_drivers # sdio
|
||||
px4_layer
|
||||
)
|
||||
@@ -0,0 +1,120 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file board_config.h
|
||||
*
|
||||
* board internal definitions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/****************************************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* LEDs */
|
||||
#define GPIO_LED_BLUE 4 | GPIO_OUTPUT
|
||||
|
||||
/* GPIOs available*/
|
||||
#define GPIO_1 4 | GPIO_OUTPUT
|
||||
#define GPIO_2 4 | GPIO_OUTPUT
|
||||
#define GPIO_3 4 | GPIO_OUTPUT
|
||||
#define GPIO_4 4 | GPIO_OUTPUT
|
||||
|
||||
#define PX4_NUMBER_I2C_BUSES 2
|
||||
|
||||
#define BOARD_SPI_BUS_MAX_BUS_ITEMS 2
|
||||
|
||||
/*
|
||||
* ADC channels
|
||||
*
|
||||
* These are the channel numbers of the ADCs of the microcontroller that can be used by the Px4 Firmware in the adc driver
|
||||
*/
|
||||
#define ADC_CHANNELS (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) // Change this later based on the adc channels actually used
|
||||
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL 1 // Corresponding GPIO 27. Used in init.c for disabling GPIO_IE
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL 2 // Corresponding GPIO 28. Used in init.c for disabling GPIO_IE
|
||||
#define ADC_RC_RSSI_CHANNEL 0
|
||||
|
||||
/* High-resolution timer */
|
||||
/*
|
||||
* For wifi to work, it needs to use its own timer.
|
||||
* Make sure you are not using the timer for hrt
|
||||
* that is being using for the wifi
|
||||
*/
|
||||
#define HRT_TIMER 2
|
||||
|
||||
/* This board provides a DMA pool and APIs */ // Needs to be figured out
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 2048
|
||||
|
||||
#define BOARD_ENABLE_CONSOLE_BUFFER
|
||||
#define BOARD_CONSOLE_BUFFER_SIZE (1024*3)
|
||||
|
||||
/* PWM
|
||||
*/
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 4
|
||||
|
||||
// Has pwm outputs
|
||||
#define BOARD_HAS_PWM DIRECT_PWM_OUTPUT_CHANNELS
|
||||
|
||||
// #define BOARD_ADC_USB_CONNECTED (px4_arch_gpioread(GPIO_USB_VBUS_VALID));
|
||||
int esp32_spiflash_init(void);
|
||||
int esp32_partition_init(void);
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: rp2040_usbinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure USB IO.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
extern void esp32_spiinitialize(void);
|
||||
|
||||
extern void board_peripheral_reset(int ms);
|
||||
|
||||
#include <px4_platform_common/board_common.h>
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
__END_DECLS
|
||||
@@ -0,0 +1,574 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/src/esp32_board_spiflash.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_NXFFS
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
#endif
|
||||
#ifdef CONFIG_BCH
|
||||
#include <nuttx/drivers/drivers.h>
|
||||
#endif
|
||||
|
||||
#include "esp32_spiflash.h"
|
||||
#include "esp32_board_spiflash_setup.h"
|
||||
|
||||
// #define CONFIG_ESP32_SPIFLASH_SPIFFS
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define ARRAYSIZE(x) (sizeof((x)) / sizeof((x)[0]))
|
||||
|
||||
#ifdef CONFIG_ESP32_OTA_PARTITION_ENCRYPT
|
||||
# define OTA_ENCRYPT true
|
||||
#else
|
||||
# define OTA_ENCRYPT false
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_MTD_ENCRYPT
|
||||
# define WIFI_ENCRYPT true
|
||||
#else
|
||||
# define WIFI_ENCRYPT false
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_STORAGE_MTD_ENCRYPT
|
||||
# define STORAGE_ENCRYPT true
|
||||
#else
|
||||
# define STORAGE_ENCRYPT false
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_HAVE_OTA_PARTITION
|
||||
struct ota_partition_s {
|
||||
uint32_t offset; /* Partition offset from the beginning of MTD */
|
||||
uint32_t size; /* Partition size in bytes */
|
||||
const char *devpath; /* Partition device path */
|
||||
};
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_HAVE_OTA_PARTITION
|
||||
static int init_ota_partitions(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_HAVE_OTA_PARTITION
|
||||
static const struct ota_partition_s g_ota_partition_table[] = {
|
||||
{
|
||||
.offset = CONFIG_ESP32_OTA_PRIMARY_SLOT_OFFSET,
|
||||
.size = CONFIG_ESP32_OTA_SLOT_SIZE,
|
||||
.devpath = CONFIG_ESP32_OTA_PRIMARY_SLOT_DEVPATH
|
||||
},
|
||||
{
|
||||
.offset = CONFIG_ESP32_OTA_SECONDARY_SLOT_OFFSET,
|
||||
.size = CONFIG_ESP32_OTA_SLOT_SIZE,
|
||||
.devpath = CONFIG_ESP32_OTA_SECONDARY_SLOT_DEVPATH
|
||||
},
|
||||
{
|
||||
.offset = CONFIG_ESP32_OTA_SCRATCH_OFFSET,
|
||||
.size = CONFIG_ESP32_OTA_SCRATCH_SIZE,
|
||||
.devpath = CONFIG_ESP32_OTA_SCRATCH_DEVPATH
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_HAVE_OTA_PARTITION
|
||||
static int init_ota_partitions(void)
|
||||
{
|
||||
struct mtd_dev_s *mtd;
|
||||
#ifdef CONFIG_BCH
|
||||
char blockdev[18];
|
||||
#endif
|
||||
int ret = OK;
|
||||
|
||||
for (int i = 0; i < ARRAYSIZE(g_ota_partition_table); ++i) {
|
||||
const struct ota_partition_s *part = &g_ota_partition_table[i];
|
||||
mtd = esp32_spiflash_alloc_mtdpart(part->offset, part->size,
|
||||
OTA_ENCRYPT);
|
||||
|
||||
ret = ftl_initialize(i, mtd);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BCH
|
||||
snprintf(blockdev, sizeof(blockdev), "/dev/mtdblock%d", i);
|
||||
|
||||
ret = bchdev_register(blockdev, part->devpath, false);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: bchdev_register %s failed: %d\n", part->devpath, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_smartfs
|
||||
*
|
||||
* Description:
|
||||
* Provide a block driver wrapper around MTD partition and mount a
|
||||
* SMART FS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* smartn - Number used to register the mtd partition: /dev/smartx, where
|
||||
* x = smartn.
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
||||
static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
||||
const char *mnt_pt)
|
||||
{
|
||||
int ret = OK;
|
||||
char path[22];
|
||||
|
||||
ret = smart_initialize(smartn, mtd, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
finfo("smart_initialize failed, Trying to erase first...\n");
|
||||
ret = mtd->ioctl(mtd, MTDIOC_BULKERASE, 0);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: ioctl(BULKERASE) failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
finfo("Erase successful, initializing it again.\n");
|
||||
ret = smart_initialize(smartn, mtd, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: smart_initialize failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (mnt_pt != NULL) {
|
||||
snprintf(path, sizeof(path), "/dev/smart%d", smartn);
|
||||
|
||||
ret = nx_mount(path, mnt_pt, "smartfs", 0, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_littlefs
|
||||
*
|
||||
* Description:
|
||||
* Register a mtd driver and mount a Little FS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* path - Path name used to register the mtd driver.
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
* priv - Privileges
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_LITTLEFS
|
||||
static int setup_littlefs(const char *path, struct mtd_dev_s *mtd,
|
||||
const char *mnt_pt, int priv)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = register_mtddriver(path, mtd, priv, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (mnt_pt != NULL) {
|
||||
ret = nx_mount(path, mnt_pt, "littlefs", 0, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ret = nx_mount(path, mnt_pt, "littlefs", 0, "forceformat");
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_spiffs
|
||||
*
|
||||
* Description:
|
||||
* Register a mtd driver and mount a SPIFFS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* path - Path name used to register the mtd driver.
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
* priv - Privileges
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_SPIFFS
|
||||
static int setup_spiffs(const char *path, struct mtd_dev_s *mtd,
|
||||
const char *mnt_pt, int priv)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = register_mtddriver(path, mtd, priv, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (mnt_pt != NULL) {
|
||||
ret = nx_mount(path, mnt_pt, "spiffs", 0, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_nxffs
|
||||
*
|
||||
* Description:
|
||||
* Register a mtd driver and mount a SPIFFS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_NXFFS
|
||||
static int setup_nxffs(struct mtd_dev_s *mtd, const char *mnt_pt)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = nxffs_initialize(mtd);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: NXFFS init failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (mnt_pt != NULL) {
|
||||
ret = nx_mount(NULL, mnt_pt, "nxffs", 0, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: init_wifi_partition
|
||||
*
|
||||
* Description:
|
||||
* Initialize partition that is dedicated to Wi-Fi.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_SAVE_PARAM
|
||||
static int init_wifi_partition(void)
|
||||
{
|
||||
int ret = OK;
|
||||
struct mtd_dev_s *mtd;
|
||||
|
||||
mtd = esp32_spiflash_alloc_mtdpart(CONFIG_ESP32_WIFI_MTD_OFFSET,
|
||||
CONFIG_ESP32_WIFI_MTD_SIZE,
|
||||
WIFI_ENCRYPT);
|
||||
|
||||
if (!mtd) {
|
||||
ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
||||
|
||||
ret = setup_smartfs(1, mtd, CONFIG_ESP32_WIFI_FS_MOUNTPT);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup smartfs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_ESP32_SPIFLASH_LITTLEFS)
|
||||
|
||||
const char *path = "/dev/mtdblock1";
|
||||
ret = setup_littlefs(path, mtd, CONFIG_ESP32_WIFI_FS_MOUNTPT, 0777);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup littlefs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_ESP32_SPIFLASH_SPIFFS)
|
||||
|
||||
const char *path = "/dev/mtdblock1";
|
||||
ret = setup_spiffs(path, mtd, CONFIG_ESP32_WIFI_FS_MOUNTPT, 0777);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup spiffs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
ferr("ERROR: No supported FS selected. Wi-Fi partition "
|
||||
"should be mounted before Wi-Fi initialization\n");
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: init_storage_partition
|
||||
*
|
||||
* Description:
|
||||
* Initialize partition that is dedicated to general use.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int init_storage_partition(void)
|
||||
{
|
||||
int ret = OK;
|
||||
struct mtd_dev_s *mtd;
|
||||
|
||||
mtd = esp32_spiflash_alloc_mtdpart(CONFIG_ESP32_STORAGE_MTD_OFFSET,
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE,
|
||||
STORAGE_ENCRYPT);
|
||||
|
||||
if (!mtd) {
|
||||
ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
||||
|
||||
ret = setup_smartfs(0, mtd, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup smartfs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_ESP32_SPIFLASH_NXFFS)
|
||||
|
||||
ret = setup_nxffs(mtd, "/mnt");
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup nxffs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_ESP32_SPIFLASH_LITTLEFS)
|
||||
|
||||
const char *path = "/dev/esp32flash";
|
||||
ret = setup_littlefs(path, mtd, NULL, 0755);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup littlefs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_ESP32_SPIFLASH_SPIFFS)
|
||||
const char *path = "/dev/esp32flash";
|
||||
ret = setup_spiffs(path, mtd, NULL, 0755);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to setup spiffs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
ret = register_mtddriver("/dev/esp32flash", mtd, 0755, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define CONFIG_ESP32_PARAM_MTD_OFFSET 0x330000
|
||||
#define CONFIG_ESP32_PARAM_MTD_SIZE 0x10000
|
||||
|
||||
static int init_param_partition(void)
|
||||
{
|
||||
int ret = OK;
|
||||
struct mtd_dev_s *mtd;
|
||||
|
||||
mtd = esp32_spiflash_alloc_mtdpart(CONFIG_ESP32_PARAM_MTD_OFFSET,
|
||||
CONFIG_ESP32_PARAM_MTD_SIZE,
|
||||
STORAGE_ENCRYPT);
|
||||
|
||||
if (!mtd) {
|
||||
ferr("ERROR: Failed to alloc PARAM MTD partition of SPI Flash\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = register_mtddriver("/fs/mtd_params", mtd, 0755, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to register PARAM MTD: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_spiflash_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize the SPI Flash and register the MTD.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. A negated errno value is returned
|
||||
* on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp32_spiflash_init(void)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
#ifdef CONFIG_ESP32_HAVE_OTA_PARTITION
|
||||
ret = init_ota_partitions();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_SAVE_PARAM
|
||||
ret = init_wifi_partition();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ret = init_storage_partition();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = init_param_partition();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/src/esp32_board_spiflash.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_NXFFS
|
||||
#include <nuttx/fs/nxffs.h>
|
||||
#endif
|
||||
#ifdef CONFIG_BCH
|
||||
#include <nuttx/drivers/drivers.h>
|
||||
#endif
|
||||
|
||||
#include <px4_platform_common/log.h>
|
||||
#define MODULE_NAME "spiflash"
|
||||
|
||||
#include "esp32_spiflash.h"
|
||||
#include "esp32_partition.h"
|
||||
// #include "esp32_board_spiflash_setup.h"
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define ARRAYSIZE(x) (sizeof((x)) / sizeof((x)[0]))
|
||||
|
||||
#ifdef CONFIG_ESP32_OTA_PARTITION_ENCRYPT
|
||||
# define OTA_ENCRYPT true
|
||||
#else
|
||||
# define OTA_ENCRYPT false
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_MTD_ENCRYPT
|
||||
# define WIFI_ENCRYPT true
|
||||
#else
|
||||
# define WIFI_ENCRYPT false
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_STORAGE_MTD_ENCRYPT
|
||||
# define STORAGE_ENCRYPT true
|
||||
#else
|
||||
# define STORAGE_ENCRYPT false
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
int esp32_spiflash_init(void);
|
||||
int esp32_partition_init(void);
|
||||
|
||||
static int init_ota_partitions(void)
|
||||
{
|
||||
struct mtd_dev_s *mtd;
|
||||
char blockdev[18];
|
||||
int ret = OK;
|
||||
|
||||
mtd = esp32_spiflash_alloc_mtdpart(CONFIG_ESP32_STORAGE_MTD_OFFSET, CONFIG_ESP32_STORAGE_MTD_SIZE, false);
|
||||
|
||||
ret = ftl_initialize(0, mtd);
|
||||
|
||||
if (ret < 0) {
|
||||
PX4_INFO("ERROR: Failed to initialize the FTL layer: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
snprintf(blockdev, sizeof(blockdev), "/dev/mtdblock%d", 0);
|
||||
|
||||
ret = bchdev_register(blockdev, "/fs/mtd_params", false);
|
||||
|
||||
if (ret < 0) {
|
||||
PX4_INFO("ERROR: bchdev_register %s failed: %d\n", "/fs/mtd_params", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_smartfs
|
||||
*
|
||||
* Description:
|
||||
* Provide a block driver wrapper around MTD partition and mount a
|
||||
* SMART FS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* smartn - Number used to register the mtd partition: /dev/smartx, where
|
||||
* x = smartn.
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_littlefs
|
||||
*
|
||||
* Description:
|
||||
* Register a mtd driver and mount a Little FS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* path - Path name used to register the mtd driver.
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
* priv - Privileges
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int setup_littlefs(const char *path, struct mtd_dev_s *mtd,
|
||||
const char *mnt_pt, int priv)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = register_mtddriver(path, mtd, priv, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
PX4_INFO("ERROR: Failed to register MTD: %d\n", ret);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
// if (mnt_pt != NULL)
|
||||
// {
|
||||
// ret = nx_mount(path, "/mnt/lfs", "littlefs", 0, "");
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// ret = nx_mount(path, "/fs/lfs", "littlefs", 0, "forceformat");
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// PX4_INFO("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
// return ret;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_spiffs
|
||||
*
|
||||
* Description:
|
||||
* Register a mtd driver and mount a SPIFFS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* path - Path name used to register the mtd driver.
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
* priv - Privileges
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int setup_spiffs(const char *path, struct mtd_dev_s *mtd,
|
||||
const char *mnt_pt, int priv)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = register_mtddriver(path, mtd, priv, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (mnt_pt != NULL) {
|
||||
ret = nx_mount(path, mnt_pt, "spiffs", 0, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: setup_nxffs
|
||||
*
|
||||
* Description:
|
||||
* Register a mtd driver and mount a SPIFFS over it.
|
||||
*
|
||||
* Parameters:
|
||||
* mtd - Pointer to a pre-allocated mtd partition.
|
||||
* mnt_pt - Mount point
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIFLASH_NXFFS
|
||||
static int setup_nxffs(struct mtd_dev_s *mtd, const char *mnt_pt)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = nxffs_initialize(mtd);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: NXFFS init failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (mnt_pt != NULL) {
|
||||
ret = nx_mount(NULL, mnt_pt, "nxffs", 0, NULL);
|
||||
|
||||
if (ret < 0) {
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: init_storage_partition
|
||||
*
|
||||
* Description:
|
||||
* Initialize partition that is dedicated to general use.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int init_storage_partition(void)
|
||||
{
|
||||
int ret = OK;
|
||||
struct mtd_dev_s *mtd;
|
||||
|
||||
|
||||
mtd = esp32_spiflash_alloc_mtdpart(CONFIG_ESP32_STORAGE_MTD_OFFSET,
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE,
|
||||
STORAGE_ENCRYPT);
|
||||
|
||||
if (!mtd) {
|
||||
PX4_INFO("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
const char *path = "/dev/esp32flash";
|
||||
ret = setup_littlefs(path, mtd, "/mnt/esp32", 0755);
|
||||
|
||||
if (ret < 0) {
|
||||
PX4_INFO("ERROR: Failed to setup littlefs\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
// const char *path = "/dev/esp32flash";
|
||||
// ret = setup_spiffs(path, mtd, "/mnt/spiffs/", 0755);
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// ferr("ERROR: Failed to setup spiffs\n");
|
||||
// return ret;
|
||||
// }
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_spiflash_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize the SPI Flash and register the MTD.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. A negated errno value is returned
|
||||
* on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp32_spiflash_init(void)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
ret = init_ota_partitions();
|
||||
PX4_INFO("ret = %d = init_ota_paritions()\n", ret);
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// ret = esp32_partition_init();
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// syslog(LOG_ERR, "ERROR: Failed to initialize partition error=%d\n",
|
||||
// ret);
|
||||
// }
|
||||
//
|
||||
// ret = init_storage_partition();
|
||||
// PX4_INFO("ret = %d = init_storage_paritions()\n", ret);
|
||||
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// return ret;
|
||||
// }
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/include/esp32_board_spiflash.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_XTENSA_ESP32_COMMON_INCLUDE_ESP32_BOARD_SPIFLASH_H
|
||||
#define __BOARDS_XTENSA_ESP32_COMMON_INCLUDE_ESP32_BOARD_SPIFLASH_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_spiflash_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize the SPI Flash and register the MTD.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. A negated errno value is returned
|
||||
* on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp32_spiflash_init(void);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_XTENSA_ESP32_COMMON_INCLUDE_ESP32_BOARD_SPIFLASH_H */
|
||||
@@ -0,0 +1,91 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/src/esp32_board_wlan.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <syslog.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/wireless/wireless.h>
|
||||
|
||||
#include "esp32_spiflash.h"
|
||||
#include "esp32_wlan.h"
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_wlan_init
|
||||
*
|
||||
* Description:
|
||||
* Configure the wireless subsystem.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; A negated errno value is returned
|
||||
* to indicate the nature of any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_wlan_init(void)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
// ret = esp32_wlan_sta_initialize();
|
||||
// if (ret)
|
||||
// {
|
||||
// printf("ERROR: Failed to initialize Wi-Fi station\n");
|
||||
// return ret;
|
||||
// }
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
ret = esp32_wlan_softap_initialize();
|
||||
|
||||
if (ret) {
|
||||
wlerr("ERROR: Failed to initialize Wi-Fi softAP\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// netlib_ifup("wlan1");
|
||||
// dhcpd_start("wlan1");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
* boards/xtensa/esp32/common/include/esp32_board_wlan.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_XTENSA_ESP32_COMMON_INCLUDE_ESP32_BOARD_WLAN_H
|
||||
#define __BOARDS_XTENSA_ESP32_COMMON_INCLUDE_ESP32_BOARD_WLAN_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_WIRELESS
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_wlan_init
|
||||
*
|
||||
* Description:
|
||||
* Configure the wireless subsystem.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; A negated errno value is returned
|
||||
* to indicate the nature of any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_wlan_init(void);
|
||||
|
||||
#endif /* CONFIG_ESP32_WIRELESS */
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_XTENSA_ESP32_COMMON_INCLUDE_ESP32_BOARD_WLAN_H */
|
||||
@@ -0,0 +1,38 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/i2c_hw_description.h>
|
||||
|
||||
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
initI2CBusInternal(1),
|
||||
};
|
||||
@@ -0,0 +1,300 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file init.c
|
||||
*
|
||||
* board specific early startup code. This file implements the
|
||||
* board_app_initialize() function that is called early by nsh during startup.
|
||||
*
|
||||
* Code here is run before the rcS script is invoked; it should start required
|
||||
* subsystems and perform board-specific initialization.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/tasks.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/analog/adc.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <nuttx/mm/gran.h>
|
||||
|
||||
|
||||
#include <chip.h>
|
||||
#include "board_config.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
#include <px4_platform_common/px4_manifest.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
|
||||
#include <px4_arch/io_timer.h>
|
||||
#include <px4_platform_common/init.h>
|
||||
#include <px4_platform/board_dma_alloc.h>
|
||||
|
||||
#define LEDC_LS_SIG_OUT0_IDX 79
|
||||
|
||||
#include "esp32_board_wlan_setup.h"
|
||||
#ifdef CONFIG_ESP32_SPIFLASH
|
||||
#include "esp32_board_spiflash_setup.h"
|
||||
#endif
|
||||
|
||||
#include "esp32_rt_timer.h"
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* Ideally we'd be able to get these from arm_internal.h,
|
||||
* but since we want to be able to disable the NuttX use
|
||||
* of leds for system indication at will and there is no
|
||||
* separate switch, we need to build independent of the
|
||||
* CONFIG_ARCH_LEDS configuration switch.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
__END_DECLS
|
||||
|
||||
/****************************************************************************
|
||||
* Protected Functions
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
/************************************************************************************
|
||||
* Name: board_peripheral_reset
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
************************************************************************************/
|
||||
__EXPORT void board_peripheral_reset(int ms)
|
||||
{
|
||||
UNUSED(ms);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_on_reset
|
||||
*
|
||||
* Description:
|
||||
* Optionally provided function called on entry to board_system_reset
|
||||
* It should perform any house keeping prior to the rest.
|
||||
*
|
||||
* status - 1 if resetting to boot loader
|
||||
* 0 if just resetting
|
||||
*
|
||||
************************************************************************************/
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
// Configure the GPIO pins to outputs and keep them low.
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(io_timer_channel_get_gpio_output(i));
|
||||
esp32_gpio_matrix_out(timer_io_channels[i].gpio_out, LEDC_LS_SIG_OUT0_IDX + timer_io_channels[i].timer_channel, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* On resets invoked from system (not boot) insure we establish a low
|
||||
* output state (discharge the pins) on PWM pins before they become inputs.
|
||||
*/
|
||||
|
||||
if (status >= 0) {
|
||||
up_mdelay(400);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_read_VBUS_state
|
||||
*
|
||||
* Description:
|
||||
* All boards must provide a way to read the state of VBUS, this my be simple
|
||||
* digital input on a GPIO. Or something more complicated like a Analong input
|
||||
* or reading a bit from a USB controller register.
|
||||
*
|
||||
* Returns - 0 if connected.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int board_read_VBUS_state(void)
|
||||
{
|
||||
// return BOARD_ADC_USB_CONNECTED ? 0 : 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: esp32_board_initialize
|
||||
*
|
||||
* Description:
|
||||
* All architectures must provide the following entry point. This entry point
|
||||
* is called early in the initialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void
|
||||
esp32_board_initialize(void)
|
||||
{
|
||||
// /* Reset all PWM to Low outputs */
|
||||
board_on_reset(-1);
|
||||
|
||||
// /* configure LEDs */
|
||||
board_autoled_initialize();
|
||||
up_mdelay(2);
|
||||
esp32_spiinitialize();
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initalization logic and the the
|
||||
* matching application logic. The value cold be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_SPI2
|
||||
static struct spi_dev_s *spi2;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_SPI3
|
||||
static struct spi_dev_s *spi3;
|
||||
#endif
|
||||
|
||||
|
||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
px4_platform_init();
|
||||
|
||||
/* configure the DMA allocator */ // Needs to be figured out
|
||||
|
||||
if (board_dma_alloc_init() < 0) {
|
||||
syslog(LOG_ERR, "DMA alloc FAILED\n");
|
||||
}
|
||||
|
||||
|
||||
/* initial LED state */
|
||||
drv_led_start();
|
||||
|
||||
#ifdef CONFIG_ESP32_SPI2
|
||||
spi2 = esp32_spibus_initialize(2);
|
||||
|
||||
if (!spi2) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 2\n");
|
||||
// led_on(LED_RED);
|
||||
}
|
||||
|
||||
// Default SPI1 to 10MHz
|
||||
SPI_SETFREQUENCY(spi2, 10000000);
|
||||
SPI_SETBITS(spi2, 8);
|
||||
SPI_SETMODE(spi2, SPIDEV_MODE3);
|
||||
up_udelay(20);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_SPI3
|
||||
spi3 = esp32_spibus_initialize(3);
|
||||
|
||||
if (!spi3) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 3\n");
|
||||
// led_on(LED_RED);
|
||||
}
|
||||
|
||||
/* Now bind the SPI interface to the MMCSD driver */
|
||||
int result = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi3);
|
||||
|
||||
if (result != OK) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to bind SPI port 3 to the MMCSD driver\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
int ret = esp32_spiflash_init();
|
||||
|
||||
if (ret) {
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize SPI Flash\n");
|
||||
}
|
||||
|
||||
esp32_rt_timer_init();
|
||||
|
||||
led_on(GPIO_LED_BLUE);
|
||||
up_mdelay(100);
|
||||
led_off(GPIO_LED_BLUE);
|
||||
up_mdelay(100);
|
||||
led_on(GPIO_LED_BLUE);
|
||||
up_mdelay(100);
|
||||
led_off(GPIO_LED_BLUE);
|
||||
|
||||
|
||||
|
||||
/* Configure the HW based on the manifest */
|
||||
px4_platform_configure();
|
||||
|
||||
up_mdelay(1000);
|
||||
|
||||
board_wlan_init();
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file led.c
|
||||
*
|
||||
* PX4FMU LED backend.
|
||||
*/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/*
|
||||
* Ideally we'd be able to get these from arm_internal.h,
|
||||
* but since we want to be able to disable the NuttX use
|
||||
* of leds for system indication at will and there is no
|
||||
* separate switch, we need to build independent of the
|
||||
* CONFIG_ARCH_LEDS configuration switch.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
extern void led_toggle(int led);
|
||||
__END_DECLS
|
||||
|
||||
|
||||
|
||||
static uint32_t g_ledmap[] = {
|
||||
GPIO_LED_BLUE, // Indexed by LED_BLUE
|
||||
};
|
||||
|
||||
__EXPORT void led_init(void)
|
||||
{
|
||||
/* Configure LED GPIOs for output */
|
||||
for (size_t l = 0; l < (sizeof(g_ledmap) / sizeof(g_ledmap[0])); l++) {
|
||||
px4_arch_configgpio(g_ledmap[l]);
|
||||
}
|
||||
}
|
||||
|
||||
static void phy_set_led(int led, bool state)
|
||||
{
|
||||
/* Pull Down to switch on */
|
||||
px4_arch_gpiowrite(g_ledmap[led], !state);
|
||||
}
|
||||
|
||||
static bool phy_get_led(int led)
|
||||
{
|
||||
|
||||
return !px4_arch_gpioread(g_ledmap[led]);
|
||||
}
|
||||
|
||||
__EXPORT void led_on(int led)
|
||||
{
|
||||
phy_set_led(led, true);
|
||||
}
|
||||
|
||||
__EXPORT void led_off(int led)
|
||||
{
|
||||
phy_set_led(led, false);
|
||||
}
|
||||
|
||||
__EXPORT void led_toggle(int led)
|
||||
{
|
||||
|
||||
phy_set_led(led, !phy_get_led(led));
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2020 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include <nuttx/config.h>
|
||||
#include <board_config.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <px4_platform_common/px4_manifest.h>
|
||||
// KiB BS nB
|
||||
static const px4_mft_device_t flash = { // 24AA64FT on Base 8K 32 X 256
|
||||
.bus_type = px4_mft_device_t::ONCHIP
|
||||
};
|
||||
|
||||
|
||||
static const px4_mtd_entry_t fmu_flash = {
|
||||
.device = &flash,
|
||||
.npart = 1,
|
||||
.partd = {
|
||||
{
|
||||
.type = MTD_PARAMETERS,
|
||||
.path = "/fs/mtd_params",
|
||||
.nblocks = 1
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static const px4_mtd_manifest_t board_mtd_config = {
|
||||
.nconfigs = 1,
|
||||
.entries = {
|
||||
&fmu_flash,
|
||||
}
|
||||
};
|
||||
|
||||
static const px4_mft_entry_s mtd_mft = {
|
||||
.type = MTD,
|
||||
.pmft = (void *) &board_mtd_config,
|
||||
};
|
||||
|
||||
static const px4_mft_s mft = {
|
||||
.nmft = 1,
|
||||
.mfts = {&mtd_mft}
|
||||
};
|
||||
|
||||
const px4_mft_s *board_get_manifest(void)
|
||||
{
|
||||
return &mft;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2020 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include <px4_arch/spi_hw_description.h>
|
||||
#include <drivers/drv_sensor.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
const constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
#ifdef CONFIG_ESP32_SPI2
|
||||
initSPIBus(SPI::Bus::SPI2, {
|
||||
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::Pin(CONFIG_ESP32_SPI2_CSPIN)}),
|
||||
|
||||
}),
|
||||
#endif
|
||||
#ifdef CONFIG_ESP32_SPI3
|
||||
initSPIBus(SPI::Bus::SPI3, {
|
||||
initSPIDevice(SPIDEV_MMCSD(0), SPI::CS{GPIO::Pin(CONFIG_ESP32_SPI3_CSPIN)})
|
||||
|
||||
}),
|
||||
#endif
|
||||
};
|
||||
|
||||
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
|
||||
@@ -0,0 +1,48 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/io_timer_hw_description.h>
|
||||
|
||||
constexpr io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
initIOTimer(Timer::Timer0), // this refers to LEDC periherals
|
||||
};
|
||||
|
||||
constexpr timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
initIOTimerChannel(io_timers, {Timer::Timer0, Timer::Channel0}, {GPIO::Pin(CONFIG_ESP32_LEDC_CHANNEL0_PIN)}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer0, Timer::Channel1}, {GPIO::Pin(CONFIG_ESP32_LEDC_CHANNEL1_PIN)}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer0, Timer::Channel2}, {GPIO::Pin(CONFIG_ESP32_LEDC_CHANNEL2_PIN)}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer0, Timer::Channel3}, {GPIO::Pin(CONFIG_ESP32_LEDC_CHANNEL3_PIN)}),
|
||||
};
|
||||
|
||||
// constexpr io_timers_channel_mapping_t io_timers_channel_mapping = initIOTimerChannelMapping(io_timers,
|
||||
// timer_io_channels);
|
||||
@@ -0,0 +1,84 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file usb.c
|
||||
*
|
||||
* Board-specific USB functions.
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
|
||||
#include <xtensa.h>
|
||||
#include "board_config.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Name: rp2040_usbinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to setup USB-related GPIO pins for the omnibusf4sd board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void esp32_usbinitialize(void)
|
||||
{
|
||||
// px4_arch_configgpio(GPIO_USB_VBUS_VALID);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbsuspend
|
||||
*
|
||||
* Description:
|
||||
* Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is
|
||||
* used. This function is called whenever the USB enters or leaves suspend mode.
|
||||
* This is an opportunity for the board logic to shutdown clocks, power, etc.
|
||||
* while the USB is suspended.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void esp32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
@@ -38,5 +38,5 @@ param set-default SYS_DM_BACKEND 1
|
||||
# Ignore that there is no SD card
|
||||
param set-default COM_ARM_SDCARD 0
|
||||
|
||||
# Don't try to log onto SD card
|
||||
param set-default SDLOG_MODE -1
|
||||
# Disable logging
|
||||
param set-default SDLOG_BACKEND 0
|
||||
|
||||
@@ -38,5 +38,5 @@ param set-default SYS_DM_BACKEND 1
|
||||
# Ignore that there is no SD card
|
||||
param set-default COM_ARM_SDCARD 0
|
||||
|
||||
# Don't try to log onto SD card
|
||||
param set-default SDLOG_MODE -1
|
||||
# Disable logging
|
||||
param set-default SDLOG_BACKEND 0
|
||||
|
||||
@@ -14,6 +14,7 @@ CONFIG_MODULES_EKF2=y
|
||||
CONFIG_MODULES_MAVLINK=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_ZENOH=y
|
||||
CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_MFT=y
|
||||
|
||||
@@ -182,6 +182,7 @@ CONFIG_NET_SOLINGER=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCPBACKLOG=y
|
||||
CONFIG_NET_TCP_DELAYED_ACK=y
|
||||
CONFIG_NET_TCP_KEEPALIVE=y
|
||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_TIMESTAMP=y
|
||||
CONFIG_NET_UDP=y
|
||||
@@ -207,6 +208,7 @@ CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAM_SIZE=272000
|
||||
CONFIG_RAM_START=0x20400000
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
# CONFIG_BOARD_ROMFSROOT is not set
|
||||
CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS1"
|
||||
CONFIG_BOARD_SERIAL_GPS2="/dev/ttyS4"
|
||||
CONFIG_BOARD_SERIAL_RC="/dev/ttyS5"
|
||||
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS2"
|
||||
CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS3"
|
||||
CONFIG_BOARD_UAVCAN_INTERFACES=1
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_IRLOCK=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
|
||||
CONFIG_DRIVERS_RC_INPUT=y
|
||||
CONFIG_DRIVERS_SAFETY_BUTTON=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_EXAMPLES_FAKE_GPS=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
|
||||
CONFIG_MODULES_BATTERY_STATUS=y
|
||||
CONFIG_MODULES_CAMERA_FEEDBACK=y
|
||||
CONFIG_MODULES_COMMANDER=y
|
||||
CONFIG_MODULES_ESC_BATTERY=y
|
||||
CONFIG_MODULES_EVENTS=y
|
||||
CONFIG_MODULES_FW_ATT_CONTROL=y
|
||||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_FW_MODE_MANAGER=y
|
||||
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
|
||||
CONFIG_MODULES_FW_RATE_CONTROL=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_GYRO_FFT=y
|
||||
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
|
||||
CONFIG_MODULES_LAND_DETECTOR=y
|
||||
CONFIG_MODULES_LOAD_MON=y
|
||||
CONFIG_MODULES_LOCAL_POSITION_ESTIMATOR=y
|
||||
CONFIG_MODULES_LOGGER=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_MANUAL_CONTROL=y
|
||||
CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
CONFIG_MODULES_ZENOH=y
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_DMESG=y
|
||||
CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_REFLECT=y
|
||||
CONFIG_SYSTEMCMDS_SERIAL_TEST=y
|
||||
CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
|
||||
@@ -75,6 +75,7 @@ CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_UXRCE_DDS_CLIENT=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
CONFIG_MODULES_ZENOH=y
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_BSONDUMP=y
|
||||
CONFIG_SYSTEMCMDS_DMESG=y
|
||||
|
||||
@@ -49,6 +49,7 @@ CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEBUG_TCBINFO=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_DEV_URANDOM=y
|
||||
CONFIG_ETH0_PHY_DP83825I=y
|
||||
CONFIG_FAT_DMAMEMORY=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
@@ -155,8 +156,8 @@ CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETINIT_DHCPC=y
|
||||
CONFIG_NETINIT_DNS=y
|
||||
CONFIG_NETINIT_DNSIPADDR=0XC0A800FE
|
||||
CONFIG_NETINIT_DRIPADDR=0XC0A800FE
|
||||
CONFIG_NETINIT_DNSIPADDR=0xA290AFE
|
||||
CONFIG_NETINIT_DRIPADDR=0xA290AFE
|
||||
CONFIG_NETINIT_RETRY_MOUNTPATH=10
|
||||
CONFIG_NETINIT_THREAD=y
|
||||
CONFIG_NETINIT_THREAD_PRIORITY=49
|
||||
@@ -167,15 +168,18 @@ CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_CAN=y
|
||||
CONFIG_NET_CAN_EXTID=y
|
||||
CONFIG_NET_CAN_NOTIFIER=y
|
||||
CONFIG_NET_CAN_RAW_FILTER_MAX=1
|
||||
CONFIG_NET_CAN_RAW_TX_DEADLINE=y
|
||||
CONFIG_NET_CAN_SOCK_OPTS=y
|
||||
CONFIG_NET_ETH_PKTSIZE=1518
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_IGMP=y
|
||||
CONFIG_NET_SOLINGER=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCPBACKLOG=y
|
||||
CONFIG_NET_TCP_DELAYED_ACK=y
|
||||
CONFIG_NET_TCP_KEEPALIVE=y
|
||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_TIMESTAMP=y
|
||||
CONFIG_NET_UDP=y
|
||||
@@ -196,6 +200,7 @@ CONFIG_NSH_VARS=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAM_SIZE=1048576
|
||||
CONFIG_RAM_START=0x20200000
|
||||
|
||||
@@ -89,6 +89,7 @@ CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_UXRCE_DDS_CLIENT=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
CONFIG_MODULES_ZENOH=y
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_BSONDUMP=y
|
||||
CONFIG_SYSTEMCMDS_DMESG=y
|
||||
|
||||
@@ -55,6 +55,7 @@ CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEBUG_TCBINFO=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_DEV_URANDOM=y
|
||||
CONFIG_ETH0_PHY_MULTI=y
|
||||
CONFIG_FAT_DMAMEMORY=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
@@ -214,15 +215,18 @@ CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_CAN=y
|
||||
CONFIG_NET_CAN_EXTID=y
|
||||
CONFIG_NET_CAN_NOTIFIER=y
|
||||
CONFIG_NET_CAN_RAW_FILTER_MAX=1
|
||||
CONFIG_NET_CAN_RAW_TX_DEADLINE=y
|
||||
CONFIG_NET_CAN_SOCK_OPTS=y
|
||||
CONFIG_NET_ETH_PKTSIZE=1518
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_IGMP=y
|
||||
CONFIG_NET_SOLINGER=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCPBACKLOG=y
|
||||
CONFIG_NET_TCP_DELAYED_ACK=y
|
||||
CONFIG_NET_TCP_KEEPALIVE=y
|
||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_TIMESTAMP=y
|
||||
CONFIG_NET_UDP=y
|
||||
@@ -243,6 +247,7 @@ CONFIG_NSH_VARS=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAM_SIZE=1835008
|
||||
|
||||
@@ -339,6 +339,11 @@ if(EXISTS ${BOARD_DEFCONFIG})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ADDITIONAL INIT
|
||||
if(ADDITIONAL_INIT)
|
||||
set(config_additional_init ${ADDITIONAL_INIT} CACHE INTERNAL "additional init" FORCE)
|
||||
endif()
|
||||
|
||||
if(UAVCAN_INTERFACES)
|
||||
set(config_uavcan_num_ifaces ${UAVCAN_INTERFACES} CACHE INTERNAL "UAVCAN interfaces" FORCE)
|
||||
endif()
|
||||
|
||||
@@ -71,18 +71,15 @@ add_custom_target(metadata_parameters
|
||||
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--markdown ${PX4_BINARY_DIR}/docs/parameters.md
|
||||
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--json ${PX4_BINARY_DIR}/docs/parameters.json
|
||||
--compress
|
||||
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--xml ${PX4_BINARY_DIR}/docs/parameters.xml
|
||||
|
||||
COMMENT "Generating full parameter metadata (markdown, xml, and json)"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Onboard parameters for Vehicle 1
|
||||
#
|
||||
# Stack: PX4 Pro
|
||||
# Vehicle: śŕĐýŇí
|
||||
# Version: 1.15.4
|
||||
# Vehicle: Multi-Rotor
|
||||
# Version: 1.15.4
|
||||
# Git Revision: 99c40407ff000000
|
||||
#
|
||||
# Vehicle-Id Component-Id Name Value Type
|
||||
@@ -318,7 +318,6 @@
|
||||
1 1 COM_OBS_AVOID 0 6
|
||||
1 1 COM_OF_LOSS_T 1.000000000000000000 9
|
||||
1 1 COM_PARACHUTE 0 6
|
||||
1 1 COM_POSCTL_NAVL 0 6
|
||||
1 1 COM_POS_FS_DELAY 1 6
|
||||
1 1 COM_POS_FS_EPH 5.000000000000000000 9
|
||||
1 1 COM_POS_LOW_EPH -1.000000000000000000 9
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="draw"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 291.424 291.77"
|
||||
enable-background="new 0 0 291.424 291.77"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="FreeFlyer.svg"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
|
||||
id="metadata13908"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>QuadRotorX</dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs13906"><rect
|
||||
x="64.295094"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434001"
|
||||
id="rect1674" /><rect
|
||||
x="57.181928"
|
||||
y="12.768183"
|
||||
width="21.455602"
|
||||
height="14.069247"
|
||||
id="rect1668" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-3" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-6" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-8" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-9" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-9-0" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-9-0-3" /><rect
|
||||
x="64.295097"
|
||||
y="257.16159"
|
||||
width="20.004284"
|
||||
height="19.434002"
|
||||
id="rect1674-9-0-5" /></defs><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1131"
|
||||
id="namedview13904"
|
||||
showgrid="true"
|
||||
showguides="false"
|
||||
inkscape:zoom="2"
|
||||
inkscape:cx="37"
|
||||
inkscape:cy="143.75"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="draw"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid14610" /></sodipodi:namedview><title
|
||||
id="title13869">QuadRotorX</title>
|
||||
<rect
|
||||
style="fill:#4ec3e8;fill-opacity:0.8;stroke-width:0.703099"
|
||||
id="rect866"
|
||||
width="182.87863"
|
||||
height="182.87863"
|
||||
x="54.336742"
|
||||
y="54.008221" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="m 41.75804,283.31181 64.75142,-0.1091 -34.35904,-46.53234"
|
||||
id="path978" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="m 8.0625538,189.05596 0.1091,64.75142 46.5323452,-34.35904"
|
||||
id="path978-3" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="m 7.6111718,42.233006 0.1091,64.751414 46.5323442,-34.359034"
|
||||
id="path978-3-5" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="M 283.3143,102.92315 283.2052,38.171731 236.67284,72.530766"
|
||||
id="path978-3-0" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="m 283.76568,249.7461 -0.1091,-64.75142 -46.53235,34.35904"
|
||||
id="path978-3-5-9" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="m 186.0159,282.76127 64.75142,-0.1091 -34.35904,-46.53235"
|
||||
id="path978-5" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="m 249.48837,7.3723165 -64.75142,0.1091 34.35904,46.5323455"
|
||||
id="path978-6" /><path
|
||||
style="fill:#159e1f;fill-opacity:0.8;stroke-width:1.32638"
|
||||
d="M 105.23051,7.9228645 40.479095,8.0319644 74.838131,54.56431"
|
||||
id="path978-5-2" /><path
|
||||
fill="#ffffff"
|
||||
stroke="#000000"
|
||||
stroke-miterlimit="10"
|
||||
d="m 177.46535,152.08429 -25.44869,25.44869 c -2.72029,2.72029 -7.13013,2.72029 -9.84972,0 l -25.44868,-25.44869 c -2.7203,-2.72029 -2.7203,-7.13013 0,-9.84972 l 25.44868,-25.44868 c 2.72029,-2.72029 7.13013,-2.72029 9.84972,0 l 25.44869,25.44868 c 2.72029,2.72029 2.72029,7.13013 0,9.84972 z"
|
||||
id="path13875-2"
|
||||
style="stroke-width:0.703099" /><polygon
|
||||
fill="#ff442b"
|
||||
stroke="#000000"
|
||||
stroke-miterlimit="10"
|
||||
points="145.645,117.211 163.823,168.211 127.468,168.211 "
|
||||
id="polygon13877-7"
|
||||
transform="matrix(0.70309945,0,0,0.70309945,44.68853,44.358917)" /><text
|
||||
xml:space="preserve"
|
||||
id="text1666"
|
||||
style="fill:#ffffff;fill-opacity:0.80000001;white-space:pre;shape-inside:url(#rect1668)" /><text
|
||||
xml:space="preserve"
|
||||
id="text1672"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674);fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,-56.149908,-232.98716)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2022">1</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-6"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-3);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,-54.90599,-471.96664)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2024">2</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-1"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-6);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,88.181331,-233.48182)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2026">3</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-7"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-8);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,89.923516,-472.9994)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2028">4</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-2"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-9);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,-107.88311,-425.85878)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2030">5</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-2-2"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-9-0);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,140.31603,-426.60417)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2032">6</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-2-2-7"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-9-0-3);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,-106.57328,-277.85487)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2034">7</tspan></text><text
|
||||
xml:space="preserve"
|
||||
id="text1672-2-2-9"
|
||||
style="font-size:16px;white-space:pre;shape-inside:url(#rect1674-9-0-5);display:inline;fill:#ffffff;fill-opacity:0.8"
|
||||
transform="matrix(1.8712033,0,0,1.8712033,140.59859,-279.63807)"><tspan
|
||||
x="64.294922"
|
||||
y="271.72011"
|
||||
id="tspan2036">8</tspan></text></svg>
|
||||
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 269 KiB |
@@ -157,6 +157,7 @@
|
||||
- [mRo (3DR) Pixhawk Wiring Quickstart](assembly/quick_start_pixhawk.md)
|
||||
- [Holybro Pixhawk Mini (FMUv3) - Discontinued](flight_controller/pixhawk_mini.md)
|
||||
- [Manufacturer-Supported Autopilots](flight_controller/autopilot_manufacturer_supported.md)
|
||||
- [Accton Godwit GA1](flight_controller/accton-godwit_ga1.md)
|
||||
- [AirMind MindPX](flight_controller/mindpx.md)
|
||||
- [AirMind MindRacer](flight_controller/mindracer.md)
|
||||
- [ARK Electronics ARKV6X](flight_controller/ark_v6x.md)
|
||||
@@ -281,6 +282,7 @@
|
||||
- [CubePilot Here+ (Discontined)](gps_compass/rtk_gps_hex_hereplus.md)
|
||||
- [INS (Inertial Navigation/GNSS)](sensor/inertial_navigation_systems.md)
|
||||
- [InertialLabs](sensor/inertiallabs.md)
|
||||
- [sbgECom](sensor/sbgecom.md)
|
||||
- [VectorNav](sensor/vectornav.md)
|
||||
- [Optical Flow](sensor/optical_flow.md)
|
||||
- [ARK Flow](dronecan/ark_flow.md)
|
||||
@@ -659,6 +661,8 @@
|
||||
- [RoverPositionSetpoint](msg_docs/RoverPositionSetpoint.md)
|
||||
- [RoverRateSetpoint](msg_docs/RoverRateSetpoint.md)
|
||||
- [RoverRateStatus](msg_docs/RoverRateStatus.md)
|
||||
- [RoverSpeedSetpoint](msg_docs/RoverSpeedSetpoint.md)
|
||||
- [RoverSpeedStatus](msg_docs/RoverSpeedStatus.md)
|
||||
- [RoverSteeringSetpoint](msg_docs/RoverSteeringSetpoint.md)
|
||||
- [RoverThrottleSetpoint](msg_docs/RoverThrottleSetpoint.md)
|
||||
- [RoverVelocitySetpoint](msg_docs/RoverVelocitySetpoint.md)
|
||||
@@ -719,6 +723,7 @@
|
||||
- [YawEstimatorStatus](msg_docs/YawEstimatorStatus.md)
|
||||
- [AirspeedValidatedV0](msg_docs/AirspeedValidatedV0.md)
|
||||
- [ArmingCheckReplyV0](msg_docs/ArmingCheckReplyV0.md)
|
||||
- [ArmingCheckRequestV0](msg_docs/ArmingCheckRequestV0.md)
|
||||
- [BatteryStatusV0](msg_docs/BatteryStatusV0.md)
|
||||
- [EventV0](msg_docs/EventV0.md)
|
||||
- [HomePositionV0](msg_docs/HomePositionV0.md)
|
||||
@@ -823,6 +828,8 @@
|
||||
- [Test MC_04 - Failsafe Testing](test_cards/mc_04_failsafe_testing.md)
|
||||
- [Test MC_05 - Manual Modes (Inside)](test_cards/mc_05_indoor_flight_manual_modes.md)
|
||||
- [Test MC_06 - Optical Flow (Inside)](test_cards/mc_06_optical_flow.md)
|
||||
- [Test MC_07 - VIO (Inside)](test_cards/mc_07_vio.md)
|
||||
- [Test MC_08 - DSHOT ESC](test_cards/mc_08_dshot.md)
|
||||
- [Unit Tests](test_and_ci/unit_tests.md)
|
||||
- [Fuzz Tests](test_and_ci/fuzz_tests.md)
|
||||
- [Continuous Integration](test_and_ci/continous_integration.md)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<!-- GENERATED CONTENT: DO NOT EDIT -->
|
||||
- [Introduction](/index.md)
|
||||
|
||||
- [Introduction](/index.md)
|
||||
- [Basic Concepts](/getting_started/px4_basic_concepts.md)
|
||||
|
||||
- [Multicopters](/frames_multicopter/index.md)
|
||||
|
||||
- [Features](/features_mc/index.md)
|
||||
- [Flight Modes](/flight_modes_mc/index.md)
|
||||
- [Position Mode (MC)](/flight_modes_mc/position.md)
|
||||
@@ -37,7 +36,7 @@
|
||||
- [Static Pressure Buildup](/advanced_config/static_pressure_buildup.md)
|
||||
- [Flying (Basics)](/flying/basic_flying_mc.md)
|
||||
- [Complete Vehicles](/complete_vehicles_mc/index.md)
|
||||
- [ModalAI Starling](/complete_vehicles_mc/modalai_starling.md)
|
||||
- [ModalAI Starling (PX4 Dev Kit)](/complete_vehicles_mc/modalai_starling.md)
|
||||
- [PX4 Vision Kit](/complete_vehicles_mc/px4_vision_kit.md)
|
||||
- [MindRacer BNF & RTF](/complete_vehicles_mc/mindracer_BNF_RTF.md)
|
||||
- [MindRacer 210](/complete_vehicles_mc/mindracer210.md)
|
||||
@@ -58,7 +57,6 @@
|
||||
- [DJI F450 (CUAV v5 nano)](/frames_multicopter/dji_f450_cuav_5nano.md)
|
||||
|
||||
- [Planes (Fixed-Wing)](/frames_plane/index.md)
|
||||
|
||||
- [Assembly](/assembly/assembly_fw.md)
|
||||
- [Config/Tuning](/config_fw/index.md)
|
||||
- [Auto-tune](/config/autotune_fw.md)
|
||||
@@ -86,7 +84,6 @@
|
||||
- [Wing Wing Z84 (Pixracer)](/frames_plane/wing_wing_z84.md)
|
||||
|
||||
- [VTOL](/frames_vtol/index.md)
|
||||
|
||||
- [Assembly](/assembly/assembly_vtol.md)
|
||||
- [VTOL Config/Tuning](/config_vtol/index.md)
|
||||
- [Auto-tune](/config/autotune_vtol.md)
|
||||
@@ -111,7 +108,6 @@
|
||||
- [Complete Vehicles](/complete_vehicles_vtol/index.md)
|
||||
|
||||
- [Operations](/config/operations.md)
|
||||
|
||||
- [Safety](/config/safety_intro.md)
|
||||
- [Safety Configuration (Failsafes)](/config/safety.md)
|
||||
- [Failsafe Simulation](/config/safety_simulation.md)
|
||||
@@ -132,7 +128,6 @@
|
||||
- [QGroundControl Flight-Readiness Status](/flying/pre_flight_checks.md)
|
||||
|
||||
- [Hardware Selection & Setup](/hardware/drone_parts.md)
|
||||
|
||||
- [Flight Controllers (Autopilots)](/flight_controller/index.md)
|
||||
- [Flight Controller Selection](/getting_started/flight_controller_selection.md)
|
||||
- [Pixhawk Series](/flight_controller/pixhawk_series.md)
|
||||
@@ -164,18 +159,18 @@
|
||||
- [mRo (3DR) Pixhawk Wiring Quickstart](/assembly/quick_start_pixhawk.md)
|
||||
- [Holybro Pixhawk Mini (FMUv3) - Discontinued](/flight_controller/pixhawk_mini.md)
|
||||
- [Manufacturer-Supported Autopilots](/flight_controller/autopilot_manufacturer_supported.md)
|
||||
- [Accton Godwit GA1](/flight_controller/accton-godwit_ga1.md)
|
||||
- [AirMind MindPX](/flight_controller/mindpx.md)
|
||||
- [AirMind MindRacer](/flight_controller/mindracer.md)
|
||||
- [ARK Electronics ARKV6X](/flight_controller/ark_v6x.md)
|
||||
- [ARK FPV Flight Controller](/flight_controller/ark_fpv.md)
|
||||
- [ARK Pi6X Flow Flight Controller](/flight_controller/ark_pi6x.md)
|
||||
- [CUAV X7](/flight_controller/cuav_x7.md)
|
||||
- [CUAV Nora](/flight_controller/cuav_nora.md)
|
||||
- [CUAV V5+ (FMUv5)](/flight_controller/cuav_v5_plus.md)
|
||||
- [Wiring Quickstart](/assembly/quick_start_cuav_v5_plus.md)
|
||||
- [CUAV V5 nano (FMUv5)](/flight_controller/cuav_v5_nano.md)
|
||||
- [CUAV V5 nano Wiring Quickstart](/assembly/quick_start_cuav_v5_nano.md)
|
||||
- [CUAV Pixhack v3 (FMUv3)](/flight_controller/pixhack_v3.md)
|
||||
- [CUAV X25 EVO](/flight_controller/cuav_x25-evo.md)
|
||||
- [CubePilot Cube Orange+ (CubePilot)](/flight_controller/cubepilot_cube_orangeplus.md)
|
||||
- [CubePilot Cube Orange (CubePilot)](/flight_controller/cubepilot_cube_orange.md)
|
||||
- [CubePilot Cube Yellow (CubePilot)](/flight_controller/cubepilot_cube_yellow.md)
|
||||
@@ -188,11 +183,8 @@
|
||||
- [Wiring Quickstart](/assembly/quick_start_durandal.md)
|
||||
- [Holybro Pix32 v5](/flight_controller/holybro_pix32_v5.md)
|
||||
- [Wiring Quickstart](/assembly/quick_start_holybro_pix32_v5.md)
|
||||
- [ModalAI Flight Core v1](/flight_controller/modalai_fc_v1.md)
|
||||
- [ModalAI VOXL Flight](/flight_controller/modalai_voxl_flight.md)
|
||||
- [ModalAI VOXL 2](/flight_controller/modalai_voxl_2.md)
|
||||
- [mRobotics-X2.1 (FMUv2)](/flight_controller/mro_x2.1.md)
|
||||
- [mRo Control Zero F7)](/flight_controller/mro_control_zero_f7.md)
|
||||
- [mRo Control Zero F7](/flight_controller/mro_control_zero_f7.md)
|
||||
- [Sky-Drones AIRLink](/flight_controller/airlink.md)
|
||||
- [SPRacing SPRacingH7EXTREME](/flight_controller/spracingh7extreme.md)
|
||||
- [ThePeach FCC-K1](/flight_controller/thepeach_k1.md)
|
||||
@@ -206,18 +198,20 @@
|
||||
- [Discontinued Autopilots/Vehicles](/flight_controller/autopilot_discontinued.md)
|
||||
- [Drotek Dropix (FMUv2)](/flight_controller/dropix.md)
|
||||
- [Omnibus F4 SD](/flight_controller/omnibus_f4_sd.md)
|
||||
- [BetaFPV Beta75X 2S Brushless Whoop](/complete_vehicles_mc/betafpv_beta75x.md)
|
||||
- [Bitcraze Crazyflie 2.0 ](/complete_vehicles_mc/crazyflie2.md)
|
||||
- [Aerotenna OcPoC-Zynq Mini](/flight_controller/ocpoc_zynq.md)
|
||||
- [CUAV X7](/flight_controller/cuav_x7.md)
|
||||
- [CUAV v5](/flight_controller/cuav_v5.md)
|
||||
- [CUAV Pixhack v3 (FMUv3)](/flight_controller/pixhack_v3.md)
|
||||
- [Holybro Kakute F7](/flight_controller/kakutef7.md)
|
||||
- [Holybro Pixfalcon](/flight_controller/pixfalcon.md)
|
||||
- [Holybro pix32 (FMUv2)](/flight_controller/holybro_pix32.md)
|
||||
- [ModalAI Flight Core v1](/flight_controller/modalai_fc_v1.md)
|
||||
- [ModalAI VOXL Flight](/flight_controller/modalai_voxl_flight.md)
|
||||
- [mRo X2.1 (FMUv2)](/flight_controller/mro_x2.1.md)
|
||||
- [mRo AUAV-X2](/flight_controller/auav_x2.md)
|
||||
- [NXP RDDRONE-FMUK66 FMU](/flight_controller/nxp_rddrone_fmuk66.md)
|
||||
- [3DR Pixhawk 1](/flight_controller/pixhawk.md)
|
||||
- [Snapdragon Flight](/flight_controller/snapdragon_flight.md)
|
||||
- [Intel® Aero RTF Drone](/complete_vehicles_mc/intel_aero.md)
|
||||
- [Pixhawk Autopilot Bus (PAB) & Carriers](/flight_controller/pixhawk_autopilot_bus.md)
|
||||
- [ARK Electronics Pixhawk Autopilot Bus Carrier](/flight_controller/ark_pab.md)
|
||||
- [Mounting the Flight Controller](/assembly/mount_and_orient_controller.md)
|
||||
@@ -241,6 +235,7 @@
|
||||
- [Compass Power Compensation](/advanced_config/compass_power_compensation.md)
|
||||
- [Airspeed Sensors](/sensor/airspeed.md)
|
||||
- [Calibration](/config/airspeed.md)
|
||||
- [Airspeed Validation](/advanced_config/airspeed_validation.md)
|
||||
- [TFSlot Airspeed Sensor](/sensor/airspeed_tfslot.md)
|
||||
- [Barometers](/sensor/barometer.md)
|
||||
- [Distance Sensors \(Rangefinders\)](/sensor/rangefinders.md)
|
||||
@@ -272,6 +267,7 @@
|
||||
- [CUAV C-RTK](/gps_compass/rtk_gps_cuav_c-rtk.md)
|
||||
- [CUAV C-RTK2 PPK/RTK GNSS](/gps_compass/rtk_gps_cuav_c-rtk2.md)
|
||||
- [CUAV C-RTK 9Ps](/gps_compass/rtk_gps_cuav_c-rtk-9ps.md)
|
||||
- [DATAGNSS NANO HRTK GNSS](/gps_compass/rtk_gps_datagnss_nano_hrtk.md)
|
||||
- [DATAGNSS GEM1305 RTK GNSS](/gps_compass/rtk_gps_gem1305.md)
|
||||
- [Femtones MINI2 Receiver](/gps_compass/rtk_gps_fem_mini2.md)
|
||||
- [Freefly RTK GPS](/gps_compass/rtk_gps_freefly.md)
|
||||
@@ -287,6 +283,7 @@
|
||||
- [Trimble MB-Two](/gps_compass/rtk_gps_trimble_mb_two.md)
|
||||
- [CubePilot Here+ (Discontined)](/gps_compass/rtk_gps_hex_hereplus.md)
|
||||
- [INS (Inertial Navigation/GNSS)](/sensor/inertial_navigation_systems.md)
|
||||
- [InertialLabs](/sensor/inertiallabs.md)
|
||||
- [VectorNav](/sensor/vectornav.md)
|
||||
- [Optical Flow](/sensor/optical_flow.md)
|
||||
- [ARK Flow](/dronecan/ark_flow.md)
|
||||
@@ -308,7 +305,6 @@
|
||||
- [Zubax Telega](/dronecan/zubax_telega.md)
|
||||
- [PX4 Sapog ESC Firmware](/dronecan/sapog.md)
|
||||
- [Holybro Kotleta](/dronecan/holybro_kotleta.md)
|
||||
- [Zubax Orel](/dronecan/zubax_orel.md)
|
||||
- [Vertiq](/peripherals/vertiq.md)
|
||||
- [VESC](/peripherals/vesc.md)
|
||||
- [Radio Control (RC)](/getting_started/rc_transmitter_receiver.md)
|
||||
@@ -320,6 +316,7 @@
|
||||
- [Telemetry Radios](/telemetry/index.md)
|
||||
- [SiK Radio](/telemetry/sik_radio.md)
|
||||
- [RFD900 (SiK) Telemetry Radio](/telemetry/rfd900_telemetry.md)
|
||||
- [ThunderFly TFSIK01 Telemetry Radio](/telemetry/tfsik_telemetry.md)
|
||||
- [HolyBro (SIK) Telemetry Radio](/telemetry/holybro_sik_radio.md)
|
||||
- [Telemetry Wifi](/telemetry/telemetry_wifi.md)
|
||||
- [ESP8266 WiFi Module](/telemetry/esp8266_wifi_module.md)
|
||||
@@ -335,6 +332,7 @@
|
||||
- [FrSky Telemetry](/peripherals/frsky_telemetry.md)
|
||||
- [TBS Crossfire (CRSF) Telemetry](/telemetry/crsf_telemetry.md)
|
||||
- [Satellite Comms (Iridium/RockBlock)](/advanced_features/satcom_roadblock.md)
|
||||
|
||||
- [Power Systems](/power_systems/index.md)
|
||||
- [Battery Estimation Tuning](/config/battery.md)
|
||||
- [Battery Chemistry Overview](/power_systems/battery_chemistry.md)
|
||||
@@ -401,7 +399,6 @@
|
||||
- [Full Parameter Reference](/advanced_config/parameter_reference.md)
|
||||
|
||||
- [Other Vehicles](/airframes/index.md)
|
||||
|
||||
- [Airships (experimental)](/frames_airship/index.md)
|
||||
- [Autogyros (experimental)](/frames_autogyro/index.md)
|
||||
- [ThunderFly Auto-G2 (Holybro pix32)](/frames_autogyro/thunderfly_auto_g2.md)
|
||||
@@ -409,17 +406,17 @@
|
||||
- [Helicopter (experimental)](/frames_helicopter/index.md)
|
||||
- [Helicopter Config/Tuning](/config_heli/index.md)
|
||||
- [Rovers (experimental)](/frames_rover/index.md)
|
||||
- [Ackermann Rovers](/frames_rover/ackermann.md)
|
||||
- [Drive Modes](/flight_modes_rover/ackermann.md)
|
||||
- [Configuration/Tuning](/config_rover/ackermann.md)
|
||||
- [Differential Rovers](/frames_rover/differential.md)
|
||||
- [Drive Modes](/flight_modes_rover/differential.md)
|
||||
- [Configuration/Tuning](/config_rover/differential.md)
|
||||
- [Aion Robotics R1](/frames_rover/aion_r1.md)
|
||||
- [Mecanum Rovers](/frames_rover/mecanum.md)
|
||||
- [Drive Modes](/flight_modes_rover/mecanum.md)
|
||||
- [Configuration/Tuning](/config_rover/mecanum.md)
|
||||
- [(Deprecated) Rover Position Control](/frames_rover/rover_position_control.md)
|
||||
- [Drive Modes](/flight_modes_rover/index.md)
|
||||
- [Manual](/flight_modes_rover/manual.md)
|
||||
- [Auto](/flight_modes_rover/auto.md)
|
||||
- [Configuration/Tuning](/config_rover/index.md)
|
||||
- [Basic Setup](/config_rover/basic_setup.md)
|
||||
- [Rate Tuning](/config_rover/rate_tuning.md)
|
||||
- [Attitude Tuning](/config_rover/attitude_tuning.md)
|
||||
- [Velocity Tuning](/config_rover/velocity_tuning.md)
|
||||
- [Position Tuning](/config_rover/position_tuning.md)
|
||||
- [Complete Vehicles](/complete_vehicles_rover/index.md)
|
||||
- [Aion Robotics R1](/complete_vehicles_rover/aion_r1.md)
|
||||
- [Submarines (experimental)](/frames_sub/index.md)
|
||||
- [BlueROV2](/frames_sub/bluerov2.md)
|
||||
- [Airframes Reference](/airframes/airframe_reference.md)
|
||||
@@ -531,6 +528,7 @@
|
||||
- [Airspeed](/msg_docs/Airspeed.md)
|
||||
- [AirspeedWind](/msg_docs/AirspeedWind.md)
|
||||
- [AutotuneAttitudeControlStatus](/msg_docs/AutotuneAttitudeControlStatus.md)
|
||||
- [BatteryInfo](/msg_docs/BatteryInfo.md)
|
||||
- [ButtonEvent](/msg_docs/ButtonEvent.md)
|
||||
- [CameraCapture](/msg_docs/CameraCapture.md)
|
||||
- [CameraStatus](/msg_docs/CameraStatus.md)
|
||||
@@ -549,6 +547,7 @@
|
||||
- [DifferentialPressure](/msg_docs/DifferentialPressure.md)
|
||||
- [DistanceSensor](/msg_docs/DistanceSensor.md)
|
||||
- [DistanceSensorModeChangeRequest](/msg_docs/DistanceSensorModeChangeRequest.md)
|
||||
- [DronecanNodeStatus](/msg_docs/DronecanNodeStatus.md)
|
||||
- [Ekf2Timestamps](/msg_docs/Ekf2Timestamps.md)
|
||||
- [EscReport](/msg_docs/EscReport.md)
|
||||
- [EscStatus](/msg_docs/EscStatus.md)
|
||||
@@ -623,6 +622,7 @@
|
||||
- [MountOrientation](/msg_docs/MountOrientation.md)
|
||||
- [NavigatorMissionItem](/msg_docs/NavigatorMissionItem.md)
|
||||
- [NavigatorStatus](/msg_docs/NavigatorStatus.md)
|
||||
- [NeuralControl](/msg_docs/NeuralControl.md)
|
||||
- [NormalizedUnsignedSetpoint](/msg_docs/NormalizedUnsignedSetpoint.md)
|
||||
- [ObstacleDistance](/msg_docs/ObstacleDistance.md)
|
||||
- [OffboardControlMode](/msg_docs/OffboardControlMode.md)
|
||||
@@ -662,6 +662,8 @@
|
||||
- [RoverPositionSetpoint](/msg_docs/RoverPositionSetpoint.md)
|
||||
- [RoverRateSetpoint](/msg_docs/RoverRateSetpoint.md)
|
||||
- [RoverRateStatus](/msg_docs/RoverRateStatus.md)
|
||||
- [RoverSpeedSetpoint](/msg_docs/RoverSpeedSetpoint.md)
|
||||
- [RoverSpeedStatus](/msg_docs/RoverSpeedStatus.md)
|
||||
- [RoverSteeringSetpoint](/msg_docs/RoverSteeringSetpoint.md)
|
||||
- [RoverThrottleSetpoint](/msg_docs/RoverThrottleSetpoint.md)
|
||||
- [RoverVelocitySetpoint](/msg_docs/RoverVelocitySetpoint.md)
|
||||
@@ -721,7 +723,13 @@
|
||||
- [Wind](/msg_docs/Wind.md)
|
||||
- [YawEstimatorStatus](/msg_docs/YawEstimatorStatus.md)
|
||||
- [AirspeedValidatedV0](/msg_docs/AirspeedValidatedV0.md)
|
||||
- [ArmingCheckReplyV0](/msg_docs/ArmingCheckReplyV0.md)
|
||||
- [ArmingCheckRequestV0](/msg_docs/ArmingCheckRequestV0.md)
|
||||
- [BatteryStatusV0](/msg_docs/BatteryStatusV0.md)
|
||||
- [EventV0](/msg_docs/EventV0.md)
|
||||
- [HomePositionV0](/msg_docs/HomePositionV0.md)
|
||||
- [VehicleAttitudeSetpointV0](/msg_docs/VehicleAttitudeSetpointV0.md)
|
||||
- [VehicleLocalPositionV0](/msg_docs/VehicleLocalPositionV0.md)
|
||||
- [VehicleStatusV0](/msg_docs/VehicleStatusV0.md)
|
||||
- [MAVLink Messaging](/mavlink/index.md)
|
||||
- [Adding Messages](/mavlink/adding_messages.md)
|
||||
@@ -761,7 +769,7 @@
|
||||
- [Debugging with GDB](/debug/gdb_debugging.md)
|
||||
- [SWD Debug Port](/debug/swd_debug.md)
|
||||
- [JLink Probe](/debug/probe_jlink.md)
|
||||
- [Black Magic/DroneCode Probe](/debug/probe_bmp.md)
|
||||
- [Black Magic/Zubax BugFace BF1 Probe](/debug/probe_bmp.md)
|
||||
- [STLink Probe](/debug/probe_stlink.md)
|
||||
- [MCU-Link Probe](/debug/probe_mculink.md)
|
||||
- [Hardfault Debugging](/debug/gdb_hardfault.md)
|
||||
@@ -785,6 +793,9 @@
|
||||
- [Camera Integration/Architecture](/camera/camera_architecture.md)
|
||||
- [Computer Vision](/advanced/computer_vision.md)
|
||||
- [Motion Capture (VICON, Optitrack, NOKOV)](/tutorials/motion-capture.md)
|
||||
- [Neural Networks](/advanced/neural_networks.md)
|
||||
- [Neural Network Module Utilities](/advanced/nn_module_utilities.md)
|
||||
- [TensorFlow Lite Micro (TFLM)](/advanced/tflm.md)
|
||||
- [Installing driver for Intel RealSense R200](/advanced/realsense_intel_driver.md)
|
||||
- [Switching State Estimators](/advanced/switching_state_estimators.md)
|
||||
- [Out-of-Tree Modules](/advanced/out_of_tree_modules.md)
|
||||
@@ -816,8 +827,12 @@
|
||||
- [Test MC_02 - Full Autonomous](/test_cards/mc_02_full_autonomous.md)
|
||||
- [Test MC_03 - Auto Manual Mix](/test_cards/mc_03_auto_manual_mix.md)
|
||||
- [Test MC_04 - Failsafe Testing](/test_cards/mc_04_failsafe_testing.md)
|
||||
- [Test MC_05 - Indoor Flight (Manual Modes)](/test_cards/mc_05_indoor_flight_manual_modes.md)
|
||||
- [Test MC_05 - Manual Modes (Inside)](/test_cards/mc_05_indoor_flight_manual_modes.md)
|
||||
- [Test MC_06 - Optical Flow (Inside)](/test_cards/mc_06_optical_flow.md)
|
||||
- [Test MC_07 - VIO (Inside)](/test_cards/mc_07_vio.md)
|
||||
- [Test MC_08 - DSHOT ESC](/test_cards/mc_08_dshot.md)
|
||||
- [Unit Tests](/test_and_ci/unit_tests.md)
|
||||
- [Fuzz Tests](/test_and_ci/fuzz_tests.md)
|
||||
- [Continuous Integration](/test_and_ci/continous_integration.md)
|
||||
- [Integration Testing](/test_and_ci/integration_testing.md)
|
||||
- [MAVSDK Integration Testing](/test_and_ci/integration_testing_mavsdk.md)
|
||||
|
||||
@@ -692,6 +692,16 @@ to 0 and 4096. Other standard params follows the same rule.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 65535 | | 0 |
|
||||
|
||||
### PCA9685_EN_BUS (`INT32`) {#PCA9685_EN_BUS}
|
||||
|
||||
Enable the PCA9685 output driver.
|
||||
|
||||
The integer refers to the I2C bus number where PCA9685 is connected.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 10 | | 0 |
|
||||
|
||||
### PCA9685_FAIL1 (`INT32`) {#PCA9685_FAIL1}
|
||||
|
||||
PCA9685 Output Channel 1 Failsafe Value.
|
||||
@@ -14435,9 +14445,9 @@ Set bits in the following positions to enable:
|
||||
|
||||
### FW_AT_MAN_AUX (`INT32`) {#FW_AT_MAN_AUX}
|
||||
|
||||
Enable/disable auto tuning using an RC AUX input.
|
||||
Enable/disable auto tuning using a manual control AUX input.
|
||||
|
||||
Defines which RC_MAP_AUXn parameter maps the RC channel used to enable/disable auto tuning.
|
||||
Defines which RC_MAP_AUXn parameter maps the manual control channel used to enable/disable auto tuning.
|
||||
|
||||
**Values:**
|
||||
|
||||
@@ -16242,21 +16252,6 @@ Expect and require a healthy MAVLink parachute system.
|
||||
| ------ | -------- | -------- | --------- | ------------ | ---- |
|
||||
| | | | | Disabled (0) |
|
||||
|
||||
### COM_POSCTL_NAVL (`INT32`) {#COM_POSCTL_NAVL}
|
||||
|
||||
Position mode navigation loss response.
|
||||
|
||||
This sets the flight mode that will be used if navigation accuracy is no longer adequate for position control in manual Position mode.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Altitude mode
|
||||
- `1`: Land mode (descend)
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### COM_POS_FS_EPH (`FLOAT`) {#COM_POS_FS_EPH}
|
||||
|
||||
Horizontal position error threshold for hovering systems.
|
||||
@@ -16363,7 +16358,7 @@ A negative value disables the check.
|
||||
|
||||
### COM_RCL_EXCEPT (`INT32`) {#COM_RCL_EXCEPT}
|
||||
|
||||
RC loss exceptions.
|
||||
Manual control loss exceptions.
|
||||
|
||||
Specify modes where manual control loss is ignored and no failsafe is triggered.
|
||||
External modes requiring stick input will still failsafe.
|
||||
@@ -16381,7 +16376,7 @@ External modes requiring stick input will still failsafe.
|
||||
|
||||
### COM_RC_ARM_HYST (`INT32`) {#COM_RC_ARM_HYST}
|
||||
|
||||
RC input arm/disarm command duration.
|
||||
Manual control input arm/disarm command duration.
|
||||
|
||||
The default value of 1000 requires the stick to be held in the arm or disarm position for 1 second.
|
||||
|
||||
@@ -16429,9 +16424,9 @@ Ensure the value is not set lower than the update interval of the RC or Joystick
|
||||
|
||||
### COM_RC_OVERRIDE (`INT32`) {#COM_RC_OVERRIDE}
|
||||
|
||||
Enable RC stick override of auto and/or offboard modes.
|
||||
Enable manual control stick override.
|
||||
|
||||
When RC stick override is enabled, moving the RC sticks more than COM_RC_STICK_OV
|
||||
When enabled, moving the sticks more than COM_RC_STICK_OV
|
||||
immediately gives control back to the pilot by switching to Position mode and
|
||||
if position is unavailable Altitude mode.
|
||||
Note: Only has an effect on multicopters, and VTOLs in multicopter mode.
|
||||
@@ -16447,7 +16442,7 @@ Note: Only has an effect on multicopters, and VTOLs in multicopter mode.
|
||||
|
||||
### COM_RC_STICK_OV (`FLOAT`) {#COM_RC_STICK_OV}
|
||||
|
||||
RC stick override threshold.
|
||||
Stick override threshold.
|
||||
|
||||
If COM_RC_OVERRIDE is enabled and the joystick input is moved more than this threshold
|
||||
the autopilot the pilot takes over control.
|
||||
@@ -16591,11 +16586,10 @@ action will be executed.
|
||||
|
||||
### NAV_RCL_ACT (`INT32`) {#NAV_RCL_ACT}
|
||||
|
||||
Set RC loss failsafe mode.
|
||||
Set manual control loss failsafe mode.
|
||||
|
||||
The RC loss failsafe will only be entered after a timeout,
|
||||
set by COM_RC_LOSS_T in seconds. If RC input checks have been disabled
|
||||
by setting the COM_RC_IN_MODE param it will not be triggered.
|
||||
The manual control loss failsafe will only be entered after a timeout,
|
||||
set by COM_RC_LOSS_T in seconds.
|
||||
|
||||
**Values:**
|
||||
|
||||
@@ -16876,7 +16870,7 @@ armed.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1 | 0.01 | 0.055 | % |
|
||||
| | 0 | 1 | 0.01 | 0.055 | norm |
|
||||
|
||||
### DSHOT_TEL_CFG (`INT32`) {#DSHOT_TEL_CFG}
|
||||
|
||||
@@ -19929,7 +19923,7 @@ Yaw behaviour during orbit flight.
|
||||
- `1`: Hold Initial Heading
|
||||
- `2`: Uncontrolled
|
||||
- `3`: Hold Front Tangent to Circle
|
||||
- `4`: RC Controlled
|
||||
- `4`: Manually (yaw stick) Controlled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -20268,6 +20262,7 @@ Modes 1 and 2 require each F9P UART1 to be connected to the Autopilot. In additi
|
||||
F9P units are connected to each other.
|
||||
Modes 3 and 4 only require UART1 on each F9P connected to the Autopilot or Can Node. UART RX DMA is required.
|
||||
RTK is still possible with this setup.
|
||||
Mode 6 is intended for use with a ground control station (not necessarily an RTK correction base).
|
||||
|
||||
**Values:**
|
||||
|
||||
@@ -20277,6 +20272,7 @@ RTK is still possible with this setup.
|
||||
- `3`: Heading (Rover With Moving Base UART1 Connected to Autopilot Or Can Node At 921600)
|
||||
- `4`: Moving Base (Moving Base UART1 Connected to Autopilot Or Can Node At 921600)
|
||||
- `5`: Rover with Static Base on UART2 (similar to Default, except coming in on UART2)
|
||||
- `6`: Ground Control Station (UART2 outputs NMEA)
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -29542,6 +29538,16 @@ Distance from the center of the right wheel to the center of the left wheel.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 100 | 0.001 | 0 | m |
|
||||
|
||||
### RD_YAW_STK_GAIN (`FLOAT`) {#RD_YAW_STK_GAIN}
|
||||
|
||||
Yaw stick gain for Manual mode.
|
||||
|
||||
Assign value <1.0 to decrease stick response for yaw control.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0.1 | 1 | 0.01 | 1 |
|
||||
|
||||
## Rover Mecanum
|
||||
|
||||
### RM_COURSE_CTL_TH (`FLOAT`) {#RM_COURSE_CTL_TH}
|
||||
@@ -29567,6 +29573,16 @@ Distance from the center of the right wheel to the center of the left wheel.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 100 | 0.001 | 0 | m |
|
||||
|
||||
### RM_YAW_STK_GAIN (`FLOAT`) {#RM_YAW_STK_GAIN}
|
||||
|
||||
Yaw stick gain for Manual mode.
|
||||
|
||||
Assign value <1.0 to decrease stick response for yaw control.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0.1 | 1 | 0.01 | 1 |
|
||||
|
||||
## Rover Rate Control
|
||||
|
||||
### RO_YAW_ACCEL_LIM (`FLOAT`) {#RO_YAW_ACCEL_LIM}
|
||||
@@ -29591,6 +29607,18 @@ Set to -1 to disable.
|
||||
| ------ | -------- | -------- | --------- | ------- | ------- |
|
||||
| | -1 | 10000 | 0.01 | -1. | deg/s^2 |
|
||||
|
||||
### RO_YAW_EXPO (`FLOAT`) {#RO_YAW_EXPO}
|
||||
|
||||
Yaw rate expo factor.
|
||||
|
||||
Exponential factor for tuning the input curve shape.
|
||||
0 Purely linear input curve
|
||||
1 Purely cubic input curve
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1 | | 0. |
|
||||
|
||||
### RO_YAW_RATE_CORR (`FLOAT`) {#RO_YAW_RATE_CORR}
|
||||
|
||||
Yaw rate correction factor.
|
||||
@@ -29651,6 +29679,19 @@ Percentage of stick input range that will be interpreted as zero around the stic
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1 | 0.01 | 0.1 |
|
||||
|
||||
### RO_YAW_SUPEXPO (`FLOAT`) {#RO_YAW_SUPEXPO}
|
||||
|
||||
Yaw rate super expo factor.
|
||||
|
||||
"Superexponential" factor for refining the input curve shape tuned using RO_YAW_EXPO.
|
||||
0 Pure Expo function
|
||||
0.7 reasonable shape enhancement for intuitive stick feel
|
||||
0.95 very strong bent input curve only near maxima have effect
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 0.95 | | 0. |
|
||||
|
||||
## Rover Velocity Control
|
||||
|
||||
### RO_ACCEL_LIM (`FLOAT`) {#RO_ACCEL_LIM}
|
||||
@@ -29838,6 +29879,24 @@ Selects the algorithm used for logfile encryption
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 2 |
|
||||
|
||||
### SDLOG_BACKEND (`INT32`) {#SDLOG_BACKEND}
|
||||
|
||||
Logging Backend (integer bitmask).
|
||||
|
||||
If no logging is set the logger will not be started.
|
||||
Set bits true to enable:
|
||||
0: SD card logging
|
||||
1: Mavlink logging
|
||||
|
||||
**Bitmask:**
|
||||
|
||||
- `0`: SD card logging
|
||||
- `1`: Mavlink logging
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ------- | ---- |
|
||||
| ✓ | 0 | 3 | | 3 |
|
||||
|
||||
### SDLOG_BOOT_BAT (`INT32`) {#SDLOG_BOOT_BAT}
|
||||
|
||||
Battery-only Logging.
|
||||
@@ -29924,10 +29983,12 @@ Logging Mode.
|
||||
|
||||
Determines when to start and stop logging. By default, logging is started
|
||||
when arming the system, and stopped when disarming.
|
||||
Note: The logging start/end points that can be configured here only apply to
|
||||
SD logging. The mavlink backend is started/stopped independently
|
||||
of these points.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `-1`: disabled
|
||||
- `0`: when armed until disarm (default)
|
||||
- `1`: from boot until disarm
|
||||
- `2`: from boot until shutdown
|
||||
@@ -33018,6 +33079,31 @@ The mode will switch from long to short range when the distance is less than the
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 1 | 50 | | 4 | m |
|
||||
|
||||
### SENS_BAHRS_CFG (`INT32`) {#SENS_BAHRS_CFG}
|
||||
|
||||
Serial Configuration for EULER-NAV BAHRS.
|
||||
|
||||
Configure on which serial port to run EULER-NAV BAHRS.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `6`: UART 6
|
||||
- `101`: TELEM 1
|
||||
- `102`: TELEM 2
|
||||
- `103`: TELEM 3
|
||||
- `104`: TELEM/SERIAL 4
|
||||
- `201`: GPS 1
|
||||
- `202`: GPS 2
|
||||
- `203`: GPS 3
|
||||
- `300`: Radio Controller
|
||||
- `301`: Wifi Port
|
||||
- `401`: EXT2
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ------- | ---- |
|
||||
| ✓ | | | | 0 |
|
||||
|
||||
### SENS_BARO_QNH (`FLOAT`) {#SENS_BARO_QNH}
|
||||
|
||||
QNH for barometer.
|
||||
@@ -35562,6 +35648,86 @@ Note: certain drivers such as the GPS can determine the Baudrate automatically.
|
||||
| ------- | -------- | -------- | --------- | ------- | ---- |
|
||||
| ✓ | | | | 1 |
|
||||
|
||||
## Simulation
|
||||
|
||||
### SIM_GZ_EN_ASPD (`INT32`) {#SIM_GZ_EN_ASPD}
|
||||
|
||||
Enable airspeed sensor in Gazebo bridge.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Enabled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
### SIM_GZ_EN_BARO (`INT32`) {#SIM_GZ_EN_BARO}
|
||||
|
||||
Enable barometer/air pressure sensor in Gazebo bridge.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Enabled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
### SIM_GZ_EN_FLOW (`INT32`) {#SIM_GZ_EN_FLOW}
|
||||
|
||||
Enable optical flow sensor in Gazebo bridge.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Enabled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
### SIM_GZ_EN_GPS (`INT32`) {#SIM_GZ_EN_GPS}
|
||||
|
||||
Enable GPS/NavSat sensor in Gazebo bridge.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Enabled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
### SIM_GZ_EN_LIDAR (`INT32`) {#SIM_GZ_EN_LIDAR}
|
||||
|
||||
Enable laser/lidar sensors in Gazebo bridge.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Enabled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
### SIM_GZ_EN_ODOM (`INT32`) {#SIM_GZ_EN_ODOM}
|
||||
|
||||
Enable odometry in Gazebo bridge.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Enabled
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
## Simulation In Hardware
|
||||
|
||||
### SIH_DISTSNSR_MAX (`FLOAT`) {#SIH_DISTSNSR_MAX}
|
||||
@@ -41075,3 +41241,11 @@ SPC_VEHICLE_RESP.
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0.5 |
|
||||
|
||||
### ZENOH_DOMAIN_ID (`INT32`) {#ZENOH_DOMAIN_ID}
|
||||
|
||||
ROS2 RMW_ZENOH_CPP Domain id.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 232 | | 0 |
|
||||
|
||||
@@ -628,7 +628,16 @@ div.frame_variant td, div.frame_variant th {
|
||||
### Free-Flyer
|
||||
|
||||
<div class="frame_common">
|
||||
<img src="../../assets/airframes/types/AirframeUnknown.svg"/>
|
||||
<img src="../../assets/airframes/types/FreeFlyer.svg"/>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Common Outputs</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><ul><li><b>Motor1</b>: back left thruster, +x thrust</li><li><b>Motor2</b>: front left thruster, -x thrust</li><li><b>Motor3</b>: back right thruster, +x thrust</li><li><b>Motor4</b>: front right thruster, -x thrust</li><li><b>Motor5</b>: front left thruster, +y thrust</li><li><b>Motor6</b>: front right thruster, -y thrust</li><li><b>Motor7</b>: back left thruster, +y thrust</li><li><b>Motor8</b>: back right thruster, -y thrust</li></ul></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>
|
||||
|
||||
<div class="frame_variant">
|
||||
@@ -638,7 +647,7 @@ div.frame_variant td, div.frame_variant th {
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="spacecraft_free-flyer_kth-atmos">
|
||||
<td>KTH-ATMOS</td>
|
||||
<td><a href="https://atmos.discower.io">KTH-ATMOS</a></td>
|
||||
<td>Maintainer: DISCOWER<p><code>SYS_AUTOSTART</code> = 70000</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -290,7 +290,7 @@ If you're using [DroneCAN ESC](../peripherals/esc_motors.md#dronecan) the contro
|
||||
### Flight Controller Power
|
||||
|
||||
Pixhawk FCs require a regulated power supply that can supply at around 5V/3A continuous (check your specific FC)!
|
||||
This is sufficient to power the controller itself and a few low-power peripherals, such as a GNSS module, RC transmitter, and low power telemetry radio, but not for motors, actuators, and other peripherals.
|
||||
This is sufficient to power the controller itself and a few low-power peripherals, such as a GNSS module, RC receiver, and low power telemetry radio, but not for motors, actuators, and other peripherals.
|
||||
|
||||
[Power modules](../power_module/index.md) are commonly used to "split off" this regulated power supply for the FC and also to provide measurements of the battery voltage and total current to the whole system — which PX4 can use to estimate power levels.
|
||||
The power module is connected to the FC power port, which is normally labeled `POWER` (or `POWER 1` or `POWER 2` for FCs that have redundant power supply).
|
||||
|
||||
@@ -13,9 +13,9 @@ The first executed file is the [init.d/rcS](https://github.com/PX4/PX4-Autopilot
|
||||
|
||||
The following sections are split according to the operating system that PX4 runs on.
|
||||
|
||||
## Posix (Linux/MacOS)
|
||||
## POSIX (Linux/MacOS)
|
||||
|
||||
On Posix, the system shell is used as script interpreter (e.g. /bin/sh, being symlinked to dash on Ubuntu).
|
||||
On POSIX, the system shell is used as script interpreter (e.g. /bin/sh, being symlinked to dash on Ubuntu).
|
||||
For that to work, a few things are required:
|
||||
|
||||
- PX4 modules need to look like individual executables to the system.
|
||||
@@ -54,7 +54,7 @@ cd <PX4-Autopilot>/build/px4_sitl_default/bin
|
||||
### Dynamic Modules
|
||||
|
||||
Normally, all modules are compiled into a single PX4 executable.
|
||||
However, on Posix, there's the option of compiling a module into a separate file, which can be loaded into PX4 using the `dyn` command.
|
||||
However, on POSIX, there's the option of compiling a module into a separate file, which can be loaded into PX4 using the `dyn` command.
|
||||
|
||||
```sh
|
||||
dyn ./test.px4mod
|
||||
@@ -90,6 +90,8 @@ This is documented below.
|
||||
The best way to customize the system startup is to introduce a [new frame configuration](../dev_airframes/adding_a_new_frame.md).
|
||||
The frame configuration file can be included in the firmware or on an SD Card.
|
||||
|
||||
#### Dynamic Customization
|
||||
|
||||
If you only need to "tweak" the existing configuration, such as starting one more application or setting the value of a few parameters, you can specify these by creating two files in the `/etc/` directory of the SD Card:
|
||||
|
||||
- [/etc/config.txt](#customizing-the-configuration-config-txt): modify parameter values
|
||||
@@ -106,7 +108,7 @@ If editing on Windows use a suitable editor.
|
||||
These files are referenced in PX4 code as `/fs/microsd/etc/config.txt` and `/fs/microsd/etc/extras.txt`, where the root folder of the microsd card is identified by the path `/fs/microsd`.
|
||||
:::
|
||||
|
||||
#### Customizing the Configuration (config.txt)
|
||||
##### Customizing the Configuration (config.txt)
|
||||
|
||||
The `config.txt` file can be used to modify parameters.
|
||||
It is loaded after the main system has been configured and _before_ it is booted.
|
||||
@@ -118,7 +120,7 @@ param set-default PWM_MAIN_DIS3 1000
|
||||
param set-default PWM_MAIN_MIN3 1120
|
||||
```
|
||||
|
||||
#### Starting Additional Applications (extras.txt)
|
||||
##### Starting Additional Applications (extras.txt)
|
||||
|
||||
The `extras.txt` can be used to start additional applications after the main system boot.
|
||||
Typically these would be payload controllers or similar optional custom components.
|
||||
@@ -145,3 +147,37 @@ The following example shows how to start custom applications:
|
||||
|
||||
mandatory_app start # Will abort boot if mandatory_app is unknown or fails
|
||||
```
|
||||
|
||||
#### Additional Init-File Customization
|
||||
|
||||
In rare cases where the desired setup cannot be achieved through frame configuration or dynamic customization, you can add a script that will be compiled into the binary for a particular `make` target build variant.
|
||||
|
||||
::: warning
|
||||
In almost all cases, you should use a frame configuration.
|
||||
This method should only be used for edge-cases such as customizing `cannode` based boards.
|
||||
:::
|
||||
|
||||
The steps are:
|
||||
|
||||
- Add a new init script in `boards/<vendor>/<board>/init` that will run during board startup.
|
||||
For example:
|
||||
|
||||
```sh
|
||||
# File: boards/<vendor>/<board>/init/rc.additional
|
||||
param set-default <param> <value>
|
||||
```
|
||||
|
||||
- Add a new board variant in `boards/<vendor>/<board>/<variant>.px4board` that includes the additional script.
|
||||
For example:
|
||||
|
||||
```sh
|
||||
# File: boards/<vendor>/<board>/var.px4board
|
||||
CONFIG_BOARD_ADDITIONAL_INIT="rc.additional"
|
||||
```
|
||||
|
||||
- Compile the firmware with your new variant by appending the variant name to the compile target.
|
||||
For example:
|
||||
|
||||
```sh
|
||||
make <target>_var
|
||||
```
|
||||
|
||||
@@ -206,23 +206,13 @@ The relevant parameters shown below.
|
||||
|
||||
### Position Loss Failsafe Action
|
||||
|
||||
The failure action is controlled by [COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL), based on whether RC control is assumed to be available (and altitude information):
|
||||
|
||||
- `0`: Remote control available.
|
||||
Switch to _Altitude mode_ if a height estimate is available, otherwise _Stabilized mode_.
|
||||
- `1`: Remote control _not_ available.
|
||||
Switch to _Descend mode_ if a height estimate is available, otherwise enter flight termination.
|
||||
_Descend mode_ is a landing mode that does not require a position estimate.
|
||||
|
||||
Multicopters will switch to [Altitude mode](../flight_modes_mc/altitude.md) if a height estimate is available, otherwise [Stabilized mode](../flight_modes_mc/manual_stabilized.md).
|
||||
|
||||
Fixed-wing planes, and VTOLs not configured to land in hover ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)), have a parameter ([FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT)) that defines how long they will loiter (circle with a constant roll angle ([FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R)) at the current altitude) after losing position before attempting to land.
|
||||
If VTOLs have are configured to switch to hover for landing ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)) then they will first transition and then descend.
|
||||
|
||||
The relevant parameters for all vehicles shown below.
|
||||
|
||||
| Parameter | Description |
|
||||
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_POSCTL_NAVL"></a>[COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL) | Position control navigation loss response during mission. Values: `0` - assume use of RC, `1` - Assume no RC. |
|
||||
|
||||
Parameters that only affect Fixed-wing vehicles:
|
||||
|
||||
| Parameter | Description |
|
||||
|
||||
@@ -26,10 +26,18 @@
|
||||
|
||||
That is the minimum setup to use the rover in [Manual mode](../flight_modes_rover/manual.md#manual-mode).
|
||||
|
||||
::: info
|
||||
The rest of the tuning on this page is not mandatory for [Manual mode](../flight_modes_rover/manual.md#manual-mode), but it will have an effect on the behaviour of the rover.
|
||||
:::
|
||||
|
||||
::: warning
|
||||
Do not skip the rest of this setup if you intend to use more sophisticated modes!
|
||||
All parameters will be mandatory for all subsequent modes, except those tagged as `(Optional)`.
|
||||
:::
|
||||
|
||||
## Geometric Parameters
|
||||
|
||||
Manual mode is also affected by (optional) acceleration/deceleration limits set using the geometric described below.
|
||||
These limits are mandatory for all other modes.
|
||||
First, we set up the geometric parameters of the rover:
|
||||
|
||||

|
||||
|
||||
@@ -41,7 +49,7 @@ Navigate to [Parameters](../advanced_config/parameters.md) in QGroundControl and
|
||||
2. [RA_MAX_STR_ANG](#RA_MAX_STR_ANG) [deg]: Measure the maximum steering angle.
|
||||
3. (Optional) [RA_STR_RATE_LIM](#RA_STR_RATE_LIM) [deg/s]: Maximum steering rate you want to allow for your rover.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
This value depends on your rover and use case.
|
||||
For bigger rovers there might be a mechanical limit that is easy to identify by steering the rover at a standstill and increasing
|
||||
[RA_STR_RATE_LIM](#RA_STR_RATE_LIM) until you observe the steering rate to no longer be limited by the parameter.
|
||||
@@ -49,7 +57,7 @@ Navigate to [Parameters](../advanced_config/parameters.md) in QGroundControl and
|
||||
Increase the parameter until you reach the maximum steering rate you are comfortable with.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
A low maximum steering rate makes the rover worse at tracking steering setpoints, which can lead to a poor performance in the subsequent modes.
|
||||
:::
|
||||
|
||||
@@ -79,14 +87,12 @@ Navigate to [Parameters](../advanced_config/parameters.md) in QGroundControl and
|
||||
This may or may not be appropriate for your vehicle and use case.
|
||||
|
||||
One approach to determine an appropriate value is:
|
||||
|
||||
1. From a standstill, give the rover full throttle until it reaches the maximum speed.
|
||||
2. Disarm the rover and plot the `measured_speed_body_x` from [RoverVelocityStatus](../msg_docs/RoverVelocityStatus.md).
|
||||
3. Divide the maximum speed by the time it took to reach it and set this as the value for [RO_ACCEL_LIM](#RO_ACCEL_LIM).
|
||||
|
||||
Some RC rovers have enough torque to lift up if the maximum acceleration is not limited.
|
||||
If that is the case:
|
||||
|
||||
1. Set [RO_ACCEL_LIM](#RO_ACCEL_LIM) to a low value, give the rover full throttle from a standstill and observe its behaviour.
|
||||
2. Increase [RO_ACCEL_LIM](#RO_ACCEL_LIM) until the rover starts to lift up during the acceleration.
|
||||
3. Set [RO_ACCEL_LIM](#RO_ACCEL_LIM) to the highest value that does not cause the rover to lift up.
|
||||
@@ -102,6 +108,39 @@ Navigate to [Parameters](../advanced_config/parameters.md) in QGroundControl and
|
||||
This parameter is also used for the calculation of the speed setpoint in modes that are [position controlled](position_tuning.md).
|
||||
:::
|
||||
|
||||
## (Optional) Stick Input Mapping
|
||||
|
||||
Input shaping can be used to adjust the default linear mapping from stick inputs $\in [-1, 1]$ to normalized setpoints $\in [-1, 1]$. Applying this specifically to the steering input, can provide a smoother driving experience, by enabling the user to make small adjustments when the stick is close to the center, but still send large inputs when moving them to the edges.
|
||||
We provide this input shaping through the super exponential function:
|
||||
|
||||
$$
|
||||
\delta = \frac{(f \cdot x^3 + x(1-f)) \cdot (1-g)}{1-g \cdot |x|}
|
||||
$$
|
||||
|
||||
with:
|
||||
|
||||
- $\delta \in [-1, 1]=$ Normalized steering setpoint.
|
||||
- $x \in [-1, 1]=$ Normalized stick input.
|
||||
- $f=$ [RO_YAW_EXPO](#RO_YAW_EXPO): `0` Purely linear input curve, `1` Purely cubic input curve.
|
||||
- $g=$ [RO_YAW_SUPEXPO](#RO_YAW_SUPEXPO): `0` Pure Expo function, `0.7` reasonable shape enhancement for intuitive stick feel, `0.95` very strong bent input curve only near maxima have effect.
|
||||
|
||||
In [Manual mode](../flight_modes_rover/manual.md#manual-mode) we can additionally scale $\delta$ with an additional parameter $r$:
|
||||
|
||||
- Differential Rover: $r=$ [RD_YAW_STK_GAIN](#RD_YAW_STK_GAIN), which enables adjusting the slope of the input mapping. This leads to a normalized steering input $\hat{\delta} = \delta \cdot r \in$ [-[RD_YAW_STK_GAIN](#RD_YAW_STK_GAIN), [RD_YAW_STK_GAIN](#RD_YAW_STK_GAIN)].
|
||||
- Mecanum Rover: $r=$ [RM_YAW_STK_GAIN](#RM_YAW_STK_GAIN), which enables adjusting the slope of the input mapping. This leads to a normalized steering input $\hat{\delta} = \delta \cdot r \in$ [-[RM_YAW_STK_GAIN](#RM_YAW_STK_GAIN), [RM_YAW_STK_GAIN](#RM_YAW_STK_GAIN)].
|
||||
|
||||
This scaling is useful to limit the normalized steering setpoint, if it is too aggresive for your rover in manual mode.
|
||||
|
||||
You can experiment with the relationships graphically using the [PX4 SuperExpo Rover calculator](https://www.desmos.com/calculator/gwm8lrlanx).
|
||||
|
||||
::: info
|
||||
In [Acro](../flight_modes_rover/manual.md#acro-mode), [Stabilized](../flight_modes_rover/manual.md#stabilized-mode) and [Position](../flight_modes_rover/manual.md#position-mode) Mode, $\delta$ is instead scaled by $r=$ [RO_YAW_RATE_LIM](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED) for all rovers. This leads to a yaw rate setpoint $\dot{\psi} = \delta \cdot r \in$ [-[RO_YAW_RATE_LIM](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED), [RO_YAW_RATE_LIM](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED)]. This parameter is setup during [rate tuning](rate_tuning.md).
|
||||
:::
|
||||
|
||||
::: info
|
||||
The input shaping through [RO_YAW_EXPO](#RO_YAW_EXPO) and [RO_YAW_SUPEXPO](#RO_YAW_SUPEXPO) applies for all manual modes, while [RD_YAW_STK_GAIN](#RD_YAW_STK_GAIN)/[RM_YAW_STK_GAIN](#RM_YAW_STK_GAIN) only affects full manual mode.
|
||||
:::
|
||||
|
||||
You can now continue the configuration process with [rate tuning](rate_tuning.md).
|
||||
|
||||
## Parameter Overview
|
||||
@@ -111,6 +150,8 @@ You can now continue the configuration process with [rate tuning](rate_tuning.md
|
||||
| <a id="RO_MAX_THR_SPEED"></a>[RO_MAX_THR_SPEED](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED) | Speed the rover drives at maximum throttle | $m/s$ |
|
||||
| <a id="RO_ACCEL_LIM"></a>[RO_ACCEL_LIM](../advanced_config/parameter_reference.md#RO_ACCEL_LIM) | (Optional) Maximum allowed acceleration | $m/s^2$ |
|
||||
| <a id="RO_DECEL_LIM"></a>[RO_DECEL_LIM](../advanced_config/parameter_reference.md#RO_DECEL_LIM) | (Optional) Maximum allowed deceleration | $m/s^2$ |
|
||||
| <a id="RO_YAW_EXPO"></a>[RO_YAW_EXPO](../advanced_config/parameter_reference.md#RO_YAW_EXPO) | (Optional) Yaw rate expo factor | $-$ |
|
||||
| <a id="RO_YAW_SUPEXPO"></a>[RO_YAW_SUPEXPO](../advanced_config/parameter_reference.md#RO_YAW_SUPEXPO) | (Optional) Yaw rate super expo factor | $-$ |
|
||||
|
||||
### Ackermann Specific
|
||||
|
||||
@@ -122,12 +163,14 @@ You can now continue the configuration process with [rate tuning](rate_tuning.md
|
||||
|
||||
### Differential Specific
|
||||
|
||||
| Parameter | Description | Unit |
|
||||
| ----------------------------------------------------------------------------------------------------- | ----------- | ---- |
|
||||
| <a id="RD_WHEEL_TRACK"></a>[RD_WHEEL_TRACK](../advanced_config/parameter_reference.md#RD_WHEEL_TRACK) | Wheel track | m |
|
||||
| Parameter | Description | Unit |
|
||||
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ---- |
|
||||
| <a id="RD_WHEEL_TRACK"></a>[RD_WHEEL_TRACK](../advanced_config/parameter_reference.md#RD_WHEEL_TRACK) | Wheel track | $m$ |
|
||||
| <a id="RD_YAW_STK_GAIN"></a>[RD_YAW_STK_GAIN](../advanced_config/parameter_reference.md#RD_YAW_STK_GAIN) | (Optional) Yaw stick gain for Manual mode | $-$ |
|
||||
|
||||
### Mecanum Specific
|
||||
|
||||
| Parameter | Description | Unit |
|
||||
| ----------------------------------------------------------------------------------------------------- | ----------- | ---- |
|
||||
| <a id="RM_WHEEL_TRACK"></a>[RM_WHEEL_TRACK](../advanced_config/parameter_reference.md#RM_WHEEL_TRACK) | Wheel track | m |
|
||||
| Parameter | Description | Unit |
|
||||
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ---- |
|
||||
| <a id="RM_WHEEL_TRACK"></a>[RM_WHEEL_TRACK](../advanced_config/parameter_reference.md#RM_WHEEL_TRACK) | Wheel track | $m$ |
|
||||
| <a id="RM_YAW_STK_GAIN"></a>[RM_YAW_STK_GAIN](../advanced_config/parameter_reference.md#RM_YAW_STK_GAIN) | (Optional) Yaw stick gain for Manual mode | $-$ |
|
||||
|
||||
@@ -86,7 +86,7 @@ These steps are only necessary if you are tuning/want to unlock the manual [Posi
|
||||
|
||||
The rover is now ready to drive in [Position mode](../flight_modes_rover/manual.md#position-mode) and the configuration can be continued with [position tuning](position_tuning.md).
|
||||
|
||||
## Attitude Controller Structure (Info Only)
|
||||
## Velocity Controller Structure (Info Only)
|
||||
|
||||
This section provides additional information for developers and people with experience in control system design.
|
||||
|
||||
|
||||
@@ -35,14 +35,15 @@ The parameters you are most likely to change are listed below.
|
||||
|
||||
| Parameter | Description |
|
||||
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [SDLOG_MODE](../advanced_config/parameter_reference.md#SDLOG_MODE) | Logging Mode. Defines when logging starts and stops.<br />- `-1`: Logging disabled.<br />- `0`: Log when armed until disarm (default).<br />- `1`: Log from boot until disarm.<br />- `2`: Log from boot until shutdown.<br />- `3`: Log based on the [AUX1 RC channel](../advanced_config/parameter_reference.md#RC_MAP_AUX1).<br />- `4`: Log from first armed until shutdown. |
|
||||
| [SDLOG_MODE](../advanced_config/parameter_reference.md#SDLOG_MODE) | Logging Mode. Defines when logging starts and stops.<br />- `0`: Log when armed until disarm (default).<br />- `1`: Log from boot until disarm.<br />- `2`: Log from boot until shutdown.<br />- `3`: Log based on the [AUX1 RC channel](../advanced_config/parameter_reference.md#RC_MAP_AUX1).<br />- `4`: Log from first armed until shutdown. |
|
||||
| [SDLOG_BACKEND](../advanced_config/parameter_reference.md#SDLOG_BACKEND) | Logging Backend (bitmask). Setting a bit enables the corresponding backend. If no backend is selected, the logger is disabled.<br />- bit `0`: SD card logging.</br >- bit `1`: Mavlink logging.
|
||||
| [SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE) | Logging profile. Use this to enable less common logging/analysis (e.g. for EKF2 replay, high rate logging for PID & filter tuning, thermal temperature calibration). |
|
||||
| [SDLOG_MISSION](../advanced_config/parameter_reference.md#SDLOG_MISSION) | Create very small additional "Mission Log".<br>This log can _not_ be used with [Flight Review](../log/flight_log_analysis.md#flight-review-online-tool), but is useful when you need a small log for geotagging or regulatory compliance. |
|
||||
|
||||
Useful settings for specific cases:
|
||||
|
||||
- Raw sensor data for comparison: [SDLOG_MODE=1](../advanced_config/parameter_reference.md#SDLOG_MODE) and [SDLOG_PROFILE=64](../advanced_config/parameter_reference.md#SDLOG_PROFILE).
|
||||
- Disabling logging altogether: [SDLOG_MODE=`-1`](../advanced_config/parameter_reference.md#SDLOG_MODE)
|
||||
- Disabling logging altogether: [SDLOG_BACKEND=`0`](../advanced_config/parameter_reference.md#SDLOG_BACKEND)
|
||||
|
||||
### Logger module
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ _QGroundControl for Windows_ is additionally required if you need to:
|
||||
Note that you can also use it to monitor a simulation, but you must manually [connect to the simulation running in WSL](#qgroundcontrol-on-windows).
|
||||
|
||||
::: info
|
||||
Connecting to an USB device from within WSL is not natively supported, however it can still be achieved by using the [USBIPD-WIN](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) project. With this you can automatically upload firmware from the command line in WSL using the [`upload`](../dev_setup/building_px4.md#uploading-firmware-flashing-the-board) function.
|
||||
Connecting to an USB device from within WSL is not natively supported, however it can still be achieved by using the [USBIPD-WIN](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) project. With this you can automatically upload firmware from the command line in WSL using the [`upload`](../dev_setup/building_px4.md#uploading-firmware-flashing-the-board) function.
|
||||
:::
|
||||
|
||||
::: info
|
||||
@@ -325,3 +325,9 @@ sudo add-apt-repository ppa:kisak/kisak-mesa
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
### QGroundControl not connecting to PX4 SITL
|
||||
|
||||
- The connection between PX4 SITL on WSL2 and QGroundControl on Windows requires [broadcasting](../simulation/index.md#enable-udp-broadcasting) or [streaming to a specific address](../simulation/index.md#enable-streaming-to-specific-address) to be enabled.
|
||||
Streaming to a specific address should be enabled by default, but is something to check if a connection can't be established.
|
||||
- Network traffic might be blocked by firewall or antivirus on you system.
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
# Accton Godwit G-A1
|
||||
|
||||
:::warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://cubepilot.org/#/home) for hardware support or compliance issues.
|
||||
:::
|
||||
|
||||
The G-A1 is a state-of-the-art flight controller developed derived from the [Pixhawk Autopilot v6X Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-012%20Pixhawk%20Autopilot%20v6X%20Standard.pdf).
|
||||
|
||||
It includes an STM32H753 double-precision floating-point FMU processor and an STM32F103 IO coprocessor, multiple IMUs with 6-axis inertial sensors, two pressure/temperature sensors, and a geomagnetic sensor.
|
||||
It also has independent buses and power supplies, and is designed for safety and rich expansion capabilities.
|
||||
|
||||
With an integrated 10/100M Ethernet Physical Layer (PHY), the G-A1 can also communicate with a mission computer (airborne computer), high-end surveying and mapping cameras, and other UxV-mounted equipment for high-speed communications, meeting the needs of advanced UxV systems.
|
||||
|
||||
:::tip
|
||||
Visit [Accton-IoT Godwit](https://www.accton-iot.com/godwit/) for more information.
|
||||
:::
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Specifications
|
||||
|
||||
### Processor
|
||||
|
||||
- STM32H753IIK (Arm® Cortex®-M7 480MHz)
|
||||
- STM32F103 (Arm® Cortex®-M3, 72MHz)
|
||||
|
||||
### Sensors
|
||||
|
||||
- Bosch BMI088 (vibration isolated)
|
||||
- TDK InvenSense ICM-42688-P x 2 (one vibration isolated)
|
||||
- TDK Barometric Pressure and Temperature Sensor CP-20100 x 2 (one vibration isolated)
|
||||
- PNI RM3100 Geomagnetic Sensor (vibration isolated)
|
||||
|
||||
### Power
|
||||
|
||||
- 4.6V to 5.7V
|
||||
|
||||
### External ports
|
||||
|
||||
- 2 CAN Buses (CAN1 and CAN2)
|
||||
- 3 TELEM Ports (TELEM1, TELEM2 and TELEM3)
|
||||
- 2 GPS Ports (GPS1 with safety switch, LED, buzzer, and GPS2)
|
||||
- 1 PPM IN
|
||||
- 1 SBUS OUT
|
||||
- 2 USB Ports (1 TYPE-C and 1 JST GH1.25)
|
||||
- 1 10/100Base-T Ethernet Port
|
||||
- 1 DSM/SBUS RC
|
||||
- 1 UART 4
|
||||
- 1 AD&IO Port
|
||||
- 2 Debug Ports (1 IO Debug and 1 FMU Debug)
|
||||
- 1 SPI6 Bus
|
||||
- 4 Power Inputs (Power 1, Power 2, Power C1 and Power C2)
|
||||
- 16 PWM Servo Outputs (A1-A8 from FMU and M1-M8 from IO)
|
||||
- Micro SD Socket (supports SD 4.1 & SDIO 4.0 in two databus modes: 1 bit (default) and 4 bits)
|
||||
|
||||
### Size and Dimensions
|
||||
|
||||
- 92.2 (L) x 51.2 (W) x 28.3 (H) mm
|
||||
- 77.6g (carrier board with IMU)
|
||||
|
||||
## Where to Buy
|
||||
|
||||
- [Accton-IoT Godwit](https://www.accton-iot.com/godwit/)
|
||||
- [sales@accton-iot.com](sales@accton-iot.com)
|
||||
|
||||
## Pinout
|
||||
|
||||

|
||||
|
||||
## UART Mapping
|
||||
|
||||
| Serial# | Protocol | Port | Notes |
|
||||
| ------- | --------- | ------ | ---------- |
|
||||
| SERIAL1 | Telem1 | UART7 | /dev/ttyS6 |
|
||||
| SERIAL2 | Telem2 | UART5 | /dev/ttyS4 |
|
||||
| SERIAL3 | GPS1 | USART1 | /dev/ttyS0 |
|
||||
| SERIAL4 | GPS2 | UART8 | /dev/ttyS7 |
|
||||
| SERIAL5 | Telem3 | USART2 | /dev/ttyS1 |
|
||||
| SERIAL6 | UART4 | UART4 | /dev/ttyS3 |
|
||||
| SERIAL7 | FMU Debug | USART3 | |
|
||||
| SERIAL8 | OTG2 | USB | |
|
||||
|
||||
## Wiring Diagram
|
||||
|
||||

|
||||
|
||||
## PWM Output
|
||||
|
||||
PWM M1-M8 (IO Main PWM), A1-A8(FMU PWM).
|
||||
All these 16 support normal PWM output formats.
|
||||
FMU PWM A1-A6 can support DShot and B-Directional DShot.
|
||||
A1-A8(FMU PWM) are grouped as:
|
||||
|
||||
- Group 1: A1, A2, A3, A4
|
||||
- Group 2: A5, A6
|
||||
- Group 3: A7, A8
|
||||
|
||||
The motor and servo system should be connected to these ports according to the order outlined in the fuselage reference for your carrier.
|
||||
|
||||

|
||||
|
||||
## RC Input
|
||||
|
||||
For DSM/SBUS receivers, connect them to the DSM/SBUS interface which provides dedicated 3.3V and 5V power pins respectively, and check above "Pinout" for detailed pin definition.
|
||||
PPM receivers should be connected to the PPM interface. And other RC systems can be connected via other spare telemetry ports.
|
||||
|
||||

|
||||
|
||||
## GPS/Compass
|
||||
|
||||
The Godwit G-A1 has a built-in compass
|
||||
Due to potential interference, the autopilot is usually used with an external I2C compass as part of a GPS/Compass combination.
|
||||
|
||||

|
||||
|
||||
## Power Connection and Battery Monitor
|
||||
|
||||
This universal controller features a CAN PMU module that supports 3 to 14s lithium batteries.
|
||||
To ensure proper connection, attach the module's 6-pin connector to the flight control Power C1 and/or Power C2 interface.
|
||||
|
||||
This universal controller does not provide power to the servos.
|
||||
To power them, an external BEC must be connected to the positive and negative terminals of any A1–A8 or M1–M8 port.
|
||||
|
||||

|
||||
|
||||
## SD Card
|
||||
|
||||
The SD card is NOT included in the package, you need to prepare the SD card and insert it into the slot.
|
||||
|
||||

|
||||
|
||||
## Firmware
|
||||
|
||||
The autopilot is compatible with PX4 firmware. And G-A1 can be detected by QGroundControl automatically. Users can also build it with target "accton-godwit_ga1"
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target, open up the terminal and enter:
|
||||
|
||||
```sh
|
||||
make accton-godwit_ga1
|
||||
```
|
||||
|
||||
## More Information and Support
|
||||
|
||||
- [Accton-IoT Godwit](https://www.accton-iot.com/godwit/)
|
||||
- [sales@accton-iot.com](sales@accton-iot.com)
|
||||
- [support@accton-iot.com](mailto:support@accton-iot.com)
|
||||
@@ -12,6 +12,7 @@ This category includes boards that are not fully compliant with the pixhawk stan
|
||||
|
||||
The boards in this category are:
|
||||
|
||||
- [Accton Godwit GA1](../flight_controller/accton-godwit_ga1.md)
|
||||
- [AirMind MindPX](../flight_controller/mindpx.md)
|
||||
- [AirMind MindRacer](../flight_controller/mindracer.md)
|
||||
- [ARK Electronics ARKV6X](../flight_controller/ark_v6x.md) (and [ARK Electronics Pixhawk Autopilot Bus Carrier](../flight_controller/ark_pab.md))
|
||||
|
||||
@@ -45,6 +45,41 @@ MicroStrain <command> [arguments...]
|
||||
status Driver status
|
||||
```
|
||||
|
||||
## eulernav_bahrs
|
||||
|
||||
Source: [drivers/ins/eulernav_bahrs](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/ins/eulernav_bahrs)
|
||||
|
||||
### Description
|
||||
|
||||
Serial bus driver for the EULER-NAV Baro-Inertial AHRS.
|
||||
|
||||
### Examples
|
||||
|
||||
Attempt to start driver on a specified serial device.
|
||||
|
||||
```
|
||||
eulernav_bahrs start -d /dev/ttyS1
|
||||
```
|
||||
|
||||
Stop driver
|
||||
|
||||
```
|
||||
eulernav_bahrs stop
|
||||
```
|
||||
|
||||
### Usage {#eulernav_bahrs_usage}
|
||||
|
||||
```
|
||||
eulernav_bahrs <command> [arguments...]
|
||||
Commands:
|
||||
start Start driver
|
||||
-d <val> Serial device
|
||||
|
||||
status Print driver status
|
||||
|
||||
stop Stop driver
|
||||
```
|
||||
|
||||
## ilabs
|
||||
|
||||
Source: [drivers/ins/ilabs](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/ins/ilabs)
|
||||
|
||||
@@ -15,25 +15,25 @@ Request are published by `manual_control` and subscribed by the `commander` and
|
||||
# It allows mapping triggers from various external interfaces like RC channels or MAVLink to cause an action.
|
||||
# Request are published by `manual_control` and subscribed by the `commander` and `vtol_att_control` modules.
|
||||
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp # [us] Time since system start
|
||||
|
||||
uint8 action # [@enum ACTION] Requested action
|
||||
uint8 ACTION_DISARM = 0 # Disarm vehicle
|
||||
uint8 ACTION_ARM = 1 # Arm vehicle
|
||||
uint8 ACTION_TOGGLE_ARMING = 2 # Toggle arming
|
||||
uint8 ACTION_UNKILL = 3 # Revert a kill action
|
||||
uint8 ACTION_KILL = 4 # Kill vehicle (instantly stop the motors)
|
||||
uint8 ACTION_SWITCH_MODE = 5 # Switch mode. The target mode is set in the `mode` field.
|
||||
uint8 ACTION_VTOL_TRANSITION_TO_MULTICOPTER = 6 # Transition to hover flight
|
||||
uint8 ACTION_VTOL_TRANSITION_TO_FIXEDWING = 7 # Transition to fast forward flight
|
||||
uint8 ACTION_TERMINATION = 8 # Irreversably output failsafe values on all outputs, trigger parachute
|
||||
uint8 action # [@enum ACTION] Requested action
|
||||
uint8 ACTION_DISARM = 0 # Disarm vehicle
|
||||
uint8 ACTION_ARM = 1 # Arm vehicle
|
||||
uint8 ACTION_TOGGLE_ARMING = 2 # Toggle arming
|
||||
uint8 ACTION_UNKILL = 3 # Revert a kill action
|
||||
uint8 ACTION_KILL = 4 # Kill vehicle (instantly stop the motors)
|
||||
uint8 ACTION_SWITCH_MODE = 5 # Switch mode. The target mode is set in the `mode` field.
|
||||
uint8 ACTION_VTOL_TRANSITION_TO_MULTICOPTER = 6 # Transition to hover flight
|
||||
uint8 ACTION_VTOL_TRANSITION_TO_FIXEDWING = 7 # Transition to fast forward flight
|
||||
uint8 ACTION_TERMINATION = 8 # Irreversibly output failsafe values on all outputs, trigger parachute
|
||||
|
||||
uint8 source # [@enum SOURCE] Request trigger type, such as a switch, button or gesture
|
||||
uint8 SOURCE_STICK_GESTURE = 0 # Triggered by holding the sticks in a certain position
|
||||
uint8 SOURCE_RC_SWITCH = 1 # Triggered by an RC switch moving into a certain position
|
||||
uint8 SOURCE_RC_BUTTON = 2 # Triggered by a momentary button on the RC being pressed or held
|
||||
uint8 SOURCE_RC_MODE_SLOT = 3 # Mode change through the RC mode selection mechanism
|
||||
uint8 source # [@enum SOURCE] Request trigger type, such as a switch, button or gesture
|
||||
uint8 SOURCE_STICK_GESTURE = 0 # Triggered by holding the sticks in a certain position
|
||||
uint8 SOURCE_RC_SWITCH = 1 # Triggered by an RC switch moving into a certain position
|
||||
uint8 SOURCE_RC_BUTTON = 2 # Triggered by a momentary button on the RC being pressed or held
|
||||
uint8 SOURCE_RC_MODE_SLOT = 3 # Mode change through the RC mode selection mechanism
|
||||
|
||||
uint8 mode # Requested mode. Only applies when `action` is `ACTION_SWITCH_MODE`. Values for this field are defined by the `vehicle_status_s::NAVIGATION_STATE_*` enumeration.
|
||||
uint8 mode # Requested mode. Only applies when `action` is `ACTION_SWITCH_MODE`. Values for this field are defined by the `vehicle_status_s::NAVIGATION_STATE_*` enumeration.
|
||||
|
||||
```
|
||||
|
||||
@@ -15,14 +15,14 @@ Published by the vehicle's allocation and consumed by the ESC protocol drivers e
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
|
||||
|
||||
uint16 reversible_flags # Bitset indicating which motors are configured to be reversible
|
||||
uint16 reversible_flags # Bitset indicating which motors are configured to be reversible
|
||||
|
||||
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
|
||||
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101 #
|
||||
|
||||
uint8 NUM_CONTROLS = 12
|
||||
float32[12] control # [@range -1, 1] Normalized thrust. where 1 means maximum positive thrust, -1 maximum negative (if not supported by the output, <0 maps to NaN). NaN maps to disarmed (stop the motors)
|
||||
uint8 NUM_CONTROLS = 12 #
|
||||
float32[12] control # [@range -1, 1] Normalized thrust. where 1 means maximum positive thrust, -1 maximum negative (if not supported by the output, <0 maps to NaN). NaN maps to disarmed (stop the motors)
|
||||
|
||||
```
|
||||
|
||||
@@ -15,10 +15,10 @@ Published by the vehicle's allocation and consumed by the actuator output driver
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
|
||||
|
||||
uint8 NUM_CONTROLS = 8
|
||||
float32[8] control # [@range -1, 1] Normalized output. 1 means maximum positive position. -1 maximum negative position (if not supported by the output, <0 maps to NaN). NaN maps to disarmed.
|
||||
uint8 NUM_CONTROLS = 8 #
|
||||
float32[8] control # [@range -1, 1] Normalized output. 1 means maximum positive position. -1 maximum negative position (if not supported by the output, <0 maps to NaN). NaN maps to disarmed.
|
||||
|
||||
```
|
||||
|
||||
@@ -13,10 +13,10 @@ It is subscribed by the airspeed selector module, which validates the data from
|
||||
# This is published by airspeed sensor drivers, CAN airspeed sensors, simulators.
|
||||
# It is subscribed by the airspeed selector module, which validates the data from multiple sensors and passes on a single estimation to the EKF, controllers and telemetry providers.
|
||||
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp_sample # [us] Timestamp of the raw data
|
||||
float32 indicated_airspeed_m_s # [m/s] Indicated airspeed
|
||||
float32 true_airspeed_m_s # [m/s] True airspeed
|
||||
float32 confidence # [@range 0,1] Confidence value for this sensor
|
||||
uint64 timestamp # [us] Time since system start
|
||||
uint64 timestamp_sample # [us] Timestamp of the raw data
|
||||
float32 indicated_airspeed_m_s # [m/s] Indicated airspeed
|
||||
float32 true_airspeed_m_s # [m/s] True airspeed
|
||||
float32 confidence # [@range 0,1] Confidence value for this sensor
|
||||
|
||||
```
|
||||
|
||||