Skip to content

Commit ef85cc5

Browse files
authored
Merge pull request #47 from ajiekurniawansaputra/main
Fix download image, character file, and template to the sensor. Edited on the _send_data function.
2 parents 4270bab + ce43891 commit ef85cc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_fingerprint.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@ def _send_data(self, data: List[int]):
475475
self._print_debug("_send_data length:", length)
476476
packet.append(length >> 8)
477477
packet.append(length & 0xFF)
478-
checksum = _DATAPACKET + (length >> 8) + (length & 0xFF)
478+
if left <= 0:
479+
checksum = _ENDDATAPACKET + (length >> 8) + (length & 0xFF)
480+
else:
481+
checksum = _DATAPACKET + (length >> 8) + (length & 0xFF)
479482

480483
# for j in range(len(data[start:end])):
481484
for j in range(start, end):

0 commit comments

Comments
 (0)