From: Jannik ZANDER Date: Fri, 17 Jun 2016 14:57:47 +0000 (+0200) Subject: Add defines for BROADCAST X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=9071435afb43d057cdf60c4502c65b8e1f00ffb3;p=dotfiles.git Add defines for BROADCAST --- diff --git a/.local/bin/gf.py b/.local/bin/gf.py index 9565536..79fcfde 100755 --- a/.local/bin/gf.py +++ b/.local/bin/gf.py @@ -120,11 +120,11 @@ def process_header(line): le,line=readbyte(line) da,line=readbyte(line) sa,line=readbyte(line) - if sd==gf.DATA_REQUEST and da==0xFE: + if sd==gf.DATA_REQUEST and da==gf.DA_BROADCAST_CONNECT: typ="CONNECTION_REQUEST ===>" - if sd==gf.DATA_REQUEST and da==0xFF: + if sd==gf.DATA_REQUEST and da==gf.DA_BROADCAST_REQUEST: typ="DATA_REQUEST ===>" - if sd==gf.DATA_MESSAGE and da==0xF7: + if sd==gf.DATA_MESSAGE and da==gf.DA_BROADCAST_MESSAGE: typ="DATA_MESSAGE ===>" print(typ) print("Length:",le,"Destination Addr:",da,"Source Addr:",sa) @@ -155,9 +155,9 @@ def process_data(line,le,size1,size2): tmp,line=readbyte(line) val[i]=(val[i]<<8)+tmp if size1>0 and size2>0: - print("Id:",ids[i],repr(gf.params[cl][ids[i]]),"=",val[i]) + print("Id:",ids[i],repr(gf.params[cl][ids[i]]),"=",val[i]) elif size1>0: - print("Id:",ids[i],repr(gf.params[cl][ids[i]])) + print("Id:",ids[i],repr(gf.params[cl][ids[i]])) elif size2>0: print("=",val[i]) return ids,val,line diff --git a/.local/bin/gf_config.py b/.local/bin/gf_config.py index e48b60a..6dcd853 100644 --- a/.local/bin/gf_config.py +++ b/.local/bin/gf_config.py @@ -6,6 +6,10 @@ DATA_REQUEST=0x27 DATA_MESSAGE=0x26 DATA_REPLY=0x24 +DA_BROADCAST_CONNECT=0xFE +DA_BROADCAST_REQUEST=0xFF +DA_BROADCAST_MESSAGE=0xF7 + OS_GET=0 OS_SET=2 OS_INFO=3