Merge pull request #44 from mapnull/hotfix-1.4

fix a possible parent repeater loop
This commit is contained in:
Henrik Ekblad
2015-02-01 21:37:54 +01:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -47,6 +47,7 @@ void MyGateway::begin(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e da
}
nc.nodeId = 0;
nc.parentNodeId = 0;
nc.distance = 0;
inclusionMode = 0;
buttonTriggeredInclusion = false;
+1 -1
View File
@@ -289,7 +289,7 @@ boolean MySensor::process() {
if (repeaterMode && command == C_INTERNAL && type == I_FIND_PARENT) {
if (nc.distance == 255) {
findParentNode();
} else {
} else if (sender != nc.parentNodeId) {
// Relaying nodes should always answer ping messages
// Wait a random delay of 0-2 seconds to minimize collision
// between ping ack messages from other relaying nodes