diff --git a/Code/thermal_printer/config.h b/Code/thermal_printer/config.h index 714c85e..f2d1868 100644 --- a/Code/thermal_printer/config.h +++ b/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 diff --git a/Code/thermal_printer/usr/local/bin/devterm_socat.sh b/Code/thermal_printer/usr/local/bin/devterm_socat.sh index 2528d45..36e2369 100755 --- a/Code/thermal_printer/usr/local/bin/devterm_socat.sh +++ b/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