add debugging info, bug fix
This commit is contained in:
parent
a4c0c71e54
commit
eb4da9d637
|
|
@ -763,6 +763,7 @@ 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 );
|
||||
}
|
||||
|
||||
if (!fUsbPower) {
|
||||
|
|
@ -817,22 +818,28 @@ void startSendingUplink(bool firstTime)
|
|||
package_counter++;
|
||||
if (config_data.debug_level > 0) {
|
||||
gCatena.SafePrintf("LMIC.opmode just after SendBuffer (successful): %#x\n", LMIC.opmode);
|
||||
} 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 );
|
||||
}
|
||||
}
|
||||
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 );
|
||||
}
|
||||
} 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("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 );
|
||||
}
|
||||
} 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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue