FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

◆ readScreenMaps()

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

Definition at line 106 of file file_system.cpp.

107 {
108 Str text;
109 if (!readText(path, &text)) {
110 FASTLED_WARN("Failed to read file: " << path);
111 if (error) {
112 *error = "Failed to read file: ";
113 error->append(path);
114 }
115 return false;
116 }
117 Str err;
118 bool ok = ScreenMap::ParseJson(text.c_str(), out, &err);
119 if (!ok) {
120 FASTLED_WARN("Failed to parse screen map: " << err.c_str());
121 *error = err;
122 return false;
123 }
124 return true;
125}
bool readText(const char *path, Str *out)
static bool ParseJson(const char *jsonStrScreenMap, FixedMap< Str, ScreenMap, 16 > *segmentMaps, Str *err=nullptr)
Definition screenmap.cpp:51
#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: