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 135 of file file_system.cpp.

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