Skip to content

Commit fd87cce

Browse files
committed
chore: update DigitalDoorKey
1 parent 0e78992 commit fd87cce

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

main/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ idf_component_register(SRCS "main.cpp" "ConfigManager.cpp" "ReaderDataManager.cp
33
"MqttManager.cpp" "HKServices.cpp" "NfcManager.cpp" "WebServerManager.cpp" "WebSocketLogSinker.cpp"
44
"ConsoleLogSinker.cpp"
55
INCLUDE_DIRS "include"
6-
PRIV_REQUIRES HomeSpan pn532_hal HK-HomeKit-Lib esp_http_server mqtt libsodium event_bus
6+
PRIV_REQUIRES HomeSpan pn532_hal DigitalDoorKey esp_http_server mqtt libsodium event_bus
77
msgpack-c json loggable loggable_espidf)
88

99
include(FetchContent)

main/NfcManager.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include "NfcManager.hpp"
2-
#include "HomeKey.h"
2+
#include "DDKReaderData.h"
33
#include "ReaderDataManager.hpp"
44
#include "esp32-hal.h"
55
#include "eventStructs.hpp"
66
#include "fmt/ranges.h"
77
#include "freertos/idf_additions.h"
8-
#include "hkAuthContext.h"
8+
#include "DDKAuthContext.h"
99
#include "pn532_hal/spi.hpp"
1010
#include "soc/gpio_num.h"
1111
#include "utils.hpp"
@@ -159,7 +159,7 @@ void NfcManager::authPrecomputeTask() {
159159
uxQueueMessagesWaiting(m_authCtxReadyQueue));
160160

161161
auto startTime = std::chrono::high_resolution_clock::now();
162-
item->ctx = new (std::nothrow) HKAuthenticationContext(kHomeKey, item->nfcFn, item->readerData, item->saveFn);
162+
item->ctx = new (std::nothrow) DDKAuthenticationContext(kHomeKey, item->nfcFn, item->readerData, item->saveFn);
163163
auto stopTime = std::chrono::high_resolution_clock::now();
164164
const auto durationMs =
165165
std::chrono::duration_cast<std::chrono::milliseconds>(stopTime - startTime).count();
@@ -504,8 +504,7 @@ void NfcManager::handleHomeKeyAuth() {
504504
m_readerDataManager.updateReaderData(data);
505505
invalidateAuthCache();
506506
};
507-
//
508-
HKAuthenticationContext authCtx(kHomeKey, nfcFn, readerData, saveFn);
507+
DDKAuthenticationContext authCtx(kHomeKey, nfcFn, readerData, saveFn);
509508
auto authResult = authCtx.authenticate(authFlow);
510509
publishAuthResult(authResult, readerData.reader_id);
511510
};

main/include/NfcManager.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include "HomeKey.h"
2+
#include "DDKReaderData.h"
33
#include "freertos/FreeRTOS.h"
44
#include "freertos/queue.h"
55
#include "freertos/task.h"
@@ -14,7 +14,7 @@ class LockManager;
1414
class HardwareManager;
1515
class ReaderDataManager;
1616
class MqttManager;
17-
class HKAuthenticationContext;
17+
class DDKAuthenticationContext;
1818
namespace espConfig { struct misc_config_t; }
1919

2020
class NfcManager {
@@ -42,7 +42,7 @@ class NfcManager {
4242
readerData_t readerData;
4343
std::function<bool(std::vector<uint8_t>&, std::vector<uint8_t>&, bool)> nfcFn;
4444
std::function<void(const readerData_t&)> saveFn;
45-
HKAuthenticationContext* ctx = nullptr;
45+
DDKAuthenticationContext* ctx = nullptr;
4646
uint32_t generation = 0;
4747
};
4848

main/include/ReaderDataManager.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <vector>
33
#include <mutex>
44
#include <nvs.h>
5-
#include "HomeKey.h"
5+
#include "DDKReaderData.h"
66
#include "msgpack/object.h"
77
#include "msgpack/pack.h"
88

0 commit comments

Comments
 (0)