From a824aa37ba1dd6757125b065b67b3d463c0e6ae6 Mon Sep 17 00:00:00 2001 From: Sven Gestegard Robertz <sven.robertz@cs.lth.se> Date: Thu, 2 Jul 2015 11:47:45 +0200 Subject: [PATCH] changed python runOne to decode until a sample is found --- lib/python/labcomm2014/LabComm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/python/labcomm2014/LabComm.py b/lib/python/labcomm2014/LabComm.py index aae802e..b309124 100644 --- a/lib/python/labcomm2014/LabComm.py +++ b/lib/python/labcomm2014/LabComm.py @@ -951,15 +951,17 @@ class Decoder(Codec): def runOne(self): data,decl = self.decode() + # decode any signatures until next sample + while data == None: + data,decl = self.decode() if decl: - if data: + if data != None: if str(decl) in self.handlers: handler = self.handlers[str(decl)] handler(data) else: print ("No handler for %s" % decl.name ) - def decode(self): while True: index = self.decode_type_number() -- GitLab