X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FFordExperiments.py;h=c3abf625f5c3690cfff2d099419559c8b4e64714;hp=659d4bf32d3ce01650f111b5d6752e3bb4905ab0;hb=d55e72f78b2d65c275d7f9355b6815ba80f71759;hpb=4a298fef09f355098b24560c79415e541c60c7df 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