Move to PP_HTONS

This commit is contained in:
Foxushka
2023-09-06 22:55:26 +03:00
parent 58d43a36c4
commit 55a70fc2e5
3 changed files with 145 additions and 8 deletions
+1 -6
View File
@@ -846,12 +846,7 @@ class ChameleonCMD:
try:
ret = self.device.send_cmd_sync(DATA_CMD_GET_DEVICE_CAPABILITIES, 0x00)
for i in range(0, len(ret.data), 2):
if i + 1 < len(ret.data):
commands.append((ret.data[i + 1] << 8) | ret.data[i])
self.device.commands = commands
self.device.commands = struct.unpack(f"{len(ret.data) // 2}H", ret.data)
except:
print("Chameleon doesn't understand get capabilities command. Please update firmware")