Skip to content

Commit 1d8861f

Browse files
committed
avoid entering low power if the board is not a MKRFOX
1 parent 6deddbf commit 1d8861f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SigFox.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ int SIGFOXClass::send(unsigned char mess[], int len, bool rx)
166166
}
167167

168168
if (!debugging) {
169+
#ifdef SIGFOX_SPI
169170
LowPower.attachInterruptWakeup(interrupt_pin, NULL, FALLING);
170171
LowPower.sleep(timeout);
172+
#endif
171173
if (digitalRead(interrupt_pin) == 0) {
172174
status();
173175
ret = statusCode(SIGFOX);
@@ -228,8 +230,10 @@ int SIGFOXClass::sendBit(bool value){
228230
int timeout = 7000; //7 seconds
229231

230232
if (!debugging) {
233+
#ifdef SIGFOX_SPI
231234
LowPower.attachInterruptWakeup(interrupt_pin, NULL, FALLING);
232235
LowPower.sleep(timeout);
236+
#endif
233237
if (digitalRead(interrupt_pin) == 0) {
234238
status();
235239
return statusCode(SIGFOX);

0 commit comments

Comments
 (0)