60fps Limit + GENERAL_DEFAULT_WIRED_MODE can be set in sdkconfig

This commit is contained in:
PhosphorosVR
2025-08-26 01:39:40 +02:00
parent 06394f9654
commit cb569c9e47
12 changed files with 108 additions and 57 deletions

View File

@@ -35,7 +35,17 @@ struct DeviceMode_t : BaseConfigModel
void load()
{
int stored_mode = this->pref->getInt("mode", 0);
// Default mode can be controlled via sdkconfig:
// - If CONFIG_GENERAL_DEFAULT_WIRED_MODE is enabled, default to UVC
// - Otherwise default to AUTO
int default_mode =
#if CONFIG_GENERAL_DEFAULT_WIRED_MODE
static_cast<int>(StreamingMode::UVC);
#else
static_cast<int>(StreamingMode::AUTO);
#endif
int stored_mode = this->pref->getInt("mode", default_mode);
this->mode = static_cast<StreamingMode>(stored_mode);
ESP_LOGI("DeviceMode", "Loaded device mode: %d", stored_mode);
}