Skip to content

Commit

Permalink
isPinSet
Browse files Browse the repository at this point in the history
  • Loading branch information
iranl committed May 14, 2024
1 parent 3947657 commit c3024c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/NukiOpenerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ void NukiOpenerWrapper::updateConfig()

void NukiOpenerWrapper::updateAuthData()
{
if(_nukiOpener.getSecurityPincode() == 0) return;
if(!isPinSet()) return;

Nuki::CmdResult result = _nukiOpener.retrieveLogEntries(0, 0, 0, true);
if(result != Nuki::CmdResult::Success)
Expand Down Expand Up @@ -779,7 +779,7 @@ void NukiOpenerWrapper::onConfigUpdateReceived(const char *value)
return;
}

if(_nukiOpener.getSecurityPincode() == 0)
if(!isPinSet())
{
jsonResult["general"] = "noPinSet";
serializeJson(jsonResult, _resbuf, sizeof(_resbuf));
Expand Down Expand Up @@ -1411,7 +1411,7 @@ void NukiOpenerWrapper::onKeypadCommandReceived(const char *command, const uint

void NukiOpenerWrapper::onKeypadJsonCommandReceived(const char *value)
{
if(_nukiOpener.getSecurityPincode() == 0)
if(!isPinSet())
{
_network->publishKeypadJsonCommandResult("noPinSet");
return;
Expand Down Expand Up @@ -1759,7 +1759,7 @@ void NukiOpenerWrapper::onTimeControlCommandReceived(const char *value)
return;
}

if(_nukiOpener.getSecurityPincode() == 0)
if(!isPinSet())
{
_network->publishTimeControlCommandResult("noPinSet");
return;
Expand Down
8 changes: 4 additions & 4 deletions src/NukiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ void NukiWrapper::updateConfig()

void NukiWrapper::updateAuthData()
{
if(_nukiLock.getSecurityPincode() == 0) return;
if(!isPinSet()) return;

Nuki::CmdResult result = _nukiLock.retrieveLogEntries(0, 0, 0, true);
if(result != Nuki::CmdResult::Success)
Expand Down Expand Up @@ -715,7 +715,7 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
return;
}

if(_nukiLock.getSecurityPincode() == 0)
if(!isPinSet())
{
jsonResult["general"] = "noPinSet";
serializeJson(jsonResult, _resbuf, sizeof(_resbuf));
Expand Down Expand Up @@ -1397,7 +1397,7 @@ void NukiWrapper::onKeypadCommandReceived(const char *command, const uint &id, c

void NukiWrapper::onKeypadJsonCommandReceived(const char *value)
{
if(_nukiLock.getSecurityPincode() == 0)
if(!isPinSet())
{
_network->publishKeypadJsonCommandResult("noPinSet");
return;
Expand Down Expand Up @@ -1745,7 +1745,7 @@ void NukiWrapper::onTimeControlCommandReceived(const char *value)
return;
}

if(_nukiLock.getSecurityPincode() == 0)
if(!isPinSet())
{
_network->publishTimeControlCommandResult("noPinSet");
return;
Expand Down

0 comments on commit c3024c1

Please sign in to comment.