My bad (x2)
This commit is contained in:
@@ -19,7 +19,7 @@ class RfidReader(SerialReader):
|
|||||||
hex_value = data[5:11].decode(errors='ignore')
|
hex_value = data[5:11].decode(errors='ignore')
|
||||||
try:
|
try:
|
||||||
res = int(hex_value, 16)
|
res = int(hex_value, 16)
|
||||||
formatted_res = f'{{"uid": {data}}}'
|
formatted_res = f'{{"uid": {res}}}'
|
||||||
self._notify(formatted_res)
|
self._notify(formatted_res)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("Invalid hex:", hex_value)
|
print("Invalid hex:", hex_value)
|
||||||
|
|||||||
Reference in New Issue
Block a user