Files
openipc-builder/devices/ssc338q_fpv_openipc-urllc-aio/general/overlay/usr/bin/channels.sh
T

23 lines
381 B
Bash
Executable File

#!/bin/sh
CHANNEL="${1:-}"
VALUE="${2:-}"
[ "$CHANNEL" = "6" ] || exit 0
case "$VALUE" in
''|*[!0-9]*) exit 2 ;;
esac
if [ "$VALUE" -le 1250 ]; then
logger -t channels "AUX2=$VALUE -> management"
exec /usr/bin/link-mode management
fi
if [ "$VALUE" -ge 1350 ]; then
logger -t channels "AUX2=$VALUE -> preflight"
exec /usr/bin/link-mode preflight
fi
exit 0