global t
global speed
global master
-
# Some extra info from logging tool
isok=process_isok(line)
timestamp=process_timestamp(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