mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
Add doc note about threading and use OSThread to make GPIO watching work
Thanks to @mc-hamster for the idea
This commit is contained in:
@@ -10,7 +10,7 @@ For app cleanup:
|
||||
* DONE write devapi user guide
|
||||
* DONE update android code: https://developer.android.com/topic/libraries/view-binding/migration
|
||||
* only do wantReplies once per packet type, if we change network settings force it again
|
||||
* make gpio watch work, use thread and setup
|
||||
* test GPIO watch
|
||||
* DONE make hello world example service
|
||||
* make python ping command
|
||||
* DONE have python tool check max packet size before sending to device
|
||||
|
||||
@@ -49,6 +49,11 @@ The easiest way to get started is:
|
||||
* Rebuild with your new messaging goodness and install on the device
|
||||
* Use the [meshtastic commandline tool](https://github.com/meshtastic/Meshtastic-python) to send a packet to your board "meshtastic --dest 1234 --ping"
|
||||
|
||||
## Threading
|
||||
|
||||
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.
|
||||
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user