begin moving position stuff into plugin

This commit is contained in:
Kevin Hester
2020-11-28 13:51:51 +08:00
parent 5138aff4b2
commit 7737123d0f
8 changed files with 29 additions and 14 deletions

View File

@@ -0,0 +1,13 @@
#include "configuration.h"
#include "PositionPlugin.h"
#include "NodeDB.h"
PositionPlugin positionPlugin;
bool PositionPlugin::handleReceived(const MeshPacket &mp)
{
auto &p = mp.decoded.data;
DEBUG_MSG("Received position from=0x%0x, id=%d, msg=%.*s\n", mp.from, mp.id, p.payload.size, p.payload.bytes);
return false; // Let others look at this message also if they want
}

View File

@@ -7,12 +7,12 @@
class TextMessagePlugin : public MeshPlugin, public Observable<const MeshPacket *>
{
public:
/** Constructor
* name is for debugging output
*/
TextMessagePlugin() : MeshPlugin("text") {}
protected:
/**
* @return true if you want to receive the specified portnum
*/