From: Jannik Zander Date: Thu, 9 Jun 2016 22:20:03 +0000 (+0200) Subject: Minor update X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=461e08db19b576243cecce19b2bdf6aef0cdc19c;p=dotfiles.git Minor update --- diff --git a/.local/bin/gf.py b/.local/bin/gf.py index 59a424d..44090af 100755 --- a/.local/bin/gf.py +++ b/.local/bin/gf.py @@ -88,7 +88,6 @@ def process(line): global t global speed global master - # Some extra info from logging tool isok=process_isok(line) timestamp=process_timestamp(line) @@ -96,19 +95,22 @@ def process(line): timezero=timestamp # Process received data typ,ds,le,da,sa,line=process_head(line) + numbytes=le-2 if da==0xF7: - numbytes=le-2 while numbytes>0: cl,os,ale,line=process_apdu(line) - numbytes=numbytes-2-ale + numbytes=numbytes-2 if cl==5: id,val,line=process_class5(line,int(ale/2)) + numbytes=numbytes-ale + # Debugging info.... t=t+[timestamp-timezero] master=master+[1+(sa-31)/10] for i in range(4): speed[i]=speed[i]+[val[i]/254] else: line=line[ale*3:] + numbytes=numbytes-ale crc=process_crc(line) return