it's cleaner
@ -319,7 +319,7 @@ local ThemeSettings = SettingsScreen:new {
local theme_dir_iter = filesystem.iterator("/.themes/")
for dir in theme_dir_iter do
local theme_name = tostring(dir):match("(.+).lua$")
themeOptions[theme_name] = "/sdcard/.themes/" .. theme_name .. ".lua"
themeOptions[theme_name] = "/sd/.themes/" .. theme_name .. ".lua"
end
local saved_theme = theme.theme_filename();
@ -31,7 +31,7 @@ static const uint8_t kMaxOpenFiles = 8;
namespace drivers {
const char* kStoragePath = "/sdcard";
const char* kStoragePath = "/sd";
auto SdStorage::Create(IGpios& gpio) -> cpp::result<SdStorage*, Error> {
gpio.WriteSync(IGpios::Pin::kSdPowerEnable, 1);
@ -34,7 +34,7 @@ auto SaveScreenshot(lv_obj_t* obj, const std::string& path) -> void {
}
// The LVGL lodepng fork uses LVGL's file API, so an extra '/' is needed.
std::string fullpath = "//sdcard/" + path;
std::string fullpath = "//sd/" + path;
auto res = lodepng_encode_file(fullpath.c_str(), buf->data, buf->header.w,
buf->header.h, LCT_RGB, 8);
@ -730,7 +730,7 @@ void Lua::entry() {
sPowerFastChargeEnabled.setDirect(sServices->nvs().FastCharge());
if (sServices->sd() == drivers::SdState::kMounted) {
sLua->RunScript("/sdcard/config.lua");
sLua->RunScript("/sd/config.lua");
sLua->RunScript("/lua/main.lua");