Restore lv_fs_if_init() on Arduino build

This commit is contained in:
Kuba Szczodrzyński 2024-02-15 17:37:08 +01:00
parent d71473a4e7
commit 6a8bbce6ec
No known key found for this signature in database
GPG Key ID: 43037AC62A600562
3 changed files with 6 additions and 1 deletions

View File

@ -265,7 +265,6 @@ DeserializationError configParseFile(String& configFile, JsonDocument& settings)
}
return DeserializationError::InvalidInput;
#elif HASP_TARGET_PC
lv_fs_if_init();
lv_fs_file_t f;
lv_fs_res_t res;
lv_fs_open(&f, "L:/config.json", LV_FS_MODE_RD);

View File

@ -208,6 +208,7 @@ static inline void gui_init_filesystems()
{
#if LV_USE_FS_IF != 0
LOG_VERBOSE(TAG_LVGL, F("Filesystem : " D_SETTING_ENABLED));
lv_fs_if_init(); // auxiliary file system drivers
#else
LOG_VERBOSE(TAG_LVGL, F("Filesystem : " D_SETTING_DISABLED));
#endif

View File

@ -48,6 +48,11 @@ void setup()
// Initialize lvgl environment
lv_init();
lv_log_register_print_cb(debugLvglLogEvent);
#if HASP_USE_CONFIG
// initialize FS before running configSetup()
// normally, it's initialized in guiSetup(), but Arduino doesn't need FS in configSetup()
lv_fs_if_init();
#endif
#endif
haspDevice.init();