Skip to content

Commit 71499b2

Browse files
committed
WIP: Example config of serial forwarding should go into airframe file
1 parent fc5ad87 commit 71499b2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

boards/auterion/fmu-v6s/init/rc.board_defaults

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,40 @@ time_persistor start
3636

3737
# Start the ESC telemetry
3838
dshot telemetry -d /dev/ttyS5 -x
39+
40+
if param compare -s SER_FWD_PORT 1
41+
then
42+
# GPS1
43+
serial_socat start -p 5760 -d /dev/ttyS6 -b 115200
44+
echo "Fwd: GPS1@115200 <-> 10.41.10.2:5760"
45+
set PRT_GPS1_ 1
46+
param reset SER_FWD_PORT
47+
fi
48+
49+
if param compare -s SER_FWD_PORT 2
50+
then
51+
# TELEM2
52+
serial_socat start -p 5760 -d /dev/ttyS2 -b 115200
53+
echo "Fwd: TELEM2@115200 <-> 10.41.10.2:5760"
54+
set PRT_TEL2_ 1
55+
param reset SER_FWD_PORT
56+
fi
57+
58+
if param compare -s SER_FWD_PORT 3
59+
then
60+
# ESC port, swapped and single wire
61+
serial_socat start -p 5760 -d /dev/ttyS5 -b 115200 -s
62+
echo "Fwd: ESC@115200 <-> 10.41.10.2:5760"
63+
# manually invalidate the dshot telemetry port to avoid conflict
64+
dshot telemetry -d none
65+
param reset SER_FWD_PORT
66+
fi
67+
68+
if param compare -s SER_FWD_PORT 4
69+
then
70+
# RC port, swapped, single wire, and two stop bits
71+
serial_socat start -p 5760 -d /dev/ttyS4 -b 115200 -x -s -2
72+
echo "Fwd: RC@115200 <-> 10.41.10.2:5760"
73+
set PRT_RC_ 1
74+
param reset SER_FWD_PORT
75+
fi

0 commit comments

Comments
 (0)