MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / onStart

Method onStart

Tactility/Source/service/gui/GuiService.cpp:179–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179bool GuiService::onStart(ServiceContext& service) {
180 thread = new Thread(
181 GUI_TASK_NAME,
182 4096, // Last known minimum was 2800 for launching desktop
183 guiMain
184 );
185 thread->setPriority(THREAD_PRIORITY_SERVICE);
186
187 const auto loader = findLoaderService();
188 assert(loader != nullptr);
189 loader_pubsub_subscription = loader->getPubsub()->subscribe([this](auto event) {
190 onLoaderEvent(event);
191 });
192
193 isStarted = true;
194
195 lvgl::startUsbHidInput();
196
197 thread->start();
198
199 return true;
200}
201
202void GuiService::onStop(ServiceContext& service) {
203 lvgl::stopUsbHidInput();

Callers

nothing calls this directly

Calls 6

findLoaderServiceFunction · 0.85
setPriorityMethod · 0.80
subscribeMethod · 0.80
startUsbHidInputFunction · 0.50
getPubsubMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected