mirror of https://github.com/DJ2LS/FreeDATA.git
remove crcengine dependency
parent
12e42f8136
commit
5551eae607
|
@ -45,7 +45,6 @@ def get_audio_devices():
|
|||
|
||||
def device_crc(device) -> str:
|
||||
crc_hwid = helpers.get_crc_16(bytes(f"{device['name']}.{device['hostapi']}", encoding="utf-8"))
|
||||
crc_hwid = crc_hwid.to_bytes(2, byteorder="big")
|
||||
crc_hwid = crc_hwid.hex()
|
||||
return crc_hwid
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ def get_ports():
|
|||
for port, desc, hwid in ports:
|
||||
# calculate hex of hwid if we have unique names
|
||||
crc_hwid = helpers.get_crc_16(bytes(hwid, encoding="utf-8"))
|
||||
crc_hwid = crc_hwid.to_bytes(2, byteorder="big")
|
||||
crc_hwid = crc_hwid.hex()
|
||||
description = f"{desc} [{crc_hwid}]"
|
||||
serial_devices.append(
|
||||
|
|
Loading…
Reference in New Issue