This commit is contained in:
parent
e30a8293ac
commit
0c5c673e5e
|
|
@ -698,6 +698,7 @@ void StartNewIteration() {
|
||||||
while (send_in_progress && ((millis() - start_time) < 300000))
|
while (send_in_progress && ((millis() - start_time) < 300000))
|
||||||
{
|
{
|
||||||
os_runloop_once();
|
os_runloop_once();
|
||||||
|
delay(10);
|
||||||
// gCatena.poll();
|
// gCatena.poll();
|
||||||
// yield();
|
// yield();
|
||||||
}
|
}
|
||||||
|
|
@ -802,6 +803,7 @@ void startSendingUplink(bool firstTime)
|
||||||
package_counter++;
|
package_counter++;
|
||||||
} else {
|
} else {
|
||||||
if (config_data.debug_level > 0) {
|
if (config_data.debug_level > 0) {
|
||||||
|
gCatena.SafePrintf("LMIC.opmode just before SendBuffer: %#x\n", LMIC.opmode);
|
||||||
gCatena.SafePrintf("SendBuffer not firstTime\n");
|
gCatena.SafePrintf("SendBuffer not firstTime\n");
|
||||||
}
|
}
|
||||||
gLoRaWAN.SendBuffer((uint8_t*)&lora_data, sizeof(LORA_data), sendBufferDoneCb, NULL, fConfirmed, kUplinkPort);
|
gLoRaWAN.SendBuffer((uint8_t*)&lora_data, sizeof(LORA_data), sendBufferDoneCb, NULL, fConfirmed, kUplinkPort);
|
||||||
|
|
@ -819,6 +821,7 @@ static void sendBufferDoneCb(
|
||||||
|
|
||||||
if (config_data.debug_level > 1) {
|
if (config_data.debug_level > 1) {
|
||||||
gLed.Set(LedPattern::Settling);
|
gLed.Set(LedPattern::Settling);
|
||||||
|
gCatena.SafePrintf("LMIC.opmode in sendBufferDoneCb: %#x\n", LMIC.opmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
pFn = settleDoneCb;
|
pFn = settleDoneCb;
|
||||||
|
|
@ -834,7 +837,7 @@ static void sendBufferDoneCb(
|
||||||
gLoRaWAN.Shutdown();
|
gLoRaWAN.Shutdown();
|
||||||
}
|
}
|
||||||
else if (config_data.debug_level > 0) {
|
else if (config_data.debug_level > 0) {
|
||||||
gCatena.SafePrintf("send buffer failed\n");
|
gCatena.SafePrintf("send buffer failed, LMIC.opmode: %#x\n", LMIC.opmode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -961,6 +964,7 @@ void doSleepAlert(const bool fDeepSleep)
|
||||||
while (uint32_t(millis() - tNow) < 1000)
|
while (uint32_t(millis() - tNow) < 1000)
|
||||||
{
|
{
|
||||||
os_runloop_once();
|
os_runloop_once();
|
||||||
|
delay(10);
|
||||||
//gCatena.poll();
|
//gCatena.poll();
|
||||||
//yield();
|
//yield();
|
||||||
}
|
}
|
||||||
|
|
@ -975,6 +979,7 @@ void doSleepAlert(const bool fDeepSleep)
|
||||||
while (uint32_t(millis() - tNow) < 100)
|
while (uint32_t(millis() - tNow) < 100)
|
||||||
{
|
{
|
||||||
os_runloop_once();
|
os_runloop_once();
|
||||||
|
delay(10);
|
||||||
//gCatena.poll();
|
//gCatena.poll();
|
||||||
//yield();
|
//yield();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ enum {
|
||||||
|
|
|
|
||||||
\****************************************************************************/
|
\****************************************************************************/
|
||||||
|
|
||||||
static const int32_t fwVersion = 20200529;
|
static const int32_t fwVersion = 20200530;
|
||||||
|
|
||||||
static const byte INIT_PACKAGE_INTERVAL = 100; // send an init package every 100 packages;
|
static const byte INIT_PACKAGE_INTERVAL = 100; // send an init package every 100 packages;
|
||||||
static const byte MAX_VALUES_TO_SEND = 8;
|
static const byte MAX_VALUES_TO_SEND = 8;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue