Fix UVC not starting on Babble and Xiao boards due to a miss-configuration

This commit is contained in:
Lorow
2025-08-26 23:31:34 +02:00
parent dbc5091500
commit 4a8aacf99e
10 changed files with 41 additions and 24 deletions

View File

@@ -36,13 +36,13 @@ struct DeviceMode_t : BaseConfigModel
void load()
{
// Default mode can be controlled via sdkconfig:
// - If CONFIG_GENERAL_DEFAULT_WIRED_MODE is enabled, default to UVC
// - If CONFIG_START_IN_UVC_MODE is enabled, default to UVC
// - Otherwise default to AUTO
int default_mode =
#if CONFIG_GENERAL_DEFAULT_WIRED_MODE
static_cast<int>(StreamingMode::UVC);
#if CONFIG_START_IN_UVC_MODE
static_cast<int>(StreamingMode::UVC);
#else
static_cast<int>(StreamingMode::AUTO);
static_cast<int>(StreamingMode::AUTO);
#endif
int stored_mode = this->pref->getInt("mode", default_mode);