Skip to content

Commit

Permalink
FHSS channel initialisation moved into the FHSS define block in sendData
Browse files Browse the repository at this point in the history
  • Loading branch information
dberenguer committed Jun 17, 2016
1 parent 77e12da commit fe3b043
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cores/panstamp/panstamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ void endOfReception(void);
__attribute__((interrupt(CC1101_VECTOR)))
void radioISR(void)
{
static int count=0;
unsigned int coreIntSource = RF1AIV; // Radio Core interrupt register

// Radio Core interrupt
Expand Down Expand Up @@ -316,6 +315,9 @@ void PANSTAMP::sleepSec(uint16_t time, RTCSRC source)
bool PANSTAMP::sendData(CCPACKET packet)
{
#ifdef FHSS_ENABLED
currentChannelIndex = 0;
radio.setChannel(getCurrentChannel());

CCPACKET tmpPacket;
uint8_t i, nbOfBursts = packet.length / FHSS_BURST_LENGTH;
uint8_t lengthOfLastBurst = packet.length % FHSS_BURST_LENGTH;
Expand Down

0 comments on commit fe3b043

Please sign in to comment.