From 9a88677122da9dd7c3dfa7c2d0e1547e08fb68aa Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 22 May 2023 12:42:24 +0200 Subject: [PATCH] More AS608 bling bling More AS608 bling bling (#18163) --- tasmota/tasmota_xsns_sensor/xsns_79_as608.ino | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_79_as608.ino b/tasmota/tasmota_xsns_sensor/xsns_79_as608.ino index cd64a62f0..cf41931c3 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_79_as608.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_79_as608.ino @@ -33,7 +33,10 @@ //#define USE_AS608_MESSAGES #ifndef AS608_DUPLICATE -#define AS608_DUPLICATE 4 // Number of 0.25Sec to disable detection +#define AS608_DUPLICATE 4 // Number of 0.25 Sec to disable detection +#endif +#ifndef AS608_COLOR_SCAN +#define AS608_COLOR_SCAN 3 // Red = 1, Blue = 2, Purple = 3 #endif #define D_JSON_FPRINT "FPrint" @@ -142,7 +145,7 @@ void As608Loop(void) { As608.duplicate--; } if (!As608.duplicate) { - As608Finger->LEDcontrol(FINGERPRINT_LED_OFF, 0, FINGERPRINT_LED_PURPLE); + As608Finger->LEDcontrol(FINGERPRINT_LED_OFF, 0, AS608_COLOR_SCAN); } // Search for Finger @@ -155,9 +158,13 @@ void As608Loop(void) { p = As608Finger->getImage(); // Take image if (p != FINGERPRINT_OK) { return; } + As608Finger->LEDcontrol(FINGERPRINT_LED_GRADUAL_ON, 150, AS608_COLOR_SCAN); + p = As608Finger->image2Tz(); // Convert image if (p != FINGERPRINT_OK) { return; } +// As608Finger->LEDcontrol(FINGERPRINT_LED_ON, 0, FINGERPRINT_LED_BLUE); + // p = As608Finger->fingerFastSearch(); // Match found - fails on R503 p = As608Finger->fingerSearch(); // Match found if (p != FINGERPRINT_OK) { @@ -170,7 +177,7 @@ void As608Loop(void) { return; // Skip duplicate during AS608_DUPLICATE * 0.25 second } As608.duplicate = AS608_DUPLICATE; // AS608_DUPLICATE * 250mS - As608Finger->LEDcontrol(FINGERPRINT_LED_ON, 0, FINGERPRINT_LED_PURPLE); + As608Finger->LEDcontrol(FINGERPRINT_LED_ON, 0, AS608_COLOR_SCAN); As608.finger_id = As608Finger->fingerID; As608.confidence = As608Finger->confidence;