Skip to content

Commit 9a32c2c

Browse files
committed
Merge pull request #186 from Yveaux/master
Fix crash at startup
2 parents 959ee1a + b997861 commit 9a32c2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libraries/MySensors/utility/RF24.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,13 +548,17 @@ void RF24::startListening(void)
548548
/****************************************************************************/
549549
static uint8_t get_child_pipe_mask(const uint8_t idx)
550550
{
551-
static const uint8_t child_pipe_enable[] PROGMEM =
551+
#ifdef ESP8266
552+
static const uint8_t child_pipe_enable[] =
552553
{
553554
_BV(ERX_P0), _BV(ERX_P1), _BV(ERX_P2), _BV(ERX_P3), _BV(ERX_P4), _BV(ERX_P5)
554555
};
555-
#ifdef ESP8266
556556
return child_pipe_enable[idx];
557557
#else
558+
static const uint8_t child_pipe_enable[] PROGMEM =
559+
{
560+
_BV(ERX_P0), _BV(ERX_P1), _BV(ERX_P2), _BV(ERX_P3), _BV(ERX_P4), _BV(ERX_P5)
561+
};
558562
return pgm_read_byte(&child_pipe_enable[idx]);
559563
#endif
560564
}

0 commit comments

Comments
 (0)