X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETMCPCANCommunication.py;h=676d018c9bc751818fff12e99d785f48bda88bba;hp=58fa57711ca761c8887a83fe2e0c60dbf4e9ee98;hb=d08bfd3c7cdc687fd68ba9025702c262665e52d3;hpb=63305a1bde764ca61d315bc4620a3aa7a8f4cfc0 diff --git a/client/GoodFETMCPCANCommunication.py b/client/GoodFETMCPCANCommunication.py index 58fa577..676d018c9 100644 --- a/client/GoodFETMCPCANCommunication.py +++ b/client/GoodFETMCPCANCommunication.py @@ -605,16 +605,18 @@ class GoodFETMCPCANCommunication: if repeat: print "\nNow looping on transmit. " - if duration!= None: - for i in range(0,trials): + if period != None: + for i in range(0,writes): self.client.MCPrts(TXB0=True); + tic = time.time() time.sleep(period/1000) # pause for period ms before sending again + print time.time()-tic #starttime = time.time(); #while((time.time()-starttime < duration)): # self.client.MCPrts(TXB0=True); # print "MSG printed" else: - for i in range(0,trials): + for i in range(0,writes): self.client.MCPrts(TXB0=True); print "messages injected"