Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/LoRaApp/SimpleLoRaApp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,16 @@ void SimpleLoRaApp::handleMessage(cMessage *msg)
if(loRaSF == 10) time = 49.3568;
if(loRaSF == 11) time = 85.6064;
if(loRaSF == 12) time = 171.2128;
simtime_t prevTimeToNextPacket = par("timeToNextPacket");
short int isTTNPconstant = 0;
do {
timeToNextPacket = par("timeToNextPacket");
if (timeToNextPacket == prevTimeToNextPacket)
{
isTTNPconstant++;
if (isTTNPconstant > 3)
error("timeToNextPacket is constant and shorter than packet transmission time");
}
//if(timeToNextPacket < 3) error("Time to next packet must be grater than 3");
} while(timeToNextPacket <= time);
sendMeasurements = new cMessage("sendMeasurements");
Expand Down