X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETMCPCANCommunication.py;h=676d018c9bc751818fff12e99d785f48bda88bba;hp=58fa57711ca761c8887a83fe2e0c60dbf4e9ee98;hb=f244df1b2d3010548ed2cceabdde44f36089a29a;hpb=17022d65913af952c0f6ebe367fa3f52fe129da2 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"