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