浏览代码

Merge remote-tracking branch 'origin/main' into thermal_fix1

cuu 2 年之前
父节点
当前提交
7a6c896cb6
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      Code/thermal_printer/usr/local/bin/devterm_socat.sh

+ 9 - 0
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
+