Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CognexNativePy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def calculate_checksum(buffer: bytes) -> int:
cword <<= 1 # Shift left without XOR
cword &= 0xFFFF # Ensure cword stays within 16 bits
ch <<= 1 # Shift ch to the left
return hex(cword).upper()[2:]
return "{:04X}".format(cword)


def hex_to_ascii_hex(buffer: bytes) -> bytes:
Expand Down