Portnum promiscuity for text messages from other modules (#2732)

* Add interested portnums to TextMessageModule

* Send Detection Sensor Module messages on its own portnum

* Add to Ext. Notification and consolidate logic

* RANGE_TEST_APP portnum for RangeTestModule
This commit is contained in:
Ben Meadors
2023-08-19 07:46:34 -05:00
committed by GitHub
parent 2dbdda204f
commit 5d78795065
8 changed files with 29 additions and 7 deletions

View File

@@ -128,6 +128,11 @@ int32_t ExternalNotificationModule::runOnce()
}
}
bool ExternalNotificationModule::wantPacket(const meshtastic_MeshPacket *p)
{
return MeshService::isTextPayload(p);
}
/**
* Sets the external notification on for the specified index.
*
@@ -212,8 +217,8 @@ void ExternalNotificationModule::stopNow()
}
ExternalNotificationModule::ExternalNotificationModule()
: SinglePortModule("ExternalNotificationModule", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread(
"ExternalNotificationModule")
: SinglePortModule("ExternalNotificationModule", meshtastic_PortNum_TEXT_MESSAGE_APP),
concurrency::OSThread("ExternalNotificationModule")
{
/*
Uncomment the preferences below if you want to use the module