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

Method start

lib/MultiIconPlugin/src/MultiIconPlugin.cpp:249–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void MultiIconPlugin::start(uint16_t width, uint16_t height)
250{
251 uint8_t slotId;
252 MutexGuard<MutexRecursive> guard(m_mutex);
253
254 m_view.init(width, height);
255
256 PluginWithConfig::start(width, height);
257
258 for (slotId = 0U; slotId < _MultiIconPlugin::View::MAX_ICON_SLOTS; ++slotId)
259 {
260 IconSlot& iconSlot = m_slots[slotId];
261
262 if (FileMgrService::FILE_ID_INVALID != iconSlot.fileId)
263 {
264 String iconFullPath;
265
266 if (false == FileMgrService::getInstance().getFileFullPathById(iconFullPath, iconSlot.fileId))
267 {
268 LOG_WARNING("Unknown file id %u.", iconSlot.fileId);
269 }
270 else if (false == m_view.loadIcon(slotId, iconFullPath))
271 {
272 LOG_ERROR("Icon not found: %s", iconFullPath.c_str());
273 }
274 else
275 {
276 ;
277 }
278 }
279 }
280}
281
282void MultiIconPlugin::stop()
283{

Callers

nothing calls this directly

Calls 4

getFileFullPathByIdMethod · 0.80
c_strMethod · 0.80
initMethod · 0.45
loadIconMethod · 0.45

Tested by

no test coverage detected