mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-05-02 20:36:04 +02:00
unify advertised name for mDNS and USB, update configuration settings, and enhance setup tool prompts.
This commit is contained in:
@@ -103,9 +103,13 @@ struct MDNSConfig_t : BaseConfigModel
|
||||
|
||||
void load()
|
||||
{
|
||||
// by default, this will be openiris
|
||||
// but we can override it at compile time
|
||||
std::string default_hostname = CONFIG_WIFI_MDNS_HOSTNAME;
|
||||
// Default hostname comes from GENERAL_ADVERTISED_NAME (unified advertised name)
|
||||
std::string default_hostname =
|
||||
#ifdef CONFIG_GENERAL_ADVERTISED_NAME
|
||||
CONFIG_GENERAL_ADVERTISED_NAME;
|
||||
#else
|
||||
"openiristracker";
|
||||
#endif
|
||||
|
||||
if (default_hostname.empty())
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "UVCStream.hpp"
|
||||
#include <cstdio> // for snprintf
|
||||
#include <string>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
// no deps on main globals here; handover is performed in main before calling setup when needed
|
||||
@@ -13,21 +12,7 @@ extern "C"
|
||||
|
||||
const char *get_uvc_device_name()
|
||||
{
|
||||
// Prefer explicit UVC name from Kconfig, fallback to mDNS hostname when empty
|
||||
static std::string cached_name;
|
||||
if (cached_name.empty())
|
||||
{
|
||||
const char *cfg_name = CONFIG_GENERAL_UVC_NAME;
|
||||
if (cfg_name && cfg_name[0] != '\0')
|
||||
{
|
||||
cached_name = cfg_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
cached_name = deviceConfig->getMDNSConfig().hostname;
|
||||
}
|
||||
}
|
||||
return cached_name.c_str();
|
||||
return deviceConfig->getMDNSConfig().hostname.c_str();
|
||||
}
|
||||
|
||||
const char *get_serial_number(void)
|
||||
|
||||
Reference in New Issue
Block a user