Update housing and code
--add local timezone --add sunrise/sunset calculation and LED illumination accordingly --remove touch sensor check --change mqtt messages
This commit is contained in:
1 parent
6435550e29
commit
379b4887c3
47 files changed
+26343
-2850
No files matched your search
@@ -50,7 +50,7 @@ bool FingerprintManager::connect() {
|
||||
|
||||
void FingerprintManager::updateTouchState(bool touched)
|
||||
{
|
||||
if ((touched != lastTouchState) || (ignoreTouchRing != lastIgnoreTouchRing)) {
|
||||
if ((touched != lastTouchState) || (ignoreTouchRing != lastIgnoreTouchRing) || (night != lastNightMode)) {
|
||||
// check if sensor or ring is touched
|
||||
if (touched) {
|
||||
// turn touch indicator on:
|
||||
@@ -62,10 +62,18 @@ void FingerprintManager::updateTouchState(bool touched)
|
||||
}
|
||||
lastTouchState = touched;
|
||||
lastIgnoreTouchRing = ignoreTouchRing;
|
||||
|
||||
lastNightMode = night;
|
||||
}
|
||||
|
||||
|
||||
void FingerprintManager::setNightMode(bool state){
|
||||
night = state;
|
||||
}
|
||||
|
||||
bool FingerprintManager::isNightMode(void){
|
||||
return night;
|
||||
}
|
||||
|
||||
Match FingerprintManager::scanFingerprint() {
|
||||
|
||||
Match match;
|
||||
@@ -189,7 +197,7 @@ Match FingerprintManager::scanFingerprint() {
|
||||
match.returnCode = finger.fingerSearch();
|
||||
if (match.returnCode == FINGERPRINT_OK) {
|
||||
// found a match!
|
||||
finger.LEDcontrol(FINGERPRINT_LED_ON, 0, FINGERPRINT_LED_PURPLE);
|
||||
//setLedRingOk();
|
||||
|
||||
match.scanResult = ScanResult::matchFound;
|
||||
match.matchId = finger.fingerID;
|
||||
@@ -454,10 +462,17 @@ void FingerprintManager::setLedRingWifiConfig() {
|
||||
}
|
||||
|
||||
void FingerprintManager::setLedRingReady() {
|
||||
if (!ignoreTouchRing)
|
||||
finger.LEDcontrol(FINGERPRINT_LED_BREATHING, 250, FINGERPRINT_LED_BLUE);
|
||||
else
|
||||
finger.LEDcontrol(FINGERPRINT_LED_ON, 0, FINGERPRINT_LED_BLUE); // just an indicator for me to see if touch ring is active or not
|
||||
if(night){
|
||||
if (!ignoreTouchRing)
|
||||
finger.LEDcontrol(FINGERPRINT_LED_OFF, 250, FINGERPRINT_LED_BLUE);
|
||||
else
|
||||
finger.LEDcontrol(FINGERPRINT_LED_ON, 55, FINGERPRINT_LED_BLUE); // just an indicator for me to see if touch ring is active or not
|
||||
}else{
|
||||
finger.LEDcontrol(FINGERPRINT_LED_OFF, 250, FINGERPRINT_LED_BLUE);
|
||||
}
|
||||
}
|
||||
void FingerprintManager::setLedRingOk() {
|
||||
finger.LEDcontrol(FINGERPRINT_LED_BREATHING, 250, 0x04);
|
||||
}
|
||||
|
||||
bool FingerprintManager::deleteAll() {
|
||||
|
||||
Reference in new issue
Block a user