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

◆ readScreenMaps()

bool fl::FileSystem::readScreenMaps ( const char * path,
FixedMap< Str, ScreenMap, 16 > * out,
Str * error = nullptr )

Definition at line 113 of file file_system.cpp.

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

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

+ Here is the call graph for this function: