From 682c67aabb762ae534b6ad1de0fd579bd5df01cf Mon Sep 17 00:00:00 2001 From: cuu Date: Sun, 22 May 2022 10:20:25 +0800 Subject: [PATCH] update devtem-socat.sh --- Code/thermal_printer/usr/local/bin/devterm_socat.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Code/thermal_printer/usr/local/bin/devterm_socat.sh b/Code/thermal_printer/usr/local/bin/devterm_socat.sh index 36e2369..dbf6988 100755 --- a/Code/thermal_printer/usr/local/bin/devterm_socat.sh +++ b/Code/thermal_printer/usr/local/bin/devterm_socat.sh @@ -1,7 +1,16 @@ #!/bin/bash + sleep 4 chmod 777 /tmp/DEVTERM_PRINTER_IN chmod 777 /tmp/DEVTERM_PRINTER_OUT +DC=`find /sys/bus/iio/devices/iio\:device{0,1} | wc -l` + +if [ "$DC" -gt "1" ]; +then +echo "adc node err" +else ln -s /sys/bus/iio/devices/iio\:device*/in_voltage*_raw /tmp/devterm_adc +fi +