From d55e72f78b2d65c275d7f9355b6815ba80f71759 Mon Sep 17 00:00:00 2001 From: chrishoder Date: Tue, 12 Feb 2013 02:59:46 +0000 Subject: [PATCH 1/1] changes to debug the spit/write code and my ford experiments git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1478 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/FordExperiments.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/FordExperiments.py b/client/FordExperiments.py index 659d4bf..c3abf62 100644 --- a/client/FordExperiments.py +++ b/client/FordExperiments.py @@ -82,6 +82,7 @@ class FordExperiments(GoodFETMCPCANCommunication): packetParsed = self.client.packet2parsed(packet1); #keep sniffing till we read a packet while( packet1 == None or packetParsed.get('sID') != 1056 ): + time.sleep(.1) packet1 = self.client.rxpacket() if(packet1 != None): packetParsed = self.client.packet2parsed(packet1) @@ -112,8 +113,16 @@ class FordExperiments(GoodFETMCPCANCommunication): while( (time.time()-recieveTime) < runTime): #care about db3 or packet[8] that we want to count at the rate that it is dT = time.time()-tpast - packetValue = (packetValue+1)%255 - packet[1] = packetValue + packetValue += 1 + pV = packetValue%255 + #temp = ((packetValue+1))%2 + #if( temp == 1): + # pV = packetValue%255 + #else: + # pV = 0 + packet[6] = pV + #packet[6] = 1 + print packet self.client.txpacket(packet) packetCount += 1 tpast = time.time() #update our transmit time on the one before -- 2.20.1