File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 30
30
class ProgrammerHardwareAdapter (object ):
31
31
def __init__ (self , port ):
32
32
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('-')]
34
34
35
35
@staticmethod
36
36
def canProgram (port ):
@@ -46,12 +46,14 @@ def exitBootloader(self):
46
46
pass
47
47
48
48
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()
55
57
56
58
57
59
class TinyFPGABSeries (ProgrammerHardwareAdapter ):
@@ -276,7 +278,7 @@ def update_serial_port_list_task():
276
278
if not program_in_progress :
277
279
new_tinyfpga_adapters = dict ((adapter .displayName (), adapter ) for adapter in [getProgrammerHardwareAdapter (port ) for port in comports ()] if adapter is not None )
278
280
new_tinyfpga_ports = [key for key , value in new_tinyfpga_adapters .iteritems ()]
279
-
281
+
280
282
if new_tinyfpga_ports != tinyfpga_ports :
281
283
if com_port_sv .get () == "" and len (new_tinyfpga_ports ) > 0 :
282
284
com_port_sv .set (new_tinyfpga_ports [0 ])
You can’t perform that action at this time.
0 commit comments