Add Lock n Go to GPIO

This commit is contained in:
iranl
2024-01-31 19:57:54 +01:00
committed by GitHub
parent 3ecd8227aa
commit 942cd63ac2
5 changed files with 56 additions and 1 deletions

View File

@@ -277,6 +277,16 @@ void NukiWrapper::unlatch()
_nextLockAction = NukiLock::LockAction::Unlatch;
}
void NukiWrapper::lockngo()
{
_nextLockAction = NukiLock::LockAction::LockNgo;
}
void NukiWrapper::lockngounlatch()
{
_nextLockAction = NukiLock::LockAction::LockNgoUnlatch;
}
bool NukiWrapper::isPinSet()
{
return _nukiLock.getSecurityPincode() != 0;
@@ -501,6 +511,12 @@ void NukiWrapper::gpioActionCallback(const GpioAction &action, const int& pin)
case GpioAction::Unlatch:
nukiInst->unlatch();
break;
case GpioAction::LockNgo:
nukiInst->lockngo();
break;
case GpioAction::LockNgoUnlatch:
nukiInst->lockngounlatch();
break;
}
}