FastLED 3.9.15
Loading...
Searching...
No Matches

◆ readScreenMaps()

bool fl::FileSystem::readScreenMaps ( const char * path,
fl::fl_map< string, ScreenMap > * out,
string * error = nullptr )

Definition at line 114 of file file_system.cpp.

115 {
116 string text;
117 if (!readText(path, &text)) {
118 FASTLED_WARN("Failed to read file: " << path);
119 if (error) {
120 *error = "Failed to read file: ";
121 error->append(path);
122 }
123 return false;
124 }
125 string err;
126 bool ok = ScreenMap::ParseJson(text.c_str(), out, &err);
127 if (!ok) {
128 FASTLED_WARN("Failed to parse screen map: " << err.c_str());
129 *error = err;
130 return false;
131 }
132 return true;
133}
bool readText(const char *path, string *out)
static bool ParseJson(const char *jsonStrScreenMap, fl::fl_map< string, ScreenMap > *segmentMaps, string *err=nullptr)
Definition screenmap.cpp:82
#define FASTLED_WARN
Definition warn.h:8

References fl::string::append(), fl::StrN< SIZE >::c_str(), FASTLED_WARN, fl::ScreenMap::ParseJson(), and readText().

+ Here is the call graph for this function: