Update filenames from plugins to modules

This commit is contained in:
Jm Casler
2022-02-27 00:18:35 -08:00
parent d57704b3bd
commit 86e767eec2
27 changed files with 26 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
#include "configuration.h"
#include "ReplyModule.h"
#include "MeshService.h"
#include "main.h"
#include <assert.h>
MeshPacket *ReplyPlugin::allocReply()
{
assert(currentRequest); // should always be !NULL
auto req = *currentRequest;
auto &p = req.decoded;
// The incoming message is in p.payload
DEBUG_MSG("Received message from=0x%0x, id=%d, msg=%.*s\n", req.from, req.id, p.payload.size, p.payload.bytes);
screen->print("Sending reply\n");
const char *replyStr = "Message Received";
auto reply = allocDataPacket(); // Allocate a packet for sending
reply->decoded.payload.size = strlen(replyStr); // You must specify how many bytes are in the reply
memcpy(reply->decoded.payload.bytes, replyStr, reply->decoded.payload.size);
return reply;
}