Which Module wants a UI Frame? (#4967)

Previously our debug message for screens blandly stated
"Module wants a UI Frame"

This patch replaces the word Module with the name of the Module
in need of a frame a frame, enhancing debugging ability.
This commit is contained in:
Tom Fifield 2024-10-06 19:40:23 +08:00 committed by GitHub
parent 553e572eb5
commit ebc3a66d10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -240,7 +240,7 @@ std::vector<MeshModule *> MeshModule::GetMeshModulesWithUIFrames()
for (auto i = modules->begin(); i != modules->end(); ++i) { for (auto i = modules->begin(); i != modules->end(); ++i) {
auto &pi = **i; auto &pi = **i;
if (pi.wantUIFrame()) { if (pi.wantUIFrame()) {
LOG_DEBUG("Module wants a UI Frame\n"); LOG_DEBUG("%s wants a UI Frame\n", pi.name);
modulesWithUIFrames.push_back(&pi); modulesWithUIFrames.push_back(&pi);
} }
} }
@ -255,7 +255,7 @@ void MeshModule::observeUIEvents(Observer<const UIFrameEvent *> *observer)
auto &pi = **i; auto &pi = **i;
Observable<const UIFrameEvent *> *observable = pi.getUIFrameObservable(); Observable<const UIFrameEvent *> *observable = pi.getUIFrameObservable();
if (observable != NULL) { if (observable != NULL) {
LOG_DEBUG("Module wants a UI Frame\n"); LOG_DEBUG("%s wants a UI Frame\n", pi.name);
observer->observe(observable); observer->observe(observable);
} }
} }