Remove comments from SF

This commit is contained in:
Jm Casler 2021-11-20 21:35:13 -08:00
parent 5191fd6475
commit 97aec5f125
2 changed files with 1 additions and 46 deletions

View File

@ -102,15 +102,6 @@ void StoreForwardPlugin::historyReport()
{ {
DEBUG_MSG("Iterating through the message history...\n"); DEBUG_MSG("Iterating through the message history...\n");
DEBUG_MSG("Message history contains %u records\n", this->packetHistoryCurrent); 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); this->packetHistory[i].to & 0xffffffff);
storeForwardPlugin->sendPayload(to, i); storeForwardPlugin->sendPayload(to, i);
} }
// break;
} }
} }
} }
void StoreForwardPlugin::historyAdd(const MeshPacket &mp) void StoreForwardPlugin::historyAdd(const MeshPacket &mp)
{ {
//auto &p = *mp.decoded;
auto &p = mp.decoded; auto &p = mp.decoded;
//uint16_t payloadSize = p.payload.size;
this->packetHistory[this->packetHistoryCurrent].time = millis(); this->packetHistory[this->packetHistoryCurrent].time = millis();
this->packetHistory[this->packetHistoryCurrent].to = mp.to; this->packetHistory[this->packetHistoryCurrent].to = mp.to;
this->packetHistory[this->packetHistoryCurrent].from = mp.from; this->packetHistory[this->packetHistoryCurrent].from = mp.from;
@ -185,9 +171,6 @@ void StoreForwardPlugin::sendPayload(NodeNum dest, uint32_t packetHistory_index)
// TODO: Make this configurable. // TODO: Make this configurable.
p->want_ack = false; 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 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); 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() StoreForwardPlugin::StoreForwardPlugin()
: SinglePortPlugin("StoreForwardPlugin", PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("StoreForwardPlugin") : SinglePortPlugin("StoreForwardPlugin", PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("StoreForwardPlugin")
{ {
// StoreForwardPlugin::StoreForwardPlugin()
// : SinglePortPlugin("StoreForwardPlugin", PortNum_STORE_FORWARD_APP), concurrency::OSThread("StoreForwardPlugin")
//{
#ifndef NO_ESP32 #ifndef NO_ESP32

View File

@ -13,8 +13,6 @@ struct PacketHistoryStruct {
bool ack; bool ack;
uint8_t payload[Constants_DATA_PAYLOAD_LEN]; uint8_t payload[Constants_DATA_PAYLOAD_LEN];
pb_size_t payload_size; pb_size_t payload_size;
//uint8_t bytes[MAX_RHPACKETLEN];
//uint8_t bytes_size;
}; };
class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThread class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThread
@ -60,26 +58,3 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea
}; };
extern StoreForwardPlugin *storeForwardPlugin; 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;
*/