Skip to content

Commit da513ae

Browse files
authored and
committed
removed the usb-reset recover code
1 parent 59f98bb commit da513ae

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tinyfpga-programmer-gui.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
class ProgrammerHardwareAdapter(object):
3131
def __init__(self, port):
3232
self.port = port
33-
self.bus, self.portnum = [int(x) for x in self.port[2].split('=')[-1].split('-')]
33+
#self.bus, self.portnum = [int(x) for x in self.port[2].split('=')[-1].split('-')]
3434

3535
@staticmethod
3636
def canProgram(port):
@@ -46,12 +46,14 @@ def exitBootloader(self):
4646
pass
4747

4848
def reset(self):
49-
try:
50-
import usb
51-
device = usb.core.find(custom_match = lambda d: d.bus == self.bus and d.port_number == self.portnum)
52-
device.reset()
53-
except:
54-
traceback.print_exc()
49+
# TODO: for now...let's not bother with resetting the port
50+
pass
51+
#try:
52+
# import usb
53+
# device = usb.core.find(custom_match = lambda d: d.bus == self.bus and d.port_number == self.portnum)
54+
# device.reset()
55+
#except:
56+
# traceback.print_exc()
5557

5658

5759
class TinyFPGABSeries(ProgrammerHardwareAdapter):
@@ -276,7 +278,7 @@ def update_serial_port_list_task():
276278
if not program_in_progress:
277279
new_tinyfpga_adapters = dict((adapter.displayName(), adapter) for adapter in [getProgrammerHardwareAdapter(port) for port in comports()] if adapter is not None)
278280
new_tinyfpga_ports = [key for key, value in new_tinyfpga_adapters.iteritems()]
279-
281+
280282
if new_tinyfpga_ports != tinyfpga_ports:
281283
if com_port_sv.get() == "" and len(new_tinyfpga_ports) > 0:
282284
com_port_sv.set(new_tinyfpga_ports[0])

0 commit comments

Comments
 (0)