add name main check

This commit is contained in:
interfisch 2024-07-16 22:36:28 +02:00
parent 64bd6f79f5
commit e31ccb1813
1 changed files with 39 additions and 40 deletions

View File

@ -148,6 +148,8 @@ def delete_file(filename):
exit()
if __name__ == "__main__":
if serialport.isOpen():
establish_connection()
@ -159,6 +161,7 @@ if serialport.isOpen():
#Copy all Files
failed=0
for filename in filenames:
@ -180,6 +183,7 @@ if serialport.isOpen():
#Delete all files
'''
log_off()
for filename in filenames:
@ -187,12 +191,7 @@ if serialport.isOpen():
'''
serialport.write("echo on\n".encode())
serialport.close()