Remove comments from SF

1.2-legacy
Jm Casler 2021-11-20 21:35:13 -08:00
rodzic 5191fd6475
commit 97aec5f125
2 zmienionych plików z 1 dodań i 46 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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;