5 init packets instead of 3

This commit is contained in:
Joerg Lehmann 2019-12-14 23:07:56 +01:00
parent c13648ff6d
commit 9830316e0d
1 changed files with 6 additions and 6 deletions

View File

@ -706,9 +706,9 @@ void StartNewIteration() {
if (config_data.debug_level > 0) { if (config_data.debug_level > 0) {
gCatena.SafePrintf("%010d - startSendingUplink(), my_position: %d, iteration: %d, package_counter: %d\n", millis(), my_position, iteration, package_counter); gCatena.SafePrintf("%010d - startSendingUplink(), my_position: %d, iteration: %d, package_counter: %d\n", millis(), my_position, iteration, package_counter);
} }
// the first 3 packets are "Init-Packets" or each INIT_PACKAGE_INTERVAL ... // the first 5 packets are "Init-Packets" or each INIT_PACKAGE_INTERVAL ...
startSendingUplink(next_package_is_init_package); startSendingUplink(next_package_is_init_package);
next_package_is_init_package = ((iteration < 3) || ((package_counter % INIT_PACKAGE_INTERVAL) == 0)); next_package_is_init_package = ((iteration < 5) || ((package_counter % INIT_PACKAGE_INTERVAL) == 0));
if (config_data.debug_level > 1) { if (config_data.debug_level > 1) {
gLed.Set(LedPattern::TwoShort); gLed.Set(LedPattern::TwoShort);
@ -743,8 +743,8 @@ void StartNewIteration() {
sleep_time_sec = 5; sleep_time_sec = 5;
} }
// for the first 3 iterations, we set the sleep time to 10 seconds only... // for the first 5 iterations, we set the sleep time to 10 seconds only...
if (iteration <= 3) { if (iteration <= 5) {
sleep_time_sec = 10; sleep_time_sec = 10;
} }
@ -969,9 +969,9 @@ static void receiveMessage(void *pContext, uint8_t port, const uint8_t *pMessage
gCatena.SafePrintf("\n"); gCatena.SafePrintf("\n");
} }
if (LMIC.seqnoUp > 3) { if (LMIC.seqnoUp > 5) {
if (config_data.debug_level > 0) { if (config_data.debug_level > 0) {
gCatena.SafePrintf("setting calibration config with downlink is only possible within first three uplink packets!\n"); gCatena.SafePrintf("setting calibration config with downlink is only possible within first five uplink packets!\n");
return; return;
} }