move packet handling into its own thread

This commit is contained in:
geeksville
2020-05-01 12:11:04 -07:00
parent 763276a2c8
commit 50213d8323
10 changed files with 178 additions and 27 deletions

View File

@@ -7,11 +7,20 @@
#include <pb_decode.h>
#include <pb_encode.h>
#define RADIO_STACK_SIZE 4096
RadioInterface::RadioInterface() : txQueue(MAX_TX_QUEUE)
{
assert(sizeof(PacketHeader) == 4); // make sure the compiler did what we expected
}
bool RadioInterface::init()
{
start("radio", RADIO_STACK_SIZE); // Start our worker thread
return true;
}
ErrorCode SimRadio::send(MeshPacket *p)
{
DEBUG_MSG("SimRadio.send\n");