-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: enhancementProposed improvementProposed improvement
Description
If the arduino receives an interrupt while sending, the transmission is cancelled abruptly.
I suggest continuing the sleep if the interrupt source was not interrupt_pin
I use following modification, but I won't make a PR of it since I consider it a hacky fix
void SFX_stop_sleep() {
SFX_continue_sleep = false;
}
void SFX_continuable_sleep(uint32_t time) {
SFX_continue_sleep = true;
uint32_t ending = SFX_rtc.getEpoch() * 1000 + time;
while (SFX_rtc.getEpoch() * 1000 < ending) {
time = ending - SFX_rtc.getEpoch() * 1000;
LowPower.sleep(time);
if (!SFX_continue_sleep)
return;
}
}
and following in SIGFOXClass::send
LowPower.attachInterruptWakeup(interrupt_pin, SFX_stop_sleep, FALLING);
SFX_continuable_sleep(timeout);
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: enhancementProposed improvementProposed improvement