From c8883c61e67447dccb3c2021b3567d46161e118d Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Thu, 12 Feb 2015 21:58:16 +0100 Subject: [PATCH] Request parent missing in setup() --- libraries/MySensors/MySensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/MySensors/MySensor.cpp b/libraries/MySensors/MySensor.cpp index b24ef75..50445a4 100755 --- a/libraries/MySensors/MySensor.cpp +++ b/libraries/MySensors/MySensor.cpp @@ -74,8 +74,8 @@ void MySensor::begin(void (*_msgCallback)(const MyMessage &), uint8_t _nodeId, b // If the current node is also repeater, be aware of this. nc.distance = 1; } else if (!isValidParent(nc.parentNodeId)) { - // Auto find parent, but parent in eeprom is invalid. Force parent search on first transmit. - nc.distance = DISTANCE_INVALID; + // Auto find parent, but parent in eeprom is invalid. Try find one. + findParentNode(); } if ( (_nodeId != AUTO) && (nc.nodeId != _nodeId) ) {