add name main check
This commit is contained in:
parent
64bd6f79f5
commit
e31ccb1813
|
@ -148,7 +148,9 @@ def delete_file(filename):
|
|||
exit()
|
||||
|
||||
|
||||
if serialport.isOpen():
|
||||
|
||||
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.write("echo on\n".encode())
|
||||
|
||||
|
||||
|
||||
|
||||
serialport.close()
|
||||
serialport.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue