mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-11 05:57:05 +03:00
fix target config priority between NVS and dedicated builds
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
const struct target_s *target_set[] = { &target_muse, NULL };
|
const struct target_s *target_set[] = { &target_muse, NULL };
|
||||||
|
|
||||||
void target_init(char *target) {
|
void target_init(char *target) {
|
||||||
for (int i = 0; target_set[i]; i++) if (strcasestr(target_set[i]->model, target)) {
|
for (int i = 0; *target && target_set[i]; i++) if (strcasestr(target_set[i]->model, target)) {
|
||||||
target_set[i]->init();
|
target_set[i]->init();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ void app_main()
|
|||||||
ESP_LOGI(TAG,"Initializing display");
|
ESP_LOGI(TAG,"Initializing display");
|
||||||
display_init("SqueezeESP32");
|
display_init("SqueezeESP32");
|
||||||
MEMTRACE_PRINT_DELTA();
|
MEMTRACE_PRINT_DELTA();
|
||||||
char *target = config_alloc_get_default(NVS_TYPE_STR, "target", CONFIG_TARGET, 0);
|
char *target = config_alloc_get_str("target", CONFIG_TARGET, NULL);
|
||||||
if (target) {
|
if (target) {
|
||||||
target_init(target);
|
target_init(target);
|
||||||
free(target);
|
free(target);
|
||||||
|
|||||||
Reference in New Issue
Block a user