bug修复
parent
8b14fda573
commit
22f34524e2
11
server.py
11
server.py
|
|
@ -2,6 +2,7 @@ import socket
|
||||||
import struct
|
import struct
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from tools.common import basedir
|
from tools.common import basedir
|
||||||
|
|
@ -86,4 +87,14 @@ def server():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
select_type = sys.argv[1]
|
||||||
|
if select_type == 'nova':
|
||||||
|
layout = NovaPlus(sys.argv[2], data_limit=800)
|
||||||
|
elif select_type == 'xplus':
|
||||||
|
layout = NovaPlus(sys.argv[2], data_limit=400)
|
||||||
|
else:
|
||||||
|
layout = T7(sys.argv[2], data_limit=1520)
|
||||||
|
outputpath = layout.run()
|
||||||
|
else:
|
||||||
server()
|
server()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from datetime import datetime
|
||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from .common import basedir, log
|
from tools.common import basedir, log
|
||||||
|
|
||||||
|
|
||||||
class AutoLayout:
|
class AutoLayout:
|
||||||
|
|
@ -205,6 +205,7 @@ class AutoLayout:
|
||||||
self.loc_chip_num += 1
|
self.loc_chip_num += 1
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.assign_samples()
|
||||||
try:
|
try:
|
||||||
self.assign_samples()
|
self.assign_samples()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
@ -232,9 +233,10 @@ class AutoLayout:
|
||||||
writer.close()
|
writer.close()
|
||||||
return outputpath
|
return outputpath
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
excel_file = 'example/0704_nova_1.xlsx'
|
excel_file = '../example/t1(1).xlsx'
|
||||||
output_file = ''
|
output_file = ''
|
||||||
layout = AutoLayout(excel_file, output_file, data_limit=800)
|
layout = AutoLayout(excel_file, output_file, data_limit=800)
|
||||||
layout.run()
|
layout.run()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue