From b9875cce220de9d3149ab00f14068a6969f1e5a9 Mon Sep 17 00:00:00 2001 From: chrishoder Date: Sat, 23 Feb 2013 23:18:31 +0000 Subject: [PATCH 1/1] Added a section for viewing arbitration IDs information. This will be stored in a json file in the hoder contrib folder git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1524 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/FordExperiments.py | 3 ++- client/GoodFETMCPCANCommunication.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/client/FordExperiments.py b/client/FordExperiments.py index b2fdc33..3318514 100644 --- a/client/FordExperiments.py +++ b/client/FordExperiments.py @@ -6,13 +6,14 @@ import datetime import os from random import randrange from GoodFETMCPCAN import GoodFETMCPCAN; +from experiments import experiments from GoodFETMCPCANCommunication import GoodFETMCPCANCommunication from intelhex import IntelHex; import Queue import math tT = time -class FordExperiments(GoodFETMCPCANCommunication): +class FordExperiments(experiments): def __init__(self, dataLocation = "../../contrib/ThayerData/"): GoodFETMCPCANCommunication.__init__(self, dataLocation) diff --git a/client/GoodFETMCPCANCommunication.py b/client/GoodFETMCPCANCommunication.py index 4dce2de..88f01df 100644 --- a/client/GoodFETMCPCANCommunication.py +++ b/client/GoodFETMCPCANCommunication.py @@ -845,7 +845,7 @@ class GoodFETMCPCANCommunication: packet = None; # catch a packet and check its db4 value - while (packet == None) + while (packet == None): packet=self.client.rxpacket(); print "DB4 = %d" %packet[9] @@ -861,22 +861,22 @@ class GoodFETMCPCANCommunication: starttime = time.time() # spit new value for 1 second - while (time.time()-starttime < 1) + while (time.time()-starttime < 1): self.multiPacketSpit(packet0rts=True) -[SIDhigh, SIDlow, 0x00,0x00, # pad out EID regs + [SIDhigh, SIDlow, 0x00,0x00, # pad out EID regs 0x08, # bit 6 must be set to 0 for data frame (1 for RTR) # lower nibble is DLC packet[0],packet[1],packet[2],packet[3],packet[4],packet[5],packet[6],packet[7]] - while((time.time()-starttime < duration)): - - if(faster): - packet=self.client.fastrxpacket(); - else: +# while((time.time()-starttime < duration)): +# +# if(faster): +# packet=self.client.fastrxpacket(); +# else: -- 2.20.1