Skip to content

Commit

Permalink
Merge pull request #55 from bitcraze/dev-disable-esb-pid
Browse files Browse the repository at this point in the history
Disable check for ESB pid
  • Loading branch information
ataffanel authored Mar 23, 2021
2 parents ab34d31 + 4bfc7ea commit 6613751
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/esb.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,6 @@ static uint32_t bytewise_bitswap(uint32_t inp)

/* Radio protocol implementation */

static bool isRetry(EsbPacket *pk)
{
static int prevPid;
static int prevCrc;

bool retry = false;

if ((prevPid == pk->pid) && (prevCrc == pk->crc)) {
retry = true;
}

prevPid = pk->pid;
prevCrc = pk->crc;

return retry;
}

// Handles the queue
static void setupTx(bool retry, bool empty)
{
Expand Down Expand Up @@ -238,12 +221,6 @@ void esbInterruptHandler()
return;
}

// If this packet is a retry, send the same ACK again
if ((pk->match == ESB_UNICAST_ADDRESS_MATCH) && isRetry(pk)) {
setupTx(true, false);
return;
}

if ((pk->match == ESB_UNICAST_ADDRESS_MATCH))
{
// Match safeLink packet and answer it
Expand Down

0 comments on commit 6613751

Please sign in to comment.