forked from Archive/PX4-Autopilot
[Kconfig] Move UAVCANv0 num interfaces to Kconfig
This commit is contained in:
parent
16f86a99c2
commit
a0821afafd
|
@ -27,6 +27,7 @@ CONFIG_DRIVERS_SAFETY_BUTTON=y
|
|||
CONFIG_DRIVERS_TELEMETRY=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_UAVCAN_INTERFACES=2
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
|
||||
CONFIG_MODULES_BATTERY_STATUS=y
|
||||
|
|
|
@ -5,7 +5,6 @@ px4_add_board(
|
|||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
ROMFSROOT px4fmu_common
|
||||
UAVCAN_INTERFACES 2
|
||||
SERIAL_PORTS
|
||||
GPS1:/dev/ttyS3
|
||||
TEL1:/dev/ttyS4
|
||||
|
|
|
@ -151,5 +151,17 @@ if(EXISTS ${BOARD_DEFCONFIG})
|
|||
|
||||
list(APPEND config_module_list examples/${example})
|
||||
endif()
|
||||
|
||||
# Find variable name
|
||||
string(REGEX MATCH "^CONFIG_UAVCAN_INTERFACES" UAVCAN_INTERFACES ${NameAndValue})
|
||||
|
||||
# Temporary located here to maintain binary compatibility, have to be removed later
|
||||
if(UAVCAN_INTERFACES)
|
||||
# Find the value
|
||||
string(REPLACE "${Name}=" "" Value ${NameAndValue})
|
||||
|
||||
set(config_uavcan_num_ifaces ${Value} CACHE INTERNAL "UAVCAN interfaces" FORCE)
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endif()
|
||||
|
|
|
@ -223,6 +223,10 @@ menuconfig DRIVERS_UAVCAN
|
|||
---help---
|
||||
Enable support for uavcan
|
||||
|
||||
if DRIVERS_UAVCAN
|
||||
source "src/drivers/uavcan/Kconfig"
|
||||
endif #DRIVERS_UAVCAN
|
||||
|
||||
menuconfig DRIVERS_UAVCAN_V1
|
||||
bool "UAVCANv1"
|
||||
default n
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
menuconfig UAVCAN_INTERFACES
|
||||
int "UAVCANv0 interface count"
|
||||
default 0
|
||||
---help---
|
||||
Interface count for UAVCANv0
|
Loading…
Reference in New Issue