Save partial work for S&F

This commit is contained in:
Jm Casler 2021-12-06 21:01:18 -08:00
parent c83ca7bfdd
commit b0a6c8929c
2 changed files with 5 additions and 10 deletions

View File

@ -38,9 +38,8 @@ int32_t StoreForwardPlugin::runOnce()
this->packetHistoryTXQueue_index++;
}
}
DEBUG_MSG("SF myNodeInfo.bitrate = %f bytes / sec\n", myNodeInfo.bitrate);
// TODO: Dynamicly adjust the time this returns in the loop based on the size of the packets being actually
// transmitted.
return (this->packetTimeMax);
} else {
DEBUG_MSG("Store & Forward Plugin - Disabled (is_router = false)\n");
@ -408,13 +407,9 @@ StoreForwardPlugin::StoreForwardPlugin()
// Popupate PSRAM with our data structures.
this->populatePSRAM();
// Calculate the packet time.
// this->packetTimeMax = RadioLibInterface::instance->getPacketTime(Constants_DATA_PAYLOAD_LEN);
// RadioLibInterface::instance->getPacketTime(Constants_DATA_PAYLOAD_LEN);
// RadioLibInterface::instance->getPacketTime(Constants_DATA_PAYLOAD_LEN);
// RadioInterface::getPacketTime(500)l
this->packetTimeMax = 2000;
//this->packetTimeMax = 2000;
//DEBUG_MSG("SF Time to Transmit maxPacketSize (%d bytes) %d ms\n", maxPacketSize, this->packetTimeMax);
} else {
DEBUG_MSG("Device has less than 1M of PSRAM free. Aborting startup.\n");

View File

@ -33,7 +33,7 @@ class StoreForwardPlugin : public SinglePortPlugin, private concurrency::OSThrea
uint32_t packetHistoryTXQueue_size;
uint32_t packetHistoryTXQueue_index = 0;
uint32_t packetTimeMax = 0;
uint32_t packetTimeMax = 2000;
public:
StoreForwardPlugin();