MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / init

Method init

src/General/SysMsg.cpp:66–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 *****************************************************************************/
65
66bool SysMsg::init()
67{
68 bool status = false;
69
70 m_plugin = static_cast<SysMsgPlugin*>(PluginMgr::getInstance().install("SysMsgPlugin"));
71
72 if (nullptr != m_plugin)
73 {
74 uint8_t slotId = DisplayMgr::getInstance().getSlotIdByPluginUID(m_plugin->getUID());
75
76 /* Set infinite slot duration, because the system message plugin will enable/disable
77 * itself.
78 */
79 DisplayMgr::getInstance().setSlotDuration(slotId, 0U, false);
80 DisplayMgr::getInstance().lockSlot(slotId);
81 status = true;
82 }
83
84 return status;
85}
86
87void SysMsg::show(const String& msg, uint32_t duration, uint32_t max)
88{

Callers

nothing calls this directly

Calls 5

installMethod · 0.80
getUIDMethod · 0.80
setSlotDurationMethod · 0.80
lockSlotMethod · 0.80
getSlotIdByPluginUIDMethod · 0.45

Tested by

no test coverage detected