mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Implement interface for plugins to have custom UI Frames
This commit is contained in:
@@ -75,4 +75,18 @@ void MeshPlugin::sendResponse(const MeshPacket &req) {
|
||||
void setReplyTo(MeshPacket *p, const MeshPacket &to) {
|
||||
p->to = to.from;
|
||||
p->want_ack = to.want_ack;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<MeshPlugin *> MeshPlugin::GetMeshPluginsWithUIFrames() {
|
||||
|
||||
std::vector<MeshPlugin *> pluginsWithUIFrames;
|
||||
for (auto i = plugins->begin(); i != plugins->end(); ++i) {
|
||||
auto &pi = **i;
|
||||
if ( pi.wantUIFrame()) {
|
||||
DEBUG_MSG("Plugin wants a UI Frame\n");
|
||||
pluginsWithUIFrames.push_back(&pi);
|
||||
}
|
||||
}
|
||||
return pluginsWithUIFrames;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user