Permalink
Browse files

receive acknowledge condition bugfix

  • Loading branch information...
gioblu committed Sep 17, 2017
1 parent 1aca184 commit 92dcdcdae7fe976e0d8302b014160299a2e121e2
Showing with 10 additions and 8 deletions.
  1. +10 −8 PJON.h
18 PJON.h
@@ -461,15 +461,17 @@ class PJON {
if(data[1] & PJON_ACK_REQ_BIT && data[0] != PJON_BROADCAST)
if(_mode != PJON_SIMPLEX && !_router)
if(
!(config & PJON_MODE_BIT) ||
(
(config & PJON_MODE_BIT) &&
(data[1] & PJON_MODE_BIT) &&
bus_id_equality(
data + 3 + extended_length + extended_header,
bus_id
computed_crc && (
!(config & PJON_MODE_BIT) ||
(
(config & PJON_MODE_BIT) &&
(data[1] & PJON_MODE_BIT) &&
bus_id_equality(
data + 3 + extended_length + extended_header,
bus_id
)
)
) && computed_crc
)
) strategy.send_response(PJON_ACK);
if(!computed_crc) return PJON_NAK;

0 comments on commit 92dcdcd

Please sign in to comment.