mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-16 21:13:44 +02:00
60fps Limit + GENERAL_DEFAULT_WIRED_MODE can be set in sdkconfig
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user