Skip to content

Commit fe3b043

Browse files
committed
FHSS channel initialisation moved into the FHSS define block in sendData
1 parent 77e12da commit fe3b043

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/panstamp/panstamp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ void endOfReception(void);
4343
__attribute__((interrupt(CC1101_VECTOR)))
4444
void radioISR(void)
4545
{
46-
static int count=0;
4746
unsigned int coreIntSource = RF1AIV; // Radio Core interrupt register
4847

4948
// Radio Core interrupt
@@ -316,6 +315,9 @@ void PANSTAMP::sleepSec(uint16_t time, RTCSRC source)
316315
bool PANSTAMP::sendData(CCPACKET packet)
317316
{
318317
#ifdef FHSS_ENABLED
318+
currentChannelIndex = 0;
319+
radio.setChannel(getCurrentChannel());
320+
319321
CCPACKET tmpPacket;
320322
uint8_t i, nbOfBursts = packet.length / FHSS_BURST_LENGTH;
321323
uint8_t lengthOfLastBurst = packet.length % FHSS_BURST_LENGTH;

0 commit comments

Comments
 (0)