Formatting applied

This commit is contained in:
Jm Casler 2021-11-18 09:36:39 -08:00
parent 37aab8a42b
commit 32017e53f5
2 changed files with 18 additions and 19 deletions

View File

@ -22,7 +22,6 @@
*/
StoreForwardPlugin *storeForwardPlugin;
int32_t StoreForwardPlugin::runOnce()
@ -119,14 +118,15 @@ void StoreForwardPlugin::historySend(uint32_t msAgo, uint32_t to)
for (int i = 0; i < this->packetHistoryCurrent; i++) {
if (this->packetHistory[i].time) {
/*
Stored packet was sent to a broadcast address
*/
if ((this->packetHistory[i].to & 0xffffffff) == 0xffffffff) {
DEBUG_MSG("Request: to-0x%08x, Stored: time-%u to-0x%08x\n", to & 0xffffffff, this->packetHistory[i].time, this->packetHistory[i].to & 0xffffffff);
DEBUG_MSG("Request: to-0x%08x, Stored: time-%u to-0x%08x\n", to & 0xffffffff, this->packetHistory[i].time,
this->packetHistory[i].to & 0xffffffff);
//bool pb_decode_from_bytes(const uint8_t *srcbuf, size_t srcbufsize, const pb_msgdesc_t *fields, void *dest_struct);
// bool pb_decode_from_bytes(const uint8_t *srcbuf, size_t srcbufsize, const pb_msgdesc_t *fields, void
// *dest_struct);
pb_decode_from_bytes(this->packetHistory[i].bytes, this->packetHistory[i].bytes_size, ToRadio_fields, &mp);
/*
@ -145,7 +145,8 @@ void StoreForwardPlugin::historySend(uint32_t msAgo, uint32_t to)
TODO: TEST ME! I don't know if this works.
*/
if ((this->packetHistory[i].to & 0xffffffff) == to) {
DEBUG_MSG("Request: to-0x%08x, Stored: time-%u to-0x%08x\n", to & 0xffffffff, this->packetHistory[i].time, this->packetHistory[i].to & 0xffffffff);
DEBUG_MSG("Request: to-0x%08x, Stored: time-%u to-0x%08x\n", to & 0xffffffff, this->packetHistory[i].time,
this->packetHistory[i].to & 0xffffffff);
storeForwardPlugin->sendPayload(to, true);
}
@ -171,7 +172,6 @@ void StoreForwardPlugin::historyAdd(const MeshPacket *mp)
this->packetHistory[this->packetHistoryCurrent].to = mp->to;
this->packetHistory[this->packetHistoryCurrent].bytes_size = sizeof(bytes);
this->packetHistoryCurrent++;
}
MeshPacket *StoreForwardPlugin::allocReply()
@ -198,7 +198,6 @@ void StoreForwardPlugin::sendPayload(NodeNum dest, bool wantReplies)
service.sendToMesh(p);
}
ProcessMessage StoreForwardPlugin::handleReceived(const MeshPacket &mp)
{
#ifndef NO_ESP32
@ -247,7 +246,6 @@ StoreForwardPlugin::StoreForwardPlugin()
// : SinglePortPlugin("StoreForwardPlugin", PortNum_STORE_FORWARD_APP), concurrency::OSThread("StoreForwardPlugin")
//{
#ifndef NO_ESP32
isPromiscuous = true; // Brown chicken brown cow

View File

@ -50,7 +50,8 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea
/** Called to handle a particular incoming message
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for
it
*/
virtual ProcessMessage handleReceived(const MeshPacket &mp);
};