mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-10 15:37:17 +00:00
add note about how to send messages thanks @rw-w for the question
This commit is contained in:
parent
de9f7e6c39
commit
71be71d63d
@ -55,6 +55,10 @@ The easiest way to get started is:
|
|||||||
It is very common that you would like your plugin to be invoked periodically.
|
It is very common that you would like your plugin to be invoked periodically.
|
||||||
We use a crude/basic cooperative threading system to allow this on any of our supported platforms. Simply inherit from OSThread and implement runOnce(). See the OSThread [documentation](/src/concurrency/OSThread.h) for more details. For an example consumer of this API see RemoteHardwarePlugin::runOnce.
|
We use a crude/basic cooperative threading system to allow this on any of our supported platforms. Simply inherit from OSThread and implement runOnce(). See the OSThread [documentation](/src/concurrency/OSThread.h) for more details. For an example consumer of this API see RemoteHardwarePlugin::runOnce.
|
||||||
|
|
||||||
|
## Sending messages
|
||||||
|
|
||||||
|
If you would like to proactively send messages (rather than just responding to them), just call service.sendToMesh(). For an example of this see [NodeInfoPlugin::sendOurNodeInfo(...)](/src/plugins/NodeInfoPlugin.cpp).
|
||||||
|
|
||||||
## Picking a port number
|
## Picking a port number
|
||||||
|
|
||||||
For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a unique 'portnum' for their application.
|
For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a unique 'portnum' for their application.
|
||||||
|
Loading…
Reference in New Issue
Block a user