mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 14:47:44 +08:00
rename drivers/px4fmu -> drivers/pwm_out
- split out header
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
# Otherwise, the variable name goes to the end of the argument.
|
||||
#
|
||||
|
||||
set FMU_CMD fmu
|
||||
set OUTPUT_CMD pwm_out
|
||||
set MIXER_AUX_FILE none
|
||||
set OUTPUT_AUX_DEV /dev/pwm_output1
|
||||
set OUTPUT_DEV none
|
||||
@@ -45,16 +45,16 @@ then
|
||||
set OUTPUT_MODE io
|
||||
if param greater DSHOT_CONFIG 0
|
||||
then
|
||||
set FMU_CMD dshot
|
||||
set OUTPUT_CMD dshot
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if param greater DSHOT_CONFIG 0
|
||||
then
|
||||
set OUTPUT_MODE dshot
|
||||
set FMU_CMD dshot
|
||||
set OUTPUT_CMD dshot
|
||||
else
|
||||
set OUTPUT_MODE fmu
|
||||
set OUTPUT_MODE pwm_out
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -91,11 +91,11 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = $FMU_CMD ]
|
||||
if [ $OUTPUT_MODE = $OUTPUT_CMD ]
|
||||
then
|
||||
if ! $FMU_CMD mode_$FMU_MODE
|
||||
if ! $OUTPUT_CMD mode_$FMU_MODE
|
||||
then
|
||||
echo "$FMU_CMD start failed" >> $LOG_FILE
|
||||
echo "$OUTPUT_CMD start failed" >> $LOG_FILE
|
||||
# Error tune.
|
||||
tune_control play -t 2
|
||||
fi
|
||||
@@ -206,7 +206,7 @@ then
|
||||
|
||||
if [ $MIXER_AUX_FILE != none ]
|
||||
then
|
||||
if $FMU_CMD mode_${AUX_MODE}
|
||||
if $OUTPUT_CMD mode_${AUX_MODE}
|
||||
then
|
||||
# Append aux mixer to main device.
|
||||
if param greater SYS_HITL 0
|
||||
@@ -233,14 +233,14 @@ then
|
||||
set FAILSAFE_AUX none
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Could not start: fmu mode_pwm" >> $LOG_FILE
|
||||
echo "ERROR: Could not start: pwm_out mode_pwm" >> $LOG_FILE
|
||||
tune_control play -t 20
|
||||
set PWM_AUX_OUT none
|
||||
set FAILSAFE_AUX none
|
||||
fi
|
||||
|
||||
# for DShot do not configure pwm values
|
||||
if [ $FMU_CMD != dshot ]
|
||||
if [ $OUTPUT_CMD != dshot ]
|
||||
then
|
||||
# Set min / max for aux out and rates.
|
||||
if [ $PWM_AUX_OUT != none ]
|
||||
@@ -322,7 +322,7 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = fmu -o $OUTPUT_MODE = io ]
|
||||
if [ $OUTPUT_MODE = pwm_out -o $OUTPUT_MODE = io ]
|
||||
then
|
||||
if [ $PWM_OUT != none ]
|
||||
then
|
||||
@@ -401,7 +401,7 @@ then
|
||||
pwm failsafe -c 8 -p p:PWM_MAIN_FAIL8
|
||||
fi
|
||||
|
||||
unset FMU_CMD
|
||||
unset OUTPUT_CMD
|
||||
unset MIXER_AUX_FILE
|
||||
unset OUTPUT_AUX_DEV
|
||||
unset OUTPUT_DEV
|
||||
|
||||
@@ -11,8 +11,9 @@ then
|
||||
then
|
||||
# Configure all I2C buses to 100 KHz as they
|
||||
# are all external or slow
|
||||
fmu i2c 1 100000
|
||||
fmu i2c 2 100000
|
||||
# TODO: move this
|
||||
pwm_out i2c 1 100000
|
||||
pwm_out i2c 2 100000
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
# Standard startup script for onboard sensor drivers.
|
||||
#
|
||||
|
||||
# Configure all I2C buses to 100 KHz as they
|
||||
# are all external or slow
|
||||
fmu i2c 1 100000
|
||||
fmu i2c 2 100000
|
||||
|
||||
if ms5611 -s start
|
||||
then
|
||||
fi
|
||||
|
||||
@@ -43,7 +43,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -43,7 +43,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
#pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -12,7 +12,7 @@ px4_add_board(
|
||||
gps
|
||||
imu/mpu9250
|
||||
optical_flow/pmw3901
|
||||
px4fmu
|
||||
pwm_out
|
||||
MODULES
|
||||
attitude_estimator_q
|
||||
#camera_feedback
|
||||
|
||||
@@ -48,7 +48,7 @@ px4_add_board(
|
||||
# pwm_input - Need to create arch/stm32 arch/stm32h7 arch/kinetis and reloacate
|
||||
# all arch dependant code there
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -49,7 +49,7 @@ px4_add_board(
|
||||
# pwm_input - Need to create arch/stm32 arch/stm32h7 arch/kinetis and reloacate
|
||||
# all arch dependant code there
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
#roboclaw
|
||||
#tap_esc
|
||||
|
||||
@@ -24,7 +24,7 @@ px4_add_board(
|
||||
optical_flow/px4flow
|
||||
osd
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
telemetry
|
||||
tone_alarm
|
||||
|
||||
@@ -25,7 +25,7 @@ px4_add_board(
|
||||
#optical_flow/px4flow
|
||||
#protocol_splitter
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
tap_esc
|
||||
#telemetry # all available telemetry drivers
|
||||
|
||||
@@ -25,7 +25,7 @@ px4_add_board(
|
||||
#optical_flow/px4flow
|
||||
protocol_splitter
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
tap_esc
|
||||
#telemetry # all available telemetry drivers
|
||||
|
||||
@@ -42,7 +42,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
#pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -45,7 +45,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
#pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -40,7 +40,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -43,7 +43,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -44,7 +44,7 @@ px4_add_board(
|
||||
power_monitor/ina226
|
||||
#protocol_splitter
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -40,7 +40,7 @@ px4_add_board(
|
||||
optical_flow # all available optical flow drivers
|
||||
# pwm_input - not ptorable
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -39,7 +39,7 @@ px4_add_board(
|
||||
#lights
|
||||
#magnetometer # all available magnetometer drivers
|
||||
#optical_flow # all available optical flow drivers
|
||||
#px4fmu
|
||||
#pwm_out
|
||||
#safety_button
|
||||
#tone_alarm
|
||||
#uavcannode # TODO: CAN driver needed
|
||||
|
||||
@@ -36,7 +36,7 @@ px4_add_board(
|
||||
#pca9685
|
||||
#pwm_input
|
||||
#pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
#tap_esc
|
||||
#telemetry # all available telemetry drivers
|
||||
|
||||
@@ -55,7 +55,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
#pwm_input
|
||||
#pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
#roboclaw
|
||||
#tap_esc
|
||||
|
||||
@@ -33,7 +33,7 @@ px4_add_board(
|
||||
lights/rgbled
|
||||
#magnetometer # all available magnetometer drivers
|
||||
magnetometer/hmc5883
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
#telemetry # all available telemetry drivers
|
||||
telemetry/iridiumsbd
|
||||
|
||||
@@ -50,7 +50,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
#pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
#tap_esc
|
||||
#telemetry # all available telemetry drivers
|
||||
|
||||
@@ -31,7 +31,7 @@ px4_add_board(
|
||||
lights/rgbled
|
||||
magnetometer/hmc5883
|
||||
#optical_flow/px4flow
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
tone_alarm
|
||||
MODULES
|
||||
|
||||
@@ -31,7 +31,7 @@ px4_add_board(
|
||||
lights/rgbled
|
||||
magnetometer/hmc5883
|
||||
optical_flow/px4flow
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
tone_alarm
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
#pwm_input
|
||||
#pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
#roboclaw
|
||||
#tap_esc
|
||||
|
||||
@@ -52,7 +52,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -52,7 +52,7 @@ px4_add_board(
|
||||
protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -48,7 +48,7 @@ px4_add_board(
|
||||
protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -52,7 +52,7 @@ px4_add_board(
|
||||
#lights/rgbled_ncp5623c
|
||||
#magnetometer # all available magnetometer drivers
|
||||
#optical_flow # all available optical flow drivers
|
||||
#px4fmu
|
||||
#pwm_out
|
||||
#safety_button
|
||||
#tone_alarm
|
||||
uavcannode
|
||||
|
||||
@@ -46,7 +46,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -46,7 +46,7 @@ px4_add_board(
|
||||
optical_flow # all available optical flow drivers
|
||||
#pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
#roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -45,7 +45,7 @@ px4_add_board(
|
||||
protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -45,7 +45,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
#roboclaw
|
||||
safety_button
|
||||
|
||||
@@ -48,7 +48,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -48,7 +48,7 @@ px4_add_board(
|
||||
protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
|
||||
@@ -46,7 +46,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -48,7 +48,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -35,7 +35,7 @@ px4_add_board(
|
||||
magnetometer # all available magnetometer drivers
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
safety_button
|
||||
|
||||
@@ -46,7 +46,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -39,7 +39,7 @@ px4_add_board(
|
||||
optical_flow # all available optical flow drivers
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -43,7 +43,7 @@ px4_add_board(
|
||||
optical_flow # all available optical flow drivers
|
||||
#pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
#roboclaw
|
||||
|
||||
@@ -36,7 +36,7 @@ px4_add_board(
|
||||
pca9685
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -46,7 +46,7 @@ px4_add_board(
|
||||
protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -47,7 +47,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
#roboclaw
|
||||
|
||||
@@ -47,7 +47,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -47,7 +47,7 @@ px4_add_board(
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
px4io
|
||||
rc_input
|
||||
roboclaw
|
||||
|
||||
@@ -33,7 +33,7 @@ px4_add_board(
|
||||
pca9685
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
px4fmu
|
||||
pwm_out
|
||||
rc_input
|
||||
tone_alarm
|
||||
uavcan
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
# imu/bmi055
|
||||
# imu/mpu6000
|
||||
# magnetometer/ist8310
|
||||
# px4fmu
|
||||
# pwm_out
|
||||
# px4io
|
||||
# rgbled
|
||||
# MODULES
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015-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
|
||||
@@ -31,11 +31,12 @@
|
||||
#
|
||||
############################################################################
|
||||
px4_add_module(
|
||||
MODULE drivers__px4fmu
|
||||
MAIN fmu
|
||||
MODULE drivers__pwm_out
|
||||
MAIN pwm_out
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
fmu.cpp
|
||||
PWMOut.cpp
|
||||
PWMOut.hpp
|
||||
DEPENDS
|
||||
arch_io_pins
|
||||
mixer
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user