forked from Michel2/pytimex
Cleverer listhex function
This commit is contained in:
+1
-4
@@ -5,10 +5,7 @@ import sys
|
|||||||
import pytimex
|
import pytimex
|
||||||
|
|
||||||
def listhex(pkg):
|
def listhex(pkg):
|
||||||
outstr = ""
|
return ', '.join(["0x{:02x}".format(b) for b in pkg])
|
||||||
for b in pkg:
|
|
||||||
outstr += "0x{:02x}, ".format(b)
|
|
||||||
return outstr[:-1]
|
|
||||||
|
|
||||||
# Setup data to be sent
|
# Setup data to be sent
|
||||||
d = pytimex.TimexData()
|
d = pytimex.TimexData()
|
||||||
|
|||||||
Reference in New Issue
Block a user