mirror of https://github.com/OpenIPC/firmware.git
[fpv] adapt system for sigmastar cameras (#1080)
parent
1d090a0912
commit
09e1d6d27c
|
@ -33,8 +33,10 @@ case "$1" in
|
||||||
start)
|
start)
|
||||||
echo "Loading MAVLink telemetry service..."
|
echo "Loading MAVLink telemetry service..."
|
||||||
|
|
||||||
if [ ${router} -eq 1 ] || [ ${fw} = "lte" ] || [ ${unit} = "gs" ]; then
|
if [ ${router} -eq 1 ] || [ ${fw} = "lte" ]; then
|
||||||
|
if ! [ ${unit} = "gs" ]; then
|
||||||
mavlink-routerd -c /etc/mavlink.conf &
|
mavlink-routerd -c /etc/mavlink.conf &
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
mavfwd --channels ${channels} --master ${serial} --baudrate ${baud} --out 127.0.0.1:${port_tx} --in 127.0.0.1:${port_rx} > /dev/null &
|
mavfwd --channels ${channels} --master ${serial} --baudrate ${baud} --out 127.0.0.1:${port_tx} --in 127.0.0.1:${port_rx} > /dev/null &
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -15,8 +15,8 @@ mcs_index=1
|
||||||
stream_rx=16
|
stream_rx=16
|
||||||
stream_tx=144
|
stream_tx=144
|
||||||
link_id=7669206
|
link_id=7669206
|
||||||
port_rx=14651
|
port_rx=14551
|
||||||
port_tx=14650
|
port_tx=14550
|
||||||
fec_k=1
|
fec_k=1
|
||||||
fec_n=2
|
fec_n=2
|
||||||
fec_timeout=0
|
fec_timeout=0
|
||||||
|
|
|
@ -29,6 +29,11 @@ hisi_goke() {
|
||||||
sed -i "s!Isp_FrameRate=25!Isp_FrameRate=30!g" /etc/sensors/smtsec_imx307_i2c_4l_1080p.ini
|
sed -i "s!Isp_FrameRate=25!Isp_FrameRate=30!g" /etc/sensors/smtsec_imx307_i2c_4l_1080p.ini
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sigmastar() {
|
||||||
|
sed -i "s!serial=/dev/ttyAMA0!serial=/dev/ttyS0!g" /etc/telemetry.conf
|
||||||
|
sed -i "s!Device = /dev/ttyAMA0!Device = /dev/ttyS0!g" /etc/mavlink.conf
|
||||||
|
}
|
||||||
|
|
||||||
all_other() {
|
all_other() {
|
||||||
# don't load f2fs module (disabled in kernel)
|
# don't load f2fs module (disabled in kernel)
|
||||||
sed -i "s!f2fs!#f2fs!g" /etc/modules
|
sed -i "s!f2fs!#f2fs!g" /etc/modules
|
||||||
|
@ -47,22 +52,21 @@ all_other() {
|
||||||
cli -s .video0.bitrate 4096
|
cli -s .video0.bitrate 4096
|
||||||
cli -s .video0.codec h264
|
cli -s .video0.codec h264
|
||||||
cli -s .video0.rcMode cbr
|
cli -s .video0.rcMode cbr
|
||||||
cli -s .video0.gopSize 0.2
|
cli -s .video0.gopSize 1
|
||||||
cli -s .hls.enabled false
|
cli -s .hls.enabled false
|
||||||
cli -s .netip.enabled false
|
cli -s .netip.enabled false
|
||||||
cli -s .jpeg.enabled false
|
cli -s .jpeg.enabled false
|
||||||
# lowdelay support only imx307 sensor
|
# lowdelay support only imx307 sensor
|
||||||
if [ ${sensor} = "imx307" ]; then
|
if [ ${sensor} = "imx307" ]; then
|
||||||
cli -s .video0.size 1280x720
|
cli -s .video0.size 1280x720
|
||||||
|
cli -s .video0.gopSize 0.2
|
||||||
# cli -s .video0.fps 30
|
# cli -s .video0.fps 30
|
||||||
cli -s .isp.lowDelay true
|
cli -s .isp.lowDelay true
|
||||||
# cli -s .video0.sliceUnits 4
|
# cli -s .video0.sliceUnits 4
|
||||||
fi
|
fi
|
||||||
# outgoing rtp stream to udp
|
# outgoing rtp stream to udp
|
||||||
cat >> /etc/majestic.yaml << EOF
|
cli -s .outgoing.enabled true
|
||||||
outgoing:
|
cli -s .outgoing.server udp://127.0.0.1:5600
|
||||||
- udp://127.0.0.1:5600
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# tune socket buffer
|
# tune socket buffer
|
||||||
|
@ -70,7 +74,9 @@ cat >> /etc/sysctl.conf << EOF
|
||||||
net.core.rmem_default=524288
|
net.core.rmem_default=524288
|
||||||
net.core.rmem_max=2048000
|
net.core.rmem_max=2048000
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
finish() {
|
||||||
# complete tweaks
|
# complete tweaks
|
||||||
touch /etc/system.ok
|
touch /etc/system.ok
|
||||||
echo "Preparing system done."
|
echo "Preparing system done."
|
||||||
|
@ -102,6 +108,7 @@ case "$1" in
|
||||||
|
|
||||||
hisi_goke
|
hisi_goke
|
||||||
all_other
|
all_other
|
||||||
|
finish
|
||||||
;;
|
;;
|
||||||
gk7205v300 | hi3516ev300)
|
gk7205v300 | hi3516ev300)
|
||||||
echo "Preparing system tweaks for ${chip}..."
|
echo "Preparing system tweaks for ${chip}..."
|
||||||
|
@ -116,6 +123,7 @@ case "$1" in
|
||||||
|
|
||||||
hisi_goke
|
hisi_goke
|
||||||
all_other
|
all_other
|
||||||
|
finish
|
||||||
;;
|
;;
|
||||||
t31l | t31n | t31x | t31zx)
|
t31l | t31n | t31x | t31zx)
|
||||||
echo "Preparing system tweaks for ${chip}..."
|
echo "Preparing system tweaks for ${chip}..."
|
||||||
|
@ -124,10 +132,17 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
hi3536dv100)
|
hi3536dv100)
|
||||||
echo "Preparing system tweaks for ${chip}..."
|
echo "Preparing system tweaks for ${chip}..."
|
||||||
touch /etc/system.ok
|
|
||||||
echo "Preparing system done."
|
finish
|
||||||
|
;;
|
||||||
|
ssc33x)
|
||||||
|
echo "Preparing system tweaks for ${chip}..."
|
||||||
|
|
||||||
|
sigmastar
|
||||||
|
all_other
|
||||||
|
finish
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {gk7205v200|gk7205v210|gk7205v300|hi3516ev200|hi3516ev300|t31l|t31n|t31x|t31zx|hi3536dv100}"
|
echo "Usage: $0 {gk7205v200|gk7205v210|gk7205v300|hi3516ev200|hi3516ev300|t31l|t31n|t31x|t31zx|hi3536dv100|ssc33x}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue