Skip to content

Commit

Permalink
Merge pull request #47 from ajiekurniawansaputra/main
Browse files Browse the repository at this point in the history
Fix download image, character file, and template to the sensor. Edited on the _send_data function.
  • Loading branch information
tekktrik authored Mar 24, 2022
2 parents 4270bab + ce43891 commit ef85cc5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion adafruit_fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ def _send_data(self, data: List[int]):
self._print_debug("_send_data length:", length)
packet.append(length >> 8)
packet.append(length & 0xFF)
checksum = _DATAPACKET + (length >> 8) + (length & 0xFF)
if left <= 0:
checksum = _ENDDATAPACKET + (length >> 8) + (length & 0xFF)
else:
checksum = _DATAPACKET + (length >> 8) + (length & 0xFF)

# for j in range(len(data[start:end])):
for j in range(start, end):
Expand Down

0 comments on commit ef85cc5

Please sign in to comment.