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

◆ readScreenMap()

bool fl::FileSystem::readScreenMap ( const char * path,
const char * name,
ScreenMap * out,
string * error = nullptr )

Definition at line 133 of file file_system.cpp.

134 {
135 string text;
136 if (!readText(path, &text)) {
137 FASTLED_WARN("Failed to read file: " << path);
138 if (error) {
139 *error = "Failed to read file: ";
140 error->append(path);
141 }
142 return false;
143 }
144 string err;
145 bool ok = ScreenMap::ParseJson(text.c_str(), name, out, &err);
146 if (!ok) {
147 FASTLED_WARN("Failed to parse screen map: " << err.c_str());
148 *error = err;
149 return false;
150 }
151 return true;
152}
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:7

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

+ Here is the call graph for this function: