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

Method parseSound

src/PeripheryManager.cpp:297–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297bool PeripheryManager_::parseSound(const char *json)
298{
299 StaticJsonDocument<128> doc;
300 DeserializationError error = deserializeJson(doc, json);
301 if (error)
302 {
303 return playFromFile(String(json));
304 }
305 if (doc.containsKey("sound"))
306 {
307 return playFromFile(doc["sound"].as<String>());
308 }
309 return false;
310}
311
312const char *PeripheryManager_::playRTTTLString(String rtttl)
313{

Callers 2

processMqttMessageFunction · 0.80
addHandlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected