Fixes compilation for color lcd

This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:01 +01:00
parent da3759a2a3
commit 4c8db58166
4 changed files with 14 additions and 9 deletions
+5 -2
View File
@@ -370,17 +370,20 @@ bool ModelsList::loadYaml()
}
#endif
bool ModelsList::load()
bool ModelsList::load(Format fmt)
{
if (loaded)
return true;
bool res = false;
#if !defined(SDCARD_YAML)
(void)fmt;
res = loadTxt();
#else
FILINFO fno;
if (f_stat(RADIO_MODELSLIST_YAML_PATH, &fno) != FR_OK) {
if (fmt == Format::txt ||
(fmt == Format::yaml_txt &&
f_stat(RADIO_MODELSLIST_YAML_PATH, &fno) != FR_OK)) {
res = loadTxt();
} else {
res = loadYaml();