Skip to content

Commit

Permalink
Update RF24Mesh_Example_Node2NodeExtra.ino
Browse files Browse the repository at this point in the history
Also added the workaround here and auto-formatted the sketch with the latest IDE.
  • Loading branch information
Avamander committed Jul 16, 2015
1 parent fbceb85 commit 96a77af
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,20 @@ void loop() {
} else if (hdr.type == 'M') {
uint32_t mills;
network.read(hdr, &mills, sizeof(mills));
Serial.print(F("Rcv "));
Serial.print(F("Received "));
Serial.print(mills);
Serial.print(F(" from nodeID "));
int _ID = 0;
_ID = mesh.getNodeID(hdr.from_node);
if ( _ID > 0) {
Serial.println(_ID);
if (_ID == nodeID) {
Serial.println(F(" from master."));
} else {
Serial.print(F(" from node(ID) "));
Serial.print(_ID);
Serial.println('.');
}
} else {
Serial.println("Mesh ID Lookup Failed");
Serial.println(F("Mesh ID Lookup Failed"));
}
Serial.print(F("Total Data Received: "));
Serial.print(totalData);
Expand Down

0 comments on commit 96a77af

Please sign in to comment.