@@ -271,6 +271,7 @@ def finger_fast_search(self):
271
271
capacity & 0xFF ])
272
272
r = self ._get_packet (16 )
273
273
self .finger_id , self .confidence = struct .unpack ('>HH' , bytes (r [1 :5 ]))
274
+ # print(r)
274
275
return r [0 ]
275
276
276
277
##################################################
@@ -313,7 +314,6 @@ def _get_data(self, expected):
313
314
and _ENDDATAPACKET. Alternate method for getting data such
314
315
as fingerprint image, etc. Returns the data payload."""
315
316
res = self ._uart .read (expected )
316
- # print("Got", res)
317
317
if (not res ) or (len (res ) != expected ):
318
318
raise RuntimeError ('Failed to read data from sensor' )
319
319
@@ -348,7 +348,7 @@ def _get_data(self, expected):
348
348
# todo: we should really inspect the headers and checksum
349
349
reply = [i for i in res [0 :length ]]
350
350
self ._uart .read (2 ) # disregard checksum but we really shouldn't
351
- print (len (reply ))
351
+ # print(len(reply))
352
352
# print(reply)
353
353
return reply
354
354
@@ -401,14 +401,12 @@ def _send_data(self, data):
401
401
402
402
for j in range (len (data [start :end ])):
403
403
packet .append (data [j ])
404
- # packet.append(struct.pack('@B', data[j]))
405
404
checksum += data [j ]
406
405
407
406
packet .append (checksum >> 8 )
408
407
packet .append (checksum & 0xFF )
409
408
410
409
# print("Sending: ", [hex(i) for i in packet])
411
- # self._uart.write(bytearray(packet))
412
410
self ._uart .write (packet )
413
411
# print(i)
414
412
@@ -430,13 +428,11 @@ def _send_data(self, data):
430
428
431
429
for j in range (len (data [start :end ])):
432
430
packet .append (data [j ])
433
- # packet.append(struct.pack('@B', data[j]))
434
431
checksum += data [j ]
435
432
436
433
packet .append (checksum >> 8 )
437
434
packet .append (checksum & 0xFF )
438
435
439
436
# print("Sending: ", [hex(i) for i in packet])
440
- # self._uart.write(bytearray(packet))
441
437
self ._uart .write (packet )
442
438
# print(i)
0 commit comments