flash_can: fix error in uuid reporting

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan committed 2022-04-25 20:06:57 -04:00
1 parent f0d7bb7f9c
commit b5303fa5f7
1 file changed
+3 -2
+3 -2
View File
@@ -334,8 +334,9 @@ class CanSocket:
app = "CanBoot"
elif resp[-1] == 0:
app = "Klipper"
output_line(f"Detected UUID: {resp[1:].hex()}, Application: {app}")
uuid = sum([v << ((5 - i) * 8) for i, v in enumerate(resp[1:7])])
data = resp[1:7]
output_line(f"Detected UUID: {data.hex()}, Application: {app}")
uuid = sum([v << ((5 - i) * 8) for i, v in enumerate(data)])
if uuid not in self.uuids and app == "CanBoot":
self.uuids.append(uuid)
return self.uuids