diff --git a/Tactility/Source/Tactility.cpp b/Tactility/Source/Tactility.cpp index c53c2530..38e34603 100644 --- a/Tactility/Source/Tactility.cpp +++ b/Tactility/Source/Tactility.cpp @@ -283,7 +283,7 @@ void prepareFileSystems() { void registerApps() { registerInternalApps(); - auto data_apps_path = std::format("{}/apps", file::MOUNT_POINT_DATA); + auto data_apps_path = std::format("{}/app", file::MOUNT_POINT_DATA); if (file::isDirectory(data_apps_path)) { registerInstalledApps(data_apps_path); } diff --git a/Tactility/Source/service/wifi/WifiBootSplashInit.cpp b/Tactility/Source/service/wifi/WifiBootSplashInit.cpp index d7aba973..9a3d30f5 100644 --- a/Tactility/Source/service/wifi/WifiBootSplashInit.cpp +++ b/Tactility/Source/service/wifi/WifiBootSplashInit.cpp @@ -1,6 +1,7 @@ #include "Tactility/service/wifi/WifiBootSplashInit.h" #include "Tactility/file/PropertiesFile.h" +#include #include #include #include @@ -80,9 +81,7 @@ static void importWifiAp(const std::string& filePath) { } } -static void importWifiApSettings(std::shared_ptr sdcard) { - auto path = file::getChildPath(sdcard->getMountPath(), "settings"); - +static void importWifiApSettingsFromDir(const std::string& path) { std::vector dirent_list; if (file::scandir(path, dirent_list, [](const dirent* entry) { switch (entry->d_type) { @@ -101,11 +100,12 @@ static void importWifiApSettings(std::shared_ptr sdca } } }, nullptr) == 0) { + // keep original behavior: if scandir returns 0, give up silently return; } if (dirent_list.empty()) { - TT_LOG_W(TAG, "No AP files found at %s", sdcard->getMountPath().c_str()); + TT_LOG_W(TAG, "No AP files found at %s", path.c_str()); return; } @@ -115,8 +115,21 @@ static void importWifiApSettings(std::shared_ptr sdca } } +static void importWifiApSettings(std::shared_ptr sdcard) { + const std::string settings_path = file::getChildPath(sdcard->getMountPath(), "settings"); + importWifiApSettingsFromDir(settings_path); +} + +static void importWifiApSettingsFromData() { + importWifiApSettingsFromDir(tt::file::MOUNT_POINT_DATA); +} + void bootSplashInit() { getMainDispatcher().dispatch([] { + // First import any provisioning files placed on the system data partition. + importWifiApSettingsFromData(); + + // Then scan attached SD cards as before. const auto sdcards = hal::findDevices(hal::Device::Type::SdCard); for (auto& sdcard : sdcards) { if (sdcard->isMounted()) { diff --git a/TactilityC/Source/tt_init.cpp b/TactilityC/Source/tt_init.cpp index 9a4f0a57..eaf3c801 100644 --- a/TactilityC/Source/tt_init.cpp +++ b/TactilityC/Source/tt_init.cpp @@ -138,6 +138,7 @@ const esp_elfsym main_symbols[] { // cstring ESP_ELFSYM_EXPORT(strlen), ESP_ELFSYM_EXPORT(strcmp), + ESP_ELFSYM_EXPORT(strncmp), ESP_ELFSYM_EXPORT(strncpy), ESP_ELFSYM_EXPORT(strcpy), ESP_ELFSYM_EXPORT(strcat), @@ -388,6 +389,7 @@ const esp_elfsym main_symbols[] { ESP_ELFSYM_EXPORT(lv_obj_get_style_layout), ESP_ELFSYM_EXPORT(lv_obj_update_layout), ESP_ELFSYM_EXPORT(lv_obj_set_scroll_dir), + ESP_ELFSYM_EXPORT(lv_obj_scroll_to_view), ESP_ELFSYM_EXPORT(lv_obj_set_style_radius), ESP_ELFSYM_EXPORT(lv_obj_set_style_border_width), ESP_ELFSYM_EXPORT(lv_obj_set_style_border_color), @@ -540,6 +542,7 @@ const esp_elfsym main_symbols[] { ESP_ELFSYM_EXPORT(lv_palette_darken), ESP_ELFSYM_EXPORT(lv_palette_lighten), // lv_display + ESP_ELFSYM_EXPORT(lv_display_get_default), ESP_ELFSYM_EXPORT(lv_display_get_horizontal_resolution), ESP_ELFSYM_EXPORT(lv_display_get_vertical_resolution), ESP_ELFSYM_EXPORT(lv_display_get_physical_horizontal_resolution), @@ -570,6 +573,29 @@ const esp_elfsym main_symbols[] { ESP_ELFSYM_EXPORT(lv_indev_get_key), ESP_ELFSYM_EXPORT(lv_indev_get_gesture_dir), ESP_ELFSYM_EXPORT(lv_indev_get_state), + // lv_timer + ESP_ELFSYM_EXPORT(lv_timer_handler), + ESP_ELFSYM_EXPORT(lv_timer_handler_run_in_period), + ESP_ELFSYM_EXPORT(lv_timer_periodic_handler), + ESP_ELFSYM_EXPORT(lv_timer_handler_set_resume_cb), + ESP_ELFSYM_EXPORT(lv_timer_create_basic), + ESP_ELFSYM_EXPORT(lv_timer_create), + ESP_ELFSYM_EXPORT(lv_timer_delete), + ESP_ELFSYM_EXPORT(lv_timer_pause), + ESP_ELFSYM_EXPORT(lv_timer_resume), + ESP_ELFSYM_EXPORT(lv_timer_set_cb), + ESP_ELFSYM_EXPORT(lv_timer_set_period), + ESP_ELFSYM_EXPORT(lv_timer_ready), + ESP_ELFSYM_EXPORT(lv_timer_set_repeat_count), + ESP_ELFSYM_EXPORT(lv_timer_set_auto_delete), + ESP_ELFSYM_EXPORT(lv_timer_set_user_data), + ESP_ELFSYM_EXPORT(lv_timer_reset), + ESP_ELFSYM_EXPORT(lv_timer_enable), + ESP_ELFSYM_EXPORT(lv_timer_get_idle), + ESP_ELFSYM_EXPORT(lv_timer_get_time_until_next), + ESP_ELFSYM_EXPORT(lv_timer_get_next), + ESP_ELFSYM_EXPORT(lv_timer_get_user_data), + ESP_ELFSYM_EXPORT(lv_timer_get_paused), // lvgl other ESP_ELFSYM_EXPORT(lv_refr_now), ESP_ELFSYM_EXPORT(lv_line_create),