Skip to content

Commit 669979d

Browse files
committed
Fix timeouts in non-debug mode
1 parent 63328b9 commit 669979d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SigFox.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,22 +152,22 @@ int SIGFOXClass::send(unsigned char mess[], int len, bool rx)
152152
digitalWrite(chip_select_pin, HIGH);
153153
int ret = 99;
154154

155-
int timeout = 6000;
155+
int timeout = 10000; //10 seconds
156156
if (rx) {
157-
timeout = 10000;
157+
timeout = 60000; //60 seconds
158158
}
159159

160160
if (!debugging) {
161161
LowPower.attachInterruptWakeup(interrupt_pin, NULL, FALLING);
162-
LowPower.sleep(10000);
162+
LowPower.sleep(timeout);
163163
if (digitalRead(interrupt_pin) == 0) {
164164
status();
165165
ret = statusCode(SIGFOX);
166166
}
167167
goto exit;
168168
}
169169

170-
for (i = 0; i < timeout; i++)
170+
for (i = 0; i < timeout/10; i++)
171171
{
172172
if (digitalRead(interrupt_pin) == 0) {
173173
status();

0 commit comments

Comments
 (0)