change uart0 to uart2 for telemetry by default (#558)

pull/564/head
cronyx 2022-11-16 23:34:09 +03:00 committed by GitHub
parent d17526065c
commit 19a6727976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 11 deletions

View File

@ -2,15 +2,15 @@
TcpServerPort = 0
[UartEndpoint drone]
Device = /dev/ttyAMA1
Device = /dev/ttyAMA2
Baud = 115200
[UdpEndpoint telemetry_tx]
Mode = Normal
Address = 127.0.0.1
Port = 14600
Port = 14550
[UdpEndpoint telemetry_rx]
Mode = Server
Address = 0.0.0.0
Port = 14601
Port = 14551

View File

@ -83,7 +83,10 @@ case "$1" in
echo "Done."
if [ ${telemetry} = "true" ]; then
devmem 0x120c0010 32 0x1e04
if [ ${chip} = "gk7205v200" ]; then
# UART2_RX mux
devmem 0x120c0010 32 0x1e04
fi
/usr/bin/mavlink-routerd &
/usr/bin/telemetry start
fi

View File

@ -31,7 +31,9 @@ all_other() {
sed -i "s!/usr/bin/mavlink-routerd &!#/usr/bin/mavlink-routerd &!g" /etc/init.d/S97mavlink
# majestic basic settings
${cli} -s .isp.slowShutter disabled
${cli} -s .isp.drc 500
${cli} -s .isp.drc 350
# enable digital image stabilization
# ${cli} -s .isp.dis true
${cli} -s .image.contrast 50
${cli} -s .image.luminance 50
${cli} -s .video0.bitrate 4096
@ -47,7 +49,7 @@ all_other() {
${cli} -s .video0.size 1920x1080
${cli} -s .video0.fps 30
${cli} -s .isp.lowDelay true
# ${cli} -s .video0.sliceUnits: 4
# ${cli} -s .video0.sliceUnits 4
fi
# add outgoing rtp stream to udp
cat >> /etc/majestic.yaml << EOF
@ -62,18 +64,18 @@ EOF
case "$1" in
gk7205v200 | hi3516ev200)
echo "Preparig system tweaks for ${chip}..."
echo "Preparing system tweaks for ${chip}..."
# set osmem
fw_setenv osmem 40M
# change uart1 to uart0
sed -i "s!Device = /dev/ttyAMA1!Device = /dev/ttyAMA0!g" /etc/mavlink.conf
sed -i "s!console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL!#console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL!g" /etc/inittab
# change uart2 to uart0 (uart2 used by default [RX ONLY!] If you need two way, use uart0)
#sed -i "s!Device = /dev/ttyAMA2!Device = /dev/ttyAMA0!g" /etc/mavlink.conf
#sed -i "s!console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL!#console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL!g" /etc/inittab
# remove unneeded to reduce some memory
rm -f /etc/init.d/S60crond /etc/init.d/S49ntpd /etc/init.d/S02klogd
all_other
;;
gk7205v300 | hi3516ev300)
echo "Preparig system tweaks for ${chip}..."
echo "Preparing system tweaks for ${chip}..."
# set sensor config for smtsec board
if [ ${chip} = "gk7205v300" ] && [ ${sensor} = "imx307" ]; then
${cli} -s .isp.sensorConfig /etc/sensors/smtsec_imx307_i2c_4l_1080p.ini