From f066214e0f93f94aa084de0cb4e285cb2b021ba4 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Wed, 7 May 2025 16:46:59 +0800 Subject: Use high quality scanning. --- r503.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'r503.c') diff --git a/r503.c b/r503.c index 25e7560..6f8a259 100644 --- a/r503.c +++ b/r503.c @@ -150,7 +150,7 @@ static inline uint8_t scan(void) led_ctrl(0x01, PURPLE); do { - buf[0] = 0x01; + buf[0] = 0x28; send(0x01, buf, 1); recv(buf, &n); if (buf[0] != OK) { @@ -159,7 +159,7 @@ static inline uint8_t scan(void) } } while(buf[0] != OK && retries < 100); - fpm_led_off(); + led_ctrl(0x06, PURPLE); return buf[0] == OK; } @@ -250,8 +250,9 @@ uint8_t fpm_enroll(void) uint16_t n, retries; uint8_t buf[MAXPDLEN], led; - if (!scan()) - return 0; + if (scan()) { + + } - return 1; + return 0; } -- cgit v1.2.3