feat: implement device name handling and update gateway name features
Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#ifndef CONFIG_GATEWAY_CHANNEL_COUNT
|
||||
#define CONFIG_GATEWAY_CHANNEL_COUNT 2
|
||||
@@ -1144,9 +1145,17 @@ extern "C" void app_main(void) {
|
||||
static_cast<uint32_t>(CONFIG_GATEWAY_BRIDGE_KNX_TASK_STACK_SIZE);
|
||||
bridge_config.knx_task_priority =
|
||||
static_cast<UBaseType_t>(CONFIG_GATEWAY_BRIDGE_KNX_TASK_PRIORITY);
|
||||
bridge_config.gateway_device_name_provider = []() {
|
||||
return s_runtime == nullptr ? std::string() : s_runtime->deviceName();
|
||||
};
|
||||
s_bridge = std::make_unique<gateway::GatewayBridgeService>(*s_dali_domain, *s_cache,
|
||||
bridge_config);
|
||||
s_controller->setBridgeService(s_bridge.get());
|
||||
s_controller->addGatewayNameSink([](uint8_t gateway_id) {
|
||||
if (s_bridge != nullptr) {
|
||||
s_bridge->handleGatewayNameChanged(gateway_id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (profile.enable_wifi || profile.enable_eth) {
|
||||
|
||||
Reference in New Issue
Block a user