Compare commits

..

1 Commits

Author SHA1 Message Date
Daniel Agar e788fe45b6 systemcmds/manual_control: command line stick input for testing 2021-06-02 09:30:22 -04:00
572 changed files with 3829 additions and 14612 deletions
-1
View File
@@ -23,7 +23,6 @@ jobs:
"shellcheck_all",
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
"NO_NINJA_BUILD=1 px4_sitl_default",
"BUILD_MICRORTPS_AGENT=1 px4_sitl_rtps",
"airframe_metadata",
"module_documentation",
"parameters_metadata",
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
- name: Install Python3
run: sudo apt-get install python3 python3-setuptools python3-pip -y
- name: Install tools
run: pip3 install --user mypy types-requests flake8
run: pip3 install --user mypy flake8
- name: Check MAVSDK test scripts with mypy
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
- name: Check MAVSDK test scripts with flake8
+4 -5
View File
@@ -15,11 +15,10 @@ jobs:
fail-fast: false
matrix:
config:
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer", model: "standard_vtol" } # Australia
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "RelWithDebInfo", model: "standard_vtol" } # Australia
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
container:
image: px4io/px4-dev-simulation-focal:2021-04-29
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
-2
View File
@@ -108,5 +108,3 @@ src/systemcmds/topic_listener/listener_generated.cpp
# SITL
dataman
eeprom/
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
-3
View File
@@ -67,6 +67,3 @@
path = src/drivers/uavcan_v1/legacy_data_types
url = https://github.com/PX4/public_regulated_data_types.git
branch = legacy
[submodule "src/lib/crypto/monocypher"]
path = src/lib/crypto/monocypher
url = https://github.com/PX4/Monocypher.git
-10
View File
@@ -51,16 +51,6 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5x_default
px4_fmu-v6x_default:
short: px4_fmu-v6x
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6x_default
px4_fmu-v6x_bootloader:
short: px4_fmu-v6x_bootloader
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6x_bootloader
airmind_mindpx-v2_default:
short: airmind_mindpx-v2
buildType: MinSizeRel
+1 -6
View File
@@ -63,7 +63,7 @@ all: px4_sitl_default
space := $(subst ,, )
define make_list
$(shell [ -f .github/workflows/compile_${1}.yml ] && cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
endef
# Parsing
@@ -165,11 +165,6 @@ ifdef PYTHON_EXECUTABLE
CMAKE_ARGS += -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
endif
# Check if the microRTPS agent is to be built
ifdef BUILD_MICRORTPS_AGENT
CMAKE_ARGS += -DBUILD_MICRORTPS_AGENT=ON
endif
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
@@ -0,0 +1,8 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (RTPS)
#
# @type Quadrotor Wide
#
. ${R}etc/init.d-posix/airframes/10016_iris
@@ -0,0 +1,4 @@
#!/bin/sh
# shellcheck disable=SC2154
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
@@ -46,6 +46,8 @@ px4_add_romfs_files(
1014_solo
1015_iris_obs_avoid
1015_iris_obs_avoid.post
1016_iris_rtps
1016_iris_rtps.post
1017_iris_opt_flow_mockup
1018_iris_vision_velocity
1019_iris_dual_gps
-6
View File
@@ -225,12 +225,6 @@ sensors start
commander start
navigator start
# Try to start the micrortps_client with UDP transport if module exists
if px4-micrortps_client status > /dev/null 2>&1
then
# shellcheck disable=SC2154
micrortps_client start -t UDP $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
fi
if param greater -s MNT_MODE_IN -1
then
@@ -71,6 +71,7 @@ param set-default MPC_JERK_AUTO 4
param set-default MPC_LAND_SPEED 1
param set-default MPC_MAN_TILT_MAX 25
param set-default MPC_MAN_Y_MAX 40
param set-default MPC_POS_MODE 3
param set-default MPC_SPOOLUP_TIME 1.5
param set-default MPC_THR_HOVER 0.45
param set-default MPC_TILTMAX_AIR 25
@@ -2,7 +2,7 @@
#
# @name Aion Robotics R1 UGV
#
# @url https://www.aionrobotics.com/r1
# @url http://docs.aionrobotics.com/en/latest/r1-ugv.html
#
# @type Rover
# @class Rover
-4
View File
@@ -226,8 +226,6 @@ then
fi
fi
param set PWM_AUX_OUT ${PWM_AUX_OUT}
if [ $MIXER_AUX != none -a $AUX_MODE = none -a -e $OUTPUT_AUX_DEV ]
then
#
@@ -270,8 +268,6 @@ then
fi
fi
param set PWM_MAIN_OUT ${PWM_OUT}
if [ $EXTRA_MIXER_MODE != none ]
then
+1 -14
View File
@@ -26,12 +26,6 @@ then
batt_smbus start -X
fi
# Start batmon driver if enabled using BATMON_DRIVER_EN
if param compare -s BATMON_DRIVER_EN 1
then
batmon start -X #start on external bus
fi
# Sensors on the PWM interface bank
if param compare -s SENS_EN_LL40LS 1
then
@@ -117,14 +111,7 @@ fi
# ADIS16448 spi external IMU
if param compare -s SENS_EN_ADIS164X 1
then
if param compare -s SENS_OR_ADIS164X 0
then
adis16448 -S start
fi
if param compare -s SENS_OR_ADIS164X 4
then
adis16448 -S start -R 4
fi
adis16448 -S start
fi
# probe for optional external I2C devices
+39 -21
View File
@@ -81,6 +81,33 @@ then
hardfault_log reset
fi
fi
# Prevent MacOS and Ubuntu from creating unnecessary temporary files on the microSD card
# block MacOS Spotlight indexing (.Spotlight-V100 folder)
if [ ! -f "/fs/microsd/.metadata_never_index" ]; then
cat > /fs/microsd/.metadata_never_index
fi
# block MacOS trashes
if [ ! -f "/fs/microsd/.Trashes" ]; then
cat > /fs/microsd/.Trashes
fi
# block MacOS logging of filesystem events
if [ ! -d "/fs/microsd/.fseventsd" ]; then
mkdir /fs/microsd/.fseventsd
fi
if [ ! -f "/fs/microsd/.fseventsd/no_log" ]; then
cat > /fs/microsd/.fseventsd/no_log
fi
# block Ubuntu trash
if [ ! -f "/fs/microsd/.Trash-1000" ]; then
cat > /fs/microsd/.Trash-1000
fi
else
# tune SD_INIT
set STARTUP_TUNE 14 # tune 14 = SD_INIT
@@ -377,30 +404,21 @@ else
if param greater -s TRIG_MODE 0
then
if param compare TRIG_PINS_EX 0
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
if param compare TRIG_PINS 56
then
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
if param compare TRIG_PINS 56
then
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
else
if param compare TRIG_PINS 78
then
# clear pins 7 and 8
set FMU_MODE pwm6
set AUX_MODE pwm6
else
set FMU_MODE none
set AUX_MODE none
fi
fi
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
else
if param compare TRIG_PINS_EX 12288
if param compare TRIG_PINS 78
then
set FMU_MODE pwm12
set AUX_MODE pwm12
# clear pins 7 and 8
set FMU_MODE pwm6
set AUX_MODE pwm6
else
set FMU_MODE none
set AUX_MODE none
fi
fi
@@ -22,5 +22,4 @@ exec find boards msg src platforms test \
-path src/modules/micrortps_bridge/micro-CDR -prune -o \
-path src/modules/micrortps_bridge/microRTPS_client -prune -o \
-path test/mavsdk_tests/catch2 -prune -o \
-path src/lib/crypto/monocypher -prune -o \
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) | grep $PATTERN
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR=$0
if [[ ${SCRIPT_DIR:0:1} != '/' ]]; then
SCRIPT_DIR=$(dirname $(realpath -s "$PWD/$0"))
fi
PX4_DIR=$(cd "$(dirname $(dirname $SCRIPT_DIR))" && pwd)
if [ -d $PX4_DIR/build/*_rtps ]; then
cd $PX4_DIR/build/*_rtps/src/modules/micrortps_bridge/micrortps_agent/
cmake -Bbuild
cmake --build build -j$(nproc --all)
fi
+3 -4
View File
@@ -81,8 +81,7 @@ def sign(bin_file_path, key_file_path=None, generated_key_file=None):
# Align to 4 bytes. Signature always starts at
# 4 byte aligned address, but the signee size
# might not be aligned
if len(signee_bin)%4 != 0:
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
try:
with open(key_file_path,mode='r') as f:
@@ -134,7 +133,7 @@ if(__name__ == "__main__"):
parser.add_argument("signee", help=".bin file to add signature", nargs='?', default=None)
parser.add_argument("signed", help="signed output .bin", nargs='?', default=None)
parser.add_argument("--key", help="key.json file", default="Tools/test_keys/test_keys.json")
parser.add_argument("--key", help="key.json file", default="Tools/test_keys.json")
parser.add_argument("--rdct", help="binary R&D certificate file", default=None)
parser.add_argument("--genkey", help="new generated key", default=None)
args = parser.parse_args()
@@ -153,7 +152,7 @@ if(__name__ == "__main__"):
sys.exit(1)
# Issue a warning when signing with testing key
if args.key=='Tools/test_keys/test_keys.json':
if args.key=='Tools/test_keys.json':
print("WARNING: Signing with PX4 test key")
# Sign the binary
+1 -1
View File
@@ -20,7 +20,7 @@ function spawn_model() {
X=${X:=0.0}
Y=${Y:=$((3*${N}))}
SUPPORTED_MODELS=("iris" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
SUPPORTED_MODELS=("iris" "iris_rtps" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
if [[ " ${SUPPORTED_MODELS[*]} " != *"$MODEL"* ]];
then
echo "ERROR: Currently only vehicle model $MODEL is not supported!"
+12 -27
View File
@@ -12,7 +12,6 @@ import sys, select
import termios
from timeit import default_timer as timer
from argparse import ArgumentParser
import os
try:
from pymavlink import mavutil
@@ -136,20 +135,15 @@ def main():
mav_serialport.write('\n') # make sure the shell is started
# disable echo & avoid buffering on stdin
# setup the console, so we can read one char at a time
fd_in = sys.stdin.fileno()
try:
old_attr = termios.tcgetattr(fd_in)
new_attr = termios.tcgetattr(fd_in)
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
new_attr[3] = new_attr[3] & ~termios.ICANON
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
except termios.error:
# tcgetattr can fail if stdin is not a tty
old_attr = None
ubuf_stdin = os.fdopen(fd_in, 'rb', buffering=0)
old_attr = termios.tcgetattr(fd_in)
new_attr = termios.tcgetattr(fd_in)
new_attr[3] = new_attr[3] & ~termios.ECHO # lflags
new_attr[3] = new_attr[3] & ~termios.ICANON
try:
termios.tcsetattr(fd_in, termios.TCSANOW, new_attr)
cur_line = ''
command_history = []
cur_history_index = 0
@@ -162,19 +156,11 @@ def main():
next_heartbeat_time = timer()
quit_time = None
while quit_time is None or quit_time > timer():
while True:
while True:
i, o, e = select.select([ubuf_stdin], [], [], 0)
i, o, e = select.select([sys.stdin], [], [], 0)
if not i: break
ch = ubuf_stdin.read(1).decode('utf8')
if len(ch) == 0: # EOF
if quit_time is None:
# run a bit longer to read the response (we could also
# read until we get a prompt)
quit_time = timer() + 1
break
ch = sys.stdin.read(1)
# provide a simple shell with command history
if ch == '\n':
@@ -196,8 +182,8 @@ def main():
cur_line = cur_line[:-1]
sys.stdout.write(ch)
elif ord(ch) == 27:
ch = ubuf_stdin.read(1).decode('utf8') # skip one
ch = ubuf_stdin.read(1).decode('utf8')
ch = sys.stdin.read(1) # skip one
ch = sys.stdin.read(1)
if ch == 'A': # arrow up
if cur_history_index > 0:
cur_history_index -= 1
@@ -237,8 +223,7 @@ def main():
mav_serialport.close()
finally:
if old_attr:
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
termios.tcsetattr(fd_in, termios.TCSADRAIN, old_attr)
if __name__ == '__main__':
+1 -1
View File
@@ -6,7 +6,7 @@ import html
class MarkdownTablesOutput():
def __init__(self, groups, board, image_path):
result = ("# Airframes Reference\n"
"> **Note** **This list is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/master/Tools/px4airframes/markdownout.py) from the source code**.\n"
"> **Note** **This list is [auto-generated](https://github.com/PX4/Firmware/edit/master/Tools/px4airframes/markdownout.py) from the source code**.\n"
"> \n"
"> **AUX** channels may not be present on some flight controllers.\n"
"> If present, PWM AUX channels are commonly labelled **AUX OUT**.\n"
+2 -2
View File
@@ -28,7 +28,7 @@ available commands, and in most cases `command help` will print the usage.
Since this is generated from source, errors must be reported/fixed
in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) repository.
The documentation pages can be generated by running the following command from
the root of the PX4-Autopilot directory:
the root of the Firmware directory:
```
make module_documentation
```
@@ -66,7 +66,7 @@ The generated files will be written to the `modules` directory.
result = ''
for module in module_list:
result += "## %s\n" % module.name()
result += "Source: [%s](https://github.com/PX4/PX4-Autopilot/tree/master/src/%s)\n\n" % (module.scope(), module.scope())
result += "Source: [%s](https://github.com/PX4/Firmware/tree/master/src/%s)\n\n" % (module.scope(), module.scope())
doc = module.documentation()
if len(doc) > 0:
result += "%s\n" % doc
-5
View File
@@ -1,5 +0,0 @@
//Public key to verify signed binaries
0x4d, 0xb0, 0xc2, 0x1, 0x5, 0x55, 0x2a, 0x3c,
0xd7, 0xfb, 0xaf, 0x5c, 0xba, 0x7a, 0xb0, 0x81,
0x1b, 0x36, 0x63, 0xdb, 0x28, 0x52, 0x5e, 0xdb,
0x14, 0x36, 0xf2, 0x57, 0x8d, 0x2, 0xb7, 0xfd,
+1 -1
View File
@@ -46,7 +46,6 @@ px4_add_board(
rc_input
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -95,6 +94,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -53,7 +53,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/spi/spi.h>
+3 -4
View File
@@ -12,9 +12,7 @@ px4_add_board(
UAVCAN_INTERFACES 1
DRIVERS
bootloaders
distance_sensor/broadcom/afbrs50
imu/bosch/bmi088
imu/invensense/icm42688p
optical_flow/paw3902
uavcannode
MODULES
@@ -22,13 +20,14 @@ px4_add_board(
load_mon
#sensors
SYSTEMCMDS
mft
mtd
param
perf
reboot
system_time
top
#topic_listener
uorb
topic_listener
ver
work_queue
)
+2 -3
View File
@@ -13,9 +13,7 @@ px4_add_board(
UAVCAN_INTERFACES 1
DRIVERS
bootloaders
distance_sensor/broadcom/afbrs50
imu/bosch/bmi088
imu/invensense/icm42688p
optical_flow/paw3902
uavcannode
MODULES
@@ -23,13 +21,14 @@ px4_add_board(
#load_mon
#sensors
SYSTEMCMDS
mft
mtd
param
#perf
#reboot
#system_time
#top
#topic_listener
#uorb
#ver
#work_queue
)
+3 -9
View File
@@ -4,12 +4,6 @@
#------------------------------------------------------------------------------
# Internal SPI
paw3902 -s start -Y 180
if ! icm42688p -R 0 -s start
then
bmi088 -A -s -R 4 start
bmi088 -G -s -R 4 start
fi
afbrs50 start
paw3902 -s start -Y 90
bmi088 -A -s -R 4 start
bmi088 -G -s -R 4 start
@@ -133,8 +133,8 @@
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1
#define GPIO_SPI2_MISO GPIO_SPI2_MISO_1 /* PB14 */
#define GPIO_SPI2_MOSI GPIO_SPI2_MOSI_1 /* PB15 */
#define GPIO_SPI2_SCK GPIO_SPI2_SCK_1 /* PB10 */
#define GPIO_SPI2_MISO GPIO_SPI2_MISO_1
#define GPIO_SPI2_MOSI GPIO_SPI2_MOSI_1
#define GPIO_SPI2_SCK GPIO_SPI2_SCK_1
#endif /* __ARCH_BOARD_BOARD_H */
@@ -40,4 +40,6 @@
// DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_2 // DMA2, Stream 2, Channel 3
#define DMACHAN_SPI2_RX DMAMAP_SPI2_RX // DMA2, Stream 3, Channel 0
#define DMACHAN_SPI2_TX DMAMAP_SPI2_TX // DMA2, Stream 4, Channel 0
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 5, Channel 3
@@ -144,6 +144,8 @@ CONFIG_STM32_SPI1=y
CONFIG_STM32_SPI1_DMA=y
CONFIG_STM32_SPI1_DMA_BUFFER=1024
CONFIG_STM32_SPI2=y
CONFIG_STM32_SPI2_DMA=y
CONFIG_STM32_SPI2_DMA_BUFFER=1024
CONFIG_STM32_SPI_DMA=y
CONFIG_STM32_TIM8=y
CONFIG_STM32_USART2=y
-7
View File
@@ -56,13 +56,6 @@
#define GPIO_nLED_RED /* PB3 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN3)
#define GPIO_nLED_BLUE /* PA8 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN8)
#define BROADCOM_AFBR_S50_S2PI_SPI_BUS 2
#define BROADCOM_AFBR_S50_S2PI_CS /* PB12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN12)
#define BROADCOM_AFBR_S50_S2PI_IRQ /* PB4 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN4|GPIO_EXTI)
#define BROADCOM_AFBR_S50_S2PI_CLK /* PB10 */ GPIO_SPI2_SCK_1
#define BROADCOM_AFBR_S50_S2PI_MOSI /* PB15 */ GPIO_SPI2_MOSI_1
#define BROADCOM_AFBR_S50_S2PI_MISO /* PB14 */ GPIO_SPI2_MISO_1
#define BOARD_HAS_CONTROL_STATUS_LEDS 1
#define BOARD_OVERLOAD_LED LED_RED
#define BOARD_ARMED_STATE_LED LED_BLUE
-4
View File
@@ -49,7 +49,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
@@ -61,7 +60,6 @@
#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>
#include <drivers/drv_watchdog.h>
#include <systemlib/px4_macros.h>
@@ -89,8 +87,6 @@ __END_DECLS
__EXPORT void stm32_boardinitialize(void)
{
watchdog_init();
// Configure CAN interface
stm32_configgpio(GPIO_CAN1_RX);
stm32_configgpio(GPIO_CAN1_TX);
-1
View File
@@ -39,7 +39,6 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortA, GPIO::Pin15}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
initSPIDevice(DRV_FLOW_DEVTYPE_PAW3902, SPI::CS{GPIO::PortB, GPIO::Pin5}, SPI::DRDY{GPIO::PortB, GPIO::Pin2}),
}),
initSPIBus(SPI::Bus::SPI2, {
-4
View File
@@ -49,7 +49,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
@@ -61,7 +60,6 @@
#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>
#include <drivers/drv_watchdog.h>
#include <systemlib/px4_macros.h>
@@ -84,8 +82,6 @@
__EXPORT void stm32_boardinitialize(void)
{
watchdog_init();
/* configure pins */
const uint32_t gpio[] = PX4_GPIO_INIT_LIST;
px4_gpio_init(gpio, arraySize(gpio));
+1 -1
View File
@@ -54,7 +54,6 @@ px4_add_board(
pwm_out_sim
qshell/posix
rc_input
smart_battery/batmon
#telemetry # all available telemetry drivers
MODULES
airspeed_selector
@@ -97,6 +96,7 @@ px4_add_board(
esc_calib
#hardfault_log
led_control
manual_control
mixer
motor_ramp
motor_test
+1
View File
@@ -76,6 +76,7 @@ px4_add_board(
vtol_att_control
SYSTEMCMDS
led_control
manual_control
mixer
#motor_ramp
motor_test
+1 -1
View File
@@ -53,7 +53,6 @@ px4_add_board(
pwm_out_sim
qshell/posix
rc_input
smart_battery/batmon
#telemetry # all available telemetry drivers
MODULES
airspeed_selector
@@ -95,6 +94,7 @@ px4_add_board(
esc_calib
#hardfault_log
led_control
manual_control
mixer
motor_ramp
motor_test
+1
View File
@@ -76,6 +76,7 @@ px4_add_board(
vtol_att_control
SYSTEMCMDS
led_control
manual_control
mixer
#motor_ramp
motor_test
+1 -1
View File
@@ -45,7 +45,6 @@ px4_add_board(
rc_input
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
#tone_alarm
uavcan
@@ -94,6 +93,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mixer
motor_ramp
motor_test
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+1 -1
View File
@@ -33,7 +33,6 @@ px4_add_board(
magnetometer/hmc5883
pwm_out_sim
rc_input
smart_battery/batmon
#telemetry # all available telemetry drivers
MODULES
airspeed_selector
@@ -76,6 +75,7 @@ px4_add_board(
dyn
esc_calib
led_control
manual_control
mixer
motor_ramp
motor_test
+1
View File
@@ -49,6 +49,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -53,7 +53,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/analog/adc.h>
@@ -286,6 +286,9 @@ Syslink::task_main()
_memory = new SyslinkMemory(this);
_memory->init();
_battery.reset();
// int ret;
/* Open serial port */
@@ -438,7 +441,7 @@ Syslink::handle_message(syslink_message_t *msg)
px4_sem_post(&memory_sem);
} else {
PX4_INFO("GOT %" PRIu8, msg->type);
PX4_INFO("GOT %d", msg->type);
}
//Send queued messages
@@ -606,7 +609,7 @@ Syslink::handle_raw_other(syslink_message_t *sys)
if (c->port == CRTP_PORT_LOG) {
PX4_INFO("Log: %" PRIu8 " %" PRIu8, c->channel, c->data[0]);
PX4_INFO("Log: %d %d", c->channel, c->data[0]);
if (c->channel == 0) { // Table of Contents Access
@@ -629,7 +632,7 @@ Syslink::handle_raw_other(syslink_message_t *sys)
uint8_t cmd = c->data[0];
PX4_INFO("Responding to cmd: %" PRIu8, cmd);
PX4_INFO("Responding to cmd: %d", cmd);
c->data[2] = 0; // Success
c->size = 3 + 1;
@@ -670,7 +673,7 @@ Syslink::handle_raw_other(syslink_message_t *sys)
}
} else {
PX4_INFO("Got raw: %" PRIu8, c->port);
PX4_INFO("Got raw: %d", c->port);
}
}
@@ -769,13 +772,13 @@ void status()
printf("%i: ROM ID: ", i);
for (int idi = 0; idi < idlen; idi++) {
printf("%02" PRIX8, id[idi]);
printf("%02X", id[idi]);
}
deck_descriptor_t desc;
read(deckfd, &desc, sizeof(desc));
printf("HDR:%02" PRIx8 ", VID: %02" PRIx8 " , PID: %02" PRIx8 "\n", desc.header, desc.vendorId, desc.productId);
printf(", VID: %02X , PID: %02X\n", desc.header, desc.vendorId, desc.productId);
// Print pages of memory
for (size_t di = 0; di < sizeof(desc); di++) {
@@ -783,7 +786,7 @@ void status()
printf("\n");
}
printf("%02" PRIX8 " ", ((uint8_t *)&desc)[di]);
printf("%02X ", ((uint8_t *)&desc)[di]);
}
@@ -48,6 +48,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mixer
motor_ramp
motor_test
-1
View File
@@ -53,7 +53,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/analog/adc.h>
-1
View File
@@ -53,7 +53,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/i2c/i2c_master.h>
+1 -1
View File
@@ -52,7 +52,6 @@ px4_add_board(
roboclaw
rpm
safety_button
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -101,6 +100,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-3
View File
@@ -17,8 +17,5 @@ param set-default BAT2_A_PER_V 24
# Enable IMU thermal control
param set-default SENS_EN_THERMAL 1
# Set Camera trigger pins to 13/14
param set-default TRIG_PINS_EX 12288
rgbled_pwm start
safety_button start
+1 -1
View File
@@ -12,7 +12,7 @@ rm3100 -s -b 2 start
# SPI4
bmi088 -s -b 4 -A -R 2 start
if ! bmi088 -s -b 4 -G -R 2 start
if !bmi088 -s -b 4 -G -R 2 start
then
icm42688p -R 2 -s start
fi
-2
View File
@@ -43,8 +43,6 @@
#include "board_config.h"
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/sdio.h>
-1
View File
@@ -41,7 +41,6 @@
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h>
#include <stm32_otg.h>
#include <debug.h>
/************************************************************************************
* Name: stm32_usbsuspend
+1
View File
@@ -101,6 +101,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1 -1
View File
@@ -53,7 +53,6 @@ px4_add_board(
roboclaw
rpm
safety_button
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -102,6 +101,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-4
View File
@@ -17,9 +17,5 @@ param set-default BAT2_A_PER_V 24
# Enable IMU thermal control
param set-default SENS_EN_THERMAL 1
# Set Camera trigger pins to 13/14
param set-default TRIG_PINS_EX 12288
rgbled_pwm start
safety_button start
+1 -1
View File
@@ -15,7 +15,7 @@ rm3100 -s -b 2 start
# SPI4
bmi088 -s -b 4 -A -R 2 start
if ! bmi088 -s -b 4 -G -R 2 start
if !bmi088 -s -b 4 -G -R 2 start
then
icm42688p -R 2 -s start
fi
-2
View File
@@ -43,8 +43,6 @@
#include "board_config.h"
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/sdio.h>
-1
View File
@@ -41,7 +41,6 @@
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h>
#include <stm32_otg.h>
#include <debug.h>
/************************************************************************************
* Name: stm32_usbsuspend
+1
View File
@@ -102,6 +102,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1 -1
View File
@@ -49,7 +49,6 @@ px4_add_board(
px4io
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -98,6 +97,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-2
View File
@@ -43,8 +43,6 @@
#include "board_config.h"
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/sdio.h>
-2
View File
@@ -41,8 +41,6 @@
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h>
#include <stm32_otg.h>
#include <debug.h>
#include <syslog.h>
/************************************************************************************
* Name: stm32_usbsuspend
+1 -1
View File
@@ -49,7 +49,6 @@ px4_add_board(
px4io
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
test_ppm
tone_alarm
@@ -99,6 +98,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1 -1
View File
@@ -47,7 +47,6 @@ px4_add_board(
px4io
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -96,6 +95,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-2
View File
@@ -43,8 +43,6 @@
#include "board_config.h"
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/sdio.h>
-3
View File
@@ -41,9 +41,6 @@
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h>
#include <stm32_otg.h>
#include <debug.h>
#include <syslog.h>
/************************************************************************************
* Name: stm32_usbsuspend
+1 -1
View File
@@ -47,7 +47,6 @@ px4_add_board(
px4io
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
test_ppm
tone_alarm
@@ -97,6 +96,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -51,7 +51,6 @@
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
+1 -1
View File
@@ -33,7 +33,6 @@ px4_add_board(
magnetometer/lsm9ds1_mag
pwm_out_sim
rc_input
smart_battery/batmon
#telemetry # all available telemetry drivers
MODULES
airspeed_selector
@@ -76,6 +75,7 @@ px4_add_board(
dyn
esc_calib
led_control
manual_control
mixer
motor_ramp
motor_test
+1
View File
@@ -24,6 +24,7 @@ px4_add_board(
sensors
SYSTEMCMDS
led_control
manual_control
mft
mtd
param
-1
View File
@@ -49,7 +49,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+9 -9
View File
@@ -65,11 +65,11 @@ using namespace time_literals;
#define NCP5623_LED_OFF 0x00 /**< off */
class RGBLED_NCP5623C : public device::I2C
class RGBLED_NPC5623C : public device::I2C
{
public:
RGBLED_NCP5623C(const int bus, int bus_frequency, const int address);
virtual ~RGBLED_NCP5623C() = default;
RGBLED_NPC5623C(const int bus, int bus_frequency, const int address);
virtual ~RGBLED_NPC5623C() = default;
int init() override;
int probe() override;
@@ -84,13 +84,13 @@ private:
int write(uint8_t reg, uint8_t data);
};
RGBLED_NCP5623C::RGBLED_NCP5623C(const int bus, int bus_frequency, const int address) :
RGBLED_NPC5623C::RGBLED_NPC5623C(const int bus, int bus_frequency, const int address) :
I2C(DRV_LED_DEVTYPE_RGBLED_NCP5623C, MODULE_NAME, bus, address, bus_frequency)
{
}
int
RGBLED_NCP5623C::write(uint8_t reg, uint8_t data)
RGBLED_NPC5623C::write(uint8_t reg, uint8_t data)
{
uint8_t msg[1] = { 0x00 };
msg[0] = ((reg & 0xe0) | (data & 0x1f));
@@ -101,7 +101,7 @@ RGBLED_NCP5623C::write(uint8_t reg, uint8_t data)
}
int
RGBLED_NCP5623C::init()
RGBLED_NPC5623C::init()
{
int ret = I2C::init();
@@ -113,7 +113,7 @@ RGBLED_NCP5623C::init()
}
int
RGBLED_NCP5623C::probe()
RGBLED_NPC5623C::probe()
{
_retries = 4;
@@ -125,7 +125,7 @@ RGBLED_NCP5623C::probe()
* Send RGB PWM settings to LED driver according to current color and brightness
*/
int
RGBLED_NCP5623C::send_led_rgb(uint8_t red, uint8_t green, uint8_t blue)
RGBLED_NPC5623C::send_led_rgb(uint8_t red, uint8_t green, uint8_t blue)
{
uint8_t msg[7] = {0x20, 0x70, 0x40, 0x70, 0x60, 0x70, 0x80};
@@ -139,7 +139,7 @@ RGBLED_NCP5623C::send_led_rgb(uint8_t red, uint8_t green, uint8_t blue)
return transfer(&msg[0], 7, nullptr, 0);
}
static RGBLED_NCP5623C instance(1, 100000, ADDR);
static RGBLED_NPC5623C instance(1, 100000, ADDR);
#define TMR_BASE STM32_TIM1_BASE
#define TMR_FREQUENCY STM32_APB2_TIM1_CLKIN
-1
View File
@@ -53,7 +53,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/i2c/i2c_master.h>
+1 -3
View File
@@ -49,9 +49,7 @@
#include <nuttx/config.h>
#include <board_config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <syslog.h>
#include "systemlib/px4_macros.h"
@@ -138,7 +136,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
}
if (boards_manifest == px4_hw_mft_list_uninitialized) {
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev);
}
}
+1 -1
View File
@@ -47,7 +47,6 @@ px4_add_board(
px4io
roboclaw
rpm
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -96,6 +95,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+2 -4
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2018, 2021 PX4 Development Team. All rights reserved.
* Copyright (c) 2018 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
@@ -49,9 +49,7 @@
#include <nuttx/config.h>
#include <board_config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <syslog.h>
#include "systemlib/px4_macros.h"
@@ -116,7 +114,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
}
if (boards_manifest == px4_hw_mft_list_uninitialized) {
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev);
}
}
+1
View File
@@ -97,6 +97,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+1 -1
View File
@@ -51,7 +51,6 @@ px4_add_board(
roboclaw
rpm
safety_button
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -100,6 +99,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+2 -4
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2018, 2021 PX4 Development Team. All rights reserved.
* Copyright (c) 2018 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
@@ -49,9 +49,7 @@
#include <nuttx/config.h>
#include <board_config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <syslog.h>
#include "systemlib/px4_macros.h"
@@ -164,7 +162,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
}
if (boards_manifest == px4_hw_mft_list_uninitialized) {
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev);
}
}
+1
View File
@@ -101,6 +101,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1 -1
View File
@@ -44,7 +44,6 @@ px4_add_board(
rc_input
roboclaw
rpm
smart_battery/batmon
safety_button
telemetry # all available telemetry drivers
#tone_alarm
@@ -93,6 +92,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1
View File
@@ -92,6 +92,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+2 -4
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2018, 2021 PX4 Development Team. All rights reserved.
* Copyright (c) 2018 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
@@ -49,9 +49,7 @@
#include <nuttx/config.h>
#include <board_config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <syslog.h>
#include "systemlib/px4_macros.h"
@@ -125,7 +123,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
}
if (boards_manifest == px4_hw_mft_list_uninitialized) {
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev);
}
}
+1
View File
@@ -94,6 +94,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1
View File
@@ -97,6 +97,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
@@ -29,7 +29,7 @@ CONFIG_BOARD_LOOPSPERMSEC=95150
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_C99_BOOL8=y
CONFIG_CDCACM=y
CONFIG_CDCACM_PRODUCTID=0xa330
CONFIG_CDCACM_PRODUCTID=0xa32f
CONFIG_CDCACM_PRODUCTSTR="PX4 BL ModalAI FCv2"
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=12000
@@ -44,8 +44,8 @@ CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_C99_BOOL8=y
CONFIG_CDCACM=y
CONFIG_CDCACM_PRODUCTID=0xa330
CONFIG_CDCACM_PRODUCTSTR="PX4 FMU ModalAI FCv2"
CONFIG_CDCACM_PRODUCTID=0xa32f
CONFIG_CDCACM_PRODUCTSTR="PX4 FMU ModalAI FCv1"
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=12000
CONFIG_CDCACM_VENDORID=0x0483
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
+1 -3
View File
@@ -49,9 +49,7 @@
#include <nuttx/config.h>
#include <board_config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <syslog.h>
#include "systemlib/px4_macros.h"
@@ -117,7 +115,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
}
if (boards_manifest == px4_hw_mft_list_uninitialized) {
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev);
}
}
+1
View File
@@ -99,6 +99,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
+1 -1
View File
@@ -48,7 +48,6 @@ px4_add_board(
roboclaw
rpm
safety_button
smart_battery/batmon
telemetry # all available telemetry drivers
tone_alarm
uavcan
@@ -97,6 +96,7 @@ px4_add_board(
hardfault_log
i2cdetect
led_control
manual_control
mft
mixer
motor_ramp
-1
View File
@@ -52,7 +52,6 @@
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/config.h>
#include <nuttx/board.h>

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