Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: add crsfrc driver to ark flight controllers #23063

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions ROMFS/px4fmu_common/init.d/airframes/4601_droneblocks_dexi_5
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ param set-default MPC_THR_MIN 0.025
param set-default MPC_VEL_MANUAL 5.0
param set-default MPC_XY_VEL_MAX 8.0

param set-default RC_CRSF_INPUT_EN 1
param set-default RC_CRSF_TEL_EN 1

param set-default RTL_RETURN_ALT 15

param set-default SENS_FLOW_MINHGT 0.0
Expand Down
12 changes: 10 additions & 2 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,16 @@ else
#
. ${R}etc/init.d/rc.serial

# Must be started after the serial config is read
rc_input start $RC_INPUT_ARGS
#
# Start the RC input handling
# Note: Must be started after the serial config is read
#
if param compare -s RC_CRSF_INPUT_EN 1
then
crsf_rc start $RC_INPUT_ARGS
else
rc_input start $RC_INPUT_ARGS
fi

#
# Play the startup tune (if not disabled or there is an error)
Expand Down
1 change: 1 addition & 0 deletions boards/ark/fmu-v6x/default.px4board
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CONFIG_DRIVERS_POWER_MONITOR_INA228=y
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
CONFIG_DRIVERS_PWM_OUT=y
CONFIG_DRIVERS_PX4IO=y
CONFIG_DRIVERS_RC_CRSF_RC=y
CONFIG_DRIVERS_RC_INPUT=y
CONFIG_DRIVERS_SAFETY_BUTTON=y
CONFIG_DRIVERS_TONE_ALARM=y
Expand Down
1 change: 1 addition & 0 deletions boards/ark/pi6x/default.px4board
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CONFIG_DRIVERS_MAGNETOMETER_MEMSIC_MMC5983MA=y
CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
CONFIG_DRIVERS_PWM_OUT=y
CONFIG_DRIVERS_RC_CRSF_RC=y
CONFIG_DRIVERS_RC_INPUT=y
CONFIG_DRIVERS_TONE_ALARM=y
CONFIG_DRIVERS_UAVCAN=y
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/rc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ menu "RC"
default n
select DRIVERS_RC_CRSF_RC
---help---
Enable default set of magnetometer drivers
Enable default set of rc drivers
rsource "*/Kconfig"
endmenu
12 changes: 10 additions & 2 deletions src/drivers/rc/crsf_rc/module.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
module_name: CRSF RC Input Driver
serial_config:
- command: "crsf_rc start -d ${SERIAL_DEV}"
- command: set RC_INPUT_ARGS "-d ${SERIAL_DEV}"
port_config_param:
name: RC_CRSF_PRT_CFG
group: Serial
#default: RC
default: RC
#depends_on_port: RC
description_extended: |
Crossfire RC (CRSF) driver.

parameters:
- group: RC
definitions:
RC_CRSF_INPUT_EN:
description:
short: Crossfire enable
long: |
Crossfire Input enable

type: boolean
default: [0]
RC_CRSF_TEL_EN:
description:
short: Crossfire RC telemetry enable
Expand Down