Skip to content

Commit 6f0ea1f

Browse files
committed
Merge branch 'master' into development
2 parents c8883c6 + 5d0fa3b commit 6f0ea1f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

libraries/MySensors/MySensor.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,13 @@ boolean MySensor::process() {
274274
uint8_t destination = msg.destination;
275275

276276
if (destination == nc.nodeId) {
277+
// This message is addressed to this node
278+
279+
if (repeaterMode && last != nc.parentNodeId) {
280+
// Message is from one of the child nodes. Add it to routing table.
281+
addChildRoute(sender, last);
282+
}
283+
277284
// Check if sender requests an ack back.
278285
if (mGetRequestAck(msg)) {
279286
// Copy message
@@ -285,12 +292,6 @@ boolean MySensor::process() {
285292
sendRoute(ack);
286293
}
287294

288-
// This message is addressed to this node
289-
if (repeaterMode && last != nc.parentNodeId) {
290-
// Message is from one of the child nodes. Add it to routing table.
291-
addChildRoute(sender, last);
292-
}
293-
294295
if (command == C_INTERNAL) {
295296
if (type == I_FIND_PARENT_RESPONSE && !isGateway) {
296297
// We've received a reply to a FIND_PARENT message. Check if the distance is

0 commit comments

Comments
 (0)