From 57d795c36be963fd0a5533cac6217e99246cd92b Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Sat, 6 Jun 2020 08:37:28 +0200 Subject: [PATCH] 20200605 --- mini-beieli-node.ino | 22 ++++++++++++++-------- mini_beieli_node.h | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/mini-beieli-node.ino b/mini-beieli-node.ino index 2827fce..af8ce23 100644 --- a/mini-beieli-node.ino +++ b/mini-beieli-node.ino @@ -498,7 +498,7 @@ uint8_t GetVBatValue(int millivolts) void DoDeepSleep(uint32_t sleep_time) { if (config_data.debug_level > 0) { - gCatena.SafePrintf("DoDeepSleep, now going to deep sleep\n"); + gCatena.SafePrintf("DoDeepSleep, now going to deep sleep, millis: %d\n",millis()); } // Prepare Deep Sleep @@ -515,7 +515,7 @@ void DoDeepSleep(uint32_t sleep_time) deepSleepRecovery(); if (config_data.debug_level > 0) { - gCatena.SafePrintf("done with deep sleep\n"); + gCatena.SafePrintf("done with deep sleep, millis: %d\n",millis()); } } @@ -760,7 +760,8 @@ void StartNewIteration() { if (config_data.debug_level > 0) { gCatena.SafePrintf("LMIC.opmode just before Sleeping: %#x\n", LMIC.opmode); - gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail ); + gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d, os_getTime: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail, os_getTime()); + gCatena.SafePrintf("LMIC.seqnoUp: %d, LMIC.seqnoDn: %d\n",LMIC.seqnoUp, LMIC.seqnoDn); } if (!fUsbPower) { @@ -815,28 +816,33 @@ void startSendingUplink(bool firstTime) package_counter++; if (config_data.debug_level > 0) { gCatena.SafePrintf("LMIC.opmode just after SendBuffer (successful): %#x\n", LMIC.opmode); - gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail ); + gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d, os_getTime: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail, os_getTime()); + gCatena.SafePrintf("LMIC.seqnoUp: %d, LMIC.seqnoDn: %d\n",LMIC.seqnoUp, LMIC.seqnoDn); } } else { gCatena.SafePrintf("LMIC.opmode just before SendBuffer (failed): %#x\n", LMIC.opmode); - gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail ); + gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d, os_getTime: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail, os_getTime()); + gCatena.SafePrintf("LMIC.seqnoUp: %d, LMIC.seqnoDn: %d\n",LMIC.seqnoUp, LMIC.seqnoDn); } } else { if (config_data.debug_level > 0) { gCatena.SafePrintf("LMIC.opmode just before SendBuffer: %#x\n", LMIC.opmode); - gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail ); + gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d, os_getTime: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail, os_getTime()); + gCatena.SafePrintf("LMIC.seqnoUp: %d, LMIC.seqnoDn: %d\n",LMIC.seqnoUp, LMIC.seqnoDn); gCatena.SafePrintf("SendBuffer not firstTime\n"); } if (gLoRaWAN.SendBuffer((uint8_t*)&lora_data, sizeof(LORA_data), sendBufferDoneCb, NULL, fConfirmed, kUplinkPort)) { package_counter++; if (config_data.debug_level > 0) { gCatena.SafePrintf("LMIC.opmode just after SendBuffer (successful): %#x\n", LMIC.opmode); - gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail ); + gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d, os_getTime: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail, os_getTime()); + gCatena.SafePrintf("LMIC.seqnoUp: %d, LMIC.seqnoDn: %d\n",LMIC.seqnoUp, LMIC.seqnoDn); } } else { gCatena.SafePrintf("LMIC.opmode just before SendBuffer (failed): %#x\n", LMIC.opmode); - gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail ); + gCatena.SafePrintf("LMIC.globalDutyRate: %d, LMIC.globalDutyAvail: %d, os_getTime: %d\n", LMIC.globalDutyRate, LMIC.globalDutyAvail, os_getTime()); + gCatena.SafePrintf("LMIC.seqnoUp: %d, LMIC.seqnoDn: %d\n",LMIC.seqnoUp, LMIC.seqnoDn); } } diff --git a/mini_beieli_node.h b/mini_beieli_node.h index 8a40b5f..1a59727 100644 --- a/mini_beieli_node.h +++ b/mini_beieli_node.h @@ -56,7 +56,7 @@ enum { | \****************************************************************************/ -static const int32_t fwVersion = 20200604; +static const int32_t fwVersion = 20200605; static const byte INIT_PACKAGE_INTERVAL = 100; // send an init package every 100 packages; static const byte MAX_VALUES_TO_SEND = 8;