-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uavcannode updates and px4_fmu-v4_cannode example
- drivers/uavcannode add baro, mag, gps publications - delete old px4_cannode-v1 board - add stripped down simple rcS for CAN nodes
- Loading branch information
Showing
54 changed files
with
1,136 additions
and
3,183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
############################################################################ | ||
# | ||
# 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. | ||
# | ||
############################################################################ | ||
|
||
add_subdirectory(init.d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/bin/sh | ||
# Un comment and use set +e to ignore and set -e to enable 'exit on error control' | ||
set +e | ||
# Un comment the line below to help debug scripts by printing a trace of the script commands | ||
#set -x | ||
# PX4FMU startup script. | ||
# | ||
# NOTE: environment variable references: | ||
# If the dollar sign ('$') is followed by a left bracket ('{') then the | ||
# variable name is terminated with the right bracket character ('}'). | ||
# Otherwise, the variable name goes to the end of the argument. | ||
# | ||
# | ||
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS. | ||
# | ||
#------------------------------------------------------------------------------ | ||
|
||
# | ||
# Mount the procfs. | ||
# | ||
mount -t procfs /proc | ||
|
||
# | ||
# Start CDC/ACM serial driver. | ||
# | ||
sercon | ||
|
||
# | ||
# Print full system version. | ||
# | ||
ver all | ||
|
||
# | ||
# Start the ORB (first app to start) | ||
# tone_alarm and tune_control | ||
# is dependent. | ||
# | ||
uorb start | ||
|
||
# | ||
# Set the parameter file if mtd starts successfully. | ||
# | ||
if mtd start | ||
then | ||
set PARAM_FILE /fs/mtd_params | ||
fi | ||
|
||
# | ||
# Load parameters. | ||
# | ||
param select $PARAM_FILE | ||
if ! param load | ||
then | ||
param reset | ||
fi | ||
|
||
# | ||
# Optional board defaults: rc.board_defaults | ||
# | ||
set BOARD_RC_DEFAULTS /etc/init.d/rc.board_defaults | ||
if [ -f $BOARD_RC_DEFAULTS ] | ||
then | ||
echo "Board defaults: ${BOARD_RC_DEFAULTS}" | ||
sh $BOARD_RC_DEFAULTS | ||
fi | ||
unset BOARD_RC_DEFAULTS | ||
|
||
# | ||
# Start system state indicator. | ||
# | ||
rgbled start | ||
rgbled_ncp5623c start | ||
rgbled_pwm start | ||
|
||
if param greater LIGHT_EN_BLINKM 0 | ||
then | ||
if blinkm start | ||
then | ||
blinkm systemstate | ||
fi | ||
fi | ||
|
||
# | ||
# board sensors: rc.sensors | ||
# | ||
set BOARD_RC_SENSORS /etc/init.d/rc.board_sensors | ||
if [ -f $BOARD_RC_SENSORS ] | ||
then | ||
echo "Board sensors: ${BOARD_RC_SENSORS}" | ||
sh $BOARD_RC_SENSORS | ||
fi | ||
unset BOARD_RC_SENSORS | ||
|
||
# | ||
# Start UART/Serial device drivers. | ||
# Note: rc.serial is auto-generated from Tools/serial/generate_config.py | ||
# | ||
sh /etc/init.d/rc.serial | ||
|
||
# Check for flow sensor, launched as a background task to scan | ||
if param compare SENS_EN_PX4FLOW 1 | ||
then | ||
px4flow start & | ||
fi | ||
|
||
uavcannode start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,75 @@ | ||
|
||
|
||
# UAVCAN boot loadable Module ID | ||
set(uavcanblid_sw_version_major 0) | ||
set(uavcanblid_sw_version_minor 1) | ||
add_definitions( | ||
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major} | ||
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor} | ||
) | ||
|
||
set(uavcanblid_hw_version_major 1) | ||
set(uavcanblid_hw_version_minor 0) | ||
set(uavcanblid_name "\"org.nxp.rddrone-uavcan146\"") | ||
|
||
add_definitions( | ||
-DHW_UAVCAN_NAME=${uavcanblid_name} | ||
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major} | ||
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor} | ||
) | ||
|
||
px4_add_board( | ||
PLATFORM nuttx | ||
VENDOR nxp | ||
MODEL rddrone-uavcan146 | ||
LABEL default | ||
TOOLCHAIN arm-none-eabi | ||
ARCHITECTURE cortex-m4 | ||
|
||
ROMFSROOT cannode | ||
UAVCAN_INTERFACES 2 | ||
|
||
DRIVERS | ||
|
||
#adc | ||
#barometer # all available barometer drivers | ||
#bootloaders | ||
#differential_pressure # all available differential pressure drivers | ||
#distance_sensor # all available distance sensor drivers | ||
#dshot | ||
#gps | ||
#imu # all available imu drivers | ||
#lights | ||
#magnetometer # all available magnetometer drivers | ||
#optical_flow # all available optical flow drivers | ||
#px4fmu | ||
#safety_button | ||
#tone_alarm | ||
#uavcannode # TODO: CAN driver needed | ||
MODULES | ||
|
||
#ekf2 | ||
#load_mon | ||
#sensors | ||
#temperature_compensation | ||
SYSTEMCMDS | ||
#bl_update | ||
#dmesg | ||
#dumpfile | ||
#esc_calib | ||
#hardfault_log | ||
i2cdetect | ||
|
||
EXAMPLES | ||
) | ||
#led_control | ||
#mixer | ||
#motor_ramp | ||
#motor_test | ||
#nshterm | ||
#param | ||
#perf | ||
#pwm | ||
reboot | ||
#reflect | ||
#sd_bench | ||
shutdown | ||
#top | ||
#topic_listener | ||
#tune_control | ||
ver | ||
#work_queue | ||
) |
Oops, something went wrong.