MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / getAppsWithIcon

Method getAppsWithIcon

src/DisplayManager.cpp:2287–2305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2285}
2286
2287String DisplayManager_::getAppsWithIcon()
2288{
2289 DynamicJsonDocument jsonDocument(1024);
2290 JsonArray jsonArray = jsonDocument.to<JsonArray>();
2291 for (const auto &app : Apps)
2292 {
2293 JsonObject appObject = jsonArray.createNestedObject();
2294 appObject["name"] = app.first;
2295
2296 CustomApp *customApp = getCustomAppByName(app.first);
2297 if (customApp != nullptr)
2298 {
2299 appObject["icon"] = customApp->iconName;
2300 }
2301 }
2302 String jsonString;
2303 serializeJson(jsonArray, jsonString);
2304 return jsonString;
2305}
2306
2307CRGB DisplayManager_::getPixelColor(int16_t x, int16_t y)
2308{

Callers 1

addHandlerFunction · 0.80

Calls 1

getCustomAppByNameFunction · 0.85

Tested by

no test coverage detected