mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
Plugins refactoring: handleReceived return enumeration ProcessMessage
Use `ProcessMessage::CONTINUE` to allows other modules to process a message. Use `ProcessMessage::STOP` to stop further message processing.
This commit is contained in:
@@ -143,7 +143,7 @@ ExternalNotificationPlugin::ExternalNotificationPlugin()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
|
||||
ProcessMessage ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
|
||||
{
|
||||
#ifndef NO_ESP32
|
||||
|
||||
@@ -176,5 +176,5 @@ bool ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
|
||||
|
||||
#endif
|
||||
|
||||
return false; // Very important to never return TRUE here. TRUE means we handled the packet and we will stop letting other plugins see it
|
||||
return ProcessMessage::CONTINUE; // Let others look at this message also if they want
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user