From b097b13ba687412b97d2bcd005bc0f11be33de7b Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 26 Dec 2014 18:01:52 +0100 Subject: Companion computer interface: Add SYS_COMPANION parameter. Setting it to 921600 enables the companion interface. --- ROMFS/px4fmu_common/init.d/rcS | 5 ++++- src/modules/systemlib/system_params.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index b0e0c2674..26b729aad 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -434,7 +434,10 @@ then # if ver hwcmp PX4FMU_V2 then - mavlink start -d /dev/ttyS2 -b 230400 -m onboard + if param compare SYS_COMPANION 921600 + then + mavlink start -d /dev/ttyS2 -b 921600 -m onboard + fi fi # UAVCAN diff --git a/src/modules/systemlib/system_params.c b/src/modules/systemlib/system_params.c index 702e435ac..a0988035c 100644 --- a/src/modules/systemlib/system_params.c +++ b/src/modules/systemlib/system_params.c @@ -82,3 +82,17 @@ PARAM_DEFINE_INT32(SYS_USE_IO, 1); * @group System */ PARAM_DEFINE_INT32(SYS_RESTART_TYPE, 2); + +/** +* Companion computer interface +* +* Configures the baud rate of the companion computer interface. +* Set to zero to disable, set to 921600 to enable. +* CURRENTLY ONLY SUPPORTS 921600 BAUD! Use extras.txt for +* other baud rates. +* +* @min 0 +* @max 921600 +* @group System +*/ +PARAM_DEFINE_INT32(SYS_COMPANION, 0); -- cgit v1.2.3