From 97aec5f125414396715e8021fbbc0f9eadca37ae Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sat, 20 Nov 2021 21:35:13 -0800 Subject: [PATCH] Remove comments from SF --- src/plugins/esp32/StoreForwardPlugin.cpp | 20 ------------------ src/plugins/esp32/StoreForwardPlugin.h | 27 +----------------------- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/src/plugins/esp32/StoreForwardPlugin.cpp b/src/plugins/esp32/StoreForwardPlugin.cpp index f562c54ba..abb49e7b0 100644 --- a/src/plugins/esp32/StoreForwardPlugin.cpp +++ b/src/plugins/esp32/StoreForwardPlugin.cpp @@ -102,15 +102,6 @@ void StoreForwardPlugin::historyReport() { DEBUG_MSG("Iterating through the message history...\n"); DEBUG_MSG("Message history contains %u records\n", this->packetHistoryCurrent); - /* - uint32_t startTimer = millis(); - for (int i = 0; i < this->packetHistoryCurrent; i++) { - if (this->packetHistory[i].time) { - // DEBUG_MSG("... time-%u to-0x%08x\n", this->packetHistory[i].time, this->packetHistory[i].to & 0xffffffff); - } - } - DEBUG_MSG("StoreForwardPlugin::historyReport runtime - %u ms\n", millis() - startTimer); - */ } /* @@ -145,19 +136,14 @@ void StoreForwardPlugin::historySend(uint32_t msAgo, uint32_t to) this->packetHistory[i].to & 0xffffffff); storeForwardPlugin->sendPayload(to, i); } - - // break; } } } void StoreForwardPlugin::historyAdd(const MeshPacket &mp) { - //auto &p = *mp.decoded; auto &p = mp.decoded; - //uint16_t payloadSize = p.payload.size; - this->packetHistory[this->packetHistoryCurrent].time = millis(); this->packetHistory[this->packetHistoryCurrent].to = mp.to; this->packetHistory[this->packetHistoryCurrent].from = mp.from; @@ -185,9 +171,6 @@ void StoreForwardPlugin::sendPayload(NodeNum dest, uint32_t packetHistory_index) // TODO: Make this configurable. p->want_ack = false; - //static char heartbeatString[20]; - //snprintf(heartbeatString, sizeof(heartbeatString), "From SF"); - p->decoded.payload.size = this->packetHistory[packetHistory_index].payload_size; // You must specify how many bytes are in the reply memcpy(p->decoded.payload.bytes, this->packetHistory[packetHistory_index].payload, this->packetHistory[packetHistory_index].payload_size); @@ -239,9 +222,6 @@ ProcessMessage StoreForwardPlugin::handleReceived(const MeshPacket &mp) StoreForwardPlugin::StoreForwardPlugin() : SinglePortPlugin("StoreForwardPlugin", PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("StoreForwardPlugin") { - // StoreForwardPlugin::StoreForwardPlugin() - // : SinglePortPlugin("StoreForwardPlugin", PortNum_STORE_FORWARD_APP), concurrency::OSThread("StoreForwardPlugin") - //{ #ifndef NO_ESP32 diff --git a/src/plugins/esp32/StoreForwardPlugin.h b/src/plugins/esp32/StoreForwardPlugin.h index 0a182d18f..0e65594f1 100644 --- a/src/plugins/esp32/StoreForwardPlugin.h +++ b/src/plugins/esp32/StoreForwardPlugin.h @@ -13,8 +13,6 @@ struct PacketHistoryStruct { bool ack; uint8_t payload[Constants_DATA_PAYLOAD_LEN]; pb_size_t payload_size; - //uint8_t bytes[MAX_RHPACKETLEN]; - //uint8_t bytes_size; }; class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThread @@ -59,27 +57,4 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea virtual ProcessMessage handleReceived(const MeshPacket &mp); }; -extern StoreForwardPlugin *storeForwardPlugin; - -/* - * Radio interface for StoreForwardPlugin - * - */ - -/* -class StoreForwardPluginRadio : public SinglePortPlugin -{ - // uint32_t lastRxID; - - public: - StoreForwardPluginRadio() : SinglePortPlugin("StoreForwardPluginRadio", PortNum_STORE_FORWARD_APP) {} - // StoreForwardPluginRadio() : SinglePortPlugin("StoreForwardPluginRadio", PortNum_TEXT_MESSAGE_APP) {} - - void sendPayloadHeartbeat(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false); - - protected: - virtual MeshPacket *allocReply2(); -}; - -extern StoreForwardPluginRadio *storeForwardPluginRadio; -*/ +extern StoreForwardPlugin *storeForwardPlugin; \ No newline at end of file