update nuki lib

This commit is contained in:
technyon
2022-05-18 19:07:55 +02:00
parent 27d88db79c
commit cef472e32d
5 changed files with 28 additions and 20 deletions

View File

@@ -77,7 +77,7 @@ void NukiWrapper::update()
_bleScanner->update();
vTaskDelay( 5000 / portTICK_PERIOD_MS);
if (_nukiBle.pairNuki()) {
if (_nukiBle.pairNuki() == Nuki::PairingResult::Success) {
Serial.println(F("Nuki paired"));
_paired = true;
}
@@ -90,6 +90,7 @@ void NukiWrapper::update()
vTaskDelay( 20 / portTICK_PERIOD_MS);
_bleScanner->update();
_nukiBle.updateConnectionState();
unsigned long ts = millis();
@@ -214,20 +215,6 @@ void NukiWrapper::updateAuthData()
}
}
//struct __attribute__((packed)) LogEntry {
// uint32_t index;
// uint16_t timeStampYear;
// uint8_t timeStampMonth;
// uint8_t timeStampDay;
// uint8_t timeStampHour;
// uint8_t timeStampMinute;
// uint8_t timeStampSecond;
// uint32_t authId;
// uint8_t name[32];
// LoggingType loggingType;
// uint8_t data[5];
//};
Nuki::LockAction NukiWrapper::lockActionToEnum(const char *str)
{
if(strcmp(str, "unlock") == 0) return Nuki::LockAction::Unlock;