Browse Source

map adc node to /tmp/devterm_adc

cuu 2 years ago
parent
commit
ec9598f841

+ 1 - 1
Code/thermal_printer/config.h

@@ -119,7 +119,7 @@
 #define KELVIN            1
 #define CELSIUS           0
 
-#define ADC_FILE_PAT "/sys/bus/iio/devices/iio:device*/in_voltage_raw"
+#define ADC_FILE_PAT "/tmp/devterm_adc"
 
 #define HEAT_TIME 100 // heat time + (0-f)*46
 

+ 2 - 0
Code/thermal_printer/usr/local/bin/devterm_socat.sh

@@ -3,3 +3,5 @@
 sleep 4
 chmod 777 /tmp/DEVTERM_PRINTER_IN
 chmod 777 /tmp/DEVTERM_PRINTER_OUT
+
+ln -s /sys/bus/iio/devices/iio\:device*/in_voltage*_raw /tmp/devterm_adc