RFID fix see init.sh

This commit is contained in:
neo 2025-03-07 17:20:29 +01:00
parent b103ec0438
commit be3a965ba3
2 changed files with 12 additions and 2 deletions

View File

@ -66,5 +66,8 @@ wget --continue "https://advdownload.advantech.com/productfile/Downloadfile5/1-2
chmod +x DAQ_Linux_4.0.11.0_64bit.run chmod +x DAQ_Linux_4.0.11.0_64bit.run
sudo ./DAQ_Linux_4.0.11.0_64bit.run sudo ./DAQ_Linux_4.0.11.0_64bit.run
echo "---------- REMOVE BRLTTY THAT CONFLICTS WITH SERIAL TTYUSB PORTS ----------"
sudo apt remove brltty
echo "---------- INIT DONE ----------" echo "---------- INIT DONE ----------"
cd "$here" cd "$here"

View File

@ -1,6 +1,7 @@
import logging import logging
import platform import platform
import sys import sys
import termios
import time import time
import traceback import traceback
from datetime import datetime from datetime import datetime
@ -84,12 +85,18 @@ while True:
print(f"IOError: {io_err}") print(f"IOError: {io_err}")
traceback.print_exc() traceback.print_exc()
connected = False connected = False
clf.close() try:
clf.close()
except termios.error:
pass
except Exception as e: except Exception as e:
print(f"General Exception: {e}") print(f"General Exception: {e}")
traceback.print_exc() traceback.print_exc()
connected = False connected = False
clf.close() try:
clf.close()
except termios.error:
pass
time.sleep(1) time.sleep(1)
print("EXITING") print("EXITING")