From 46a65ba9ec03ab996604483775eeec21b4597833 Mon Sep 17 00:00:00 2001 From: chrishoder Date: Wed, 20 Feb 2013 03:22:09 +0000 Subject: [PATCH 1/1] debuggin of some gui methods git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1513 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETMCPCANCommunication.py | 2 +- client/experiments.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/GoodFETMCPCANCommunication.py b/client/GoodFETMCPCANCommunication.py index 6e9b76e..b318128 100644 --- a/client/GoodFETMCPCANCommunication.py +++ b/client/GoodFETMCPCANCommunication.py @@ -26,7 +26,7 @@ class GoodFETMCPCANCommunication: def __init__(self, dataLocation): self.client=GoodFETMCPCAN(); - """ Communication with the bus""" + """ Communication with the bus""" self.client.serInit() self.client.MCPsetup(); #self.DATA_LOCATION = "../../contrib/ThayerData/" diff --git a/client/experiments.py b/client/experiments.py index 9c07643..d9d85fa 100644 --- a/client/experiments.py +++ b/client/experiments.py @@ -478,17 +478,21 @@ class experiments(GoodFETMCPCANCommunication): self.client.MCPrts(TXB0=True) tT.sleep(period/1000) else: #compare packets - sid = ord(packet[0])<< | ord(packet[1])>>5 + sid = ord(packet[0])<<3 | ord(packet[1])>>5 print "standard id of packet recieved: ", sid #standard ID + msg = "" for i in range(0,8): idx = 5 + i byteIn = ord(packet[idx]) - compareIn = respondPacket[i] + msg += " %d" %byteIn + compareIn = listenPacket[i] + print byteIn, compareIn if( byteIn != compareIn): packet == None print "packet did not match" break - if( packet ): + print msg + if( packet != None ): self.client.MCPrts(TXB0=True) tT.sleep(period/1000) print "Response Listening Terminated." -- 2.20.1