From 63305a1bde764ca61d315bc4620a3aa7a8f4cfc0 Mon Sep 17 00:00:00 2001 From: chrishoder Date: Mon, 11 Feb 2013 19:43:47 +0000 Subject: [PATCH 1/1] changes to a bug on the spit method git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1471 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETMCPCANCommunication.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client/GoodFETMCPCANCommunication.py b/client/GoodFETMCPCANCommunication.py index 9c60cb0..58fa577 100644 --- a/client/GoodFETMCPCANCommunication.py +++ b/client/GoodFETMCPCANCommunication.py @@ -556,7 +556,7 @@ class GoodFETMCPCANCommunication: self.spitSetup(freq); spit(self,freq, standardid, repeat, duration = None, debug = False, packet = None) - def spit(self,freq, standardid, repeat, duration = None, debug = False, packet = None): + def spit(self,freq, standardid, repeat,writes, period = None, debug = False, packet = None): #### split SID into different regs @@ -606,12 +606,15 @@ class GoodFETMCPCANCommunication: if repeat: print "\nNow looping on transmit. " if duration!= None: - starttime = time.time(); - while((time.time()-starttime < duration)): + for i in range(0,trials): self.client.MCPrts(TXB0=True); - print "MSG printed" + time.sleep(period/1000) # pause for period ms before sending again + #starttime = time.time(); + #while((time.time()-starttime < duration)): + # self.client.MCPrts(TXB0=True); + # print "MSG printed" else: - while(1): + for i in range(0,trials): self.client.MCPrts(TXB0=True); print "messages injected" -- 2.20.1