Skip to content

Commit 7fb9454

Browse files
committed
Merge pull request arduino#44 from mapnull/hotfix-1.4
fix a possible parent repeater loop
2 parents dfd38ff + 6b76eb3 commit 7fb9454

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

libraries/MySensors/MyGateway.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ void MyGateway::begin(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e da
4747
}
4848

4949
nc.nodeId = 0;
50+
nc.parentNodeId = 0;
5051
nc.distance = 0;
5152
inclusionMode = 0;
5253
buttonTriggeredInclusion = false;

libraries/MySensors/MySensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ boolean MySensor::process() {
289289
if (repeaterMode && command == C_INTERNAL && type == I_FIND_PARENT) {
290290
if (nc.distance == 255) {
291291
findParentNode();
292-
} else {
292+
} else if (sender != nc.parentNodeId) {
293293
// Relaying nodes should always answer ping messages
294294
// Wait a random delay of 0-2 seconds to minimize collision
295295
// between ping ack messages from other relaying nodes

0 commit comments

Comments
 (0)