Skip to content

Commit

Permalink
PJONMaster ensure rid uniqueness on PJON_ID_REFRESH request
Browse files Browse the repository at this point in the history
  • Loading branch information
gioblu committed Jan 27, 2018
1 parent 6fd4c1f commit 0188e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PJONMaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class PJONMaster : public PJON<Strategy> {
/* Add a device reference: */

bool add_id(uint8_t id, uint32_t rid, bool state) {
if(!ids[id - 1].state && !ids[id - 1].rid) {
if(unique_rid(rid) && !ids[id - 1].state && !ids[id - 1].rid) {
ids[id - 1].rid = rid;
ids[id - 1].state = state;
return true;
Expand Down

0 comments on commit 0188e8a

Please sign in to comment.