Clear routing table extendend

I_CHILDREN + "C" clears routing table, parent node and gw distance
followed by findParentNode.
This commit is contained in:
tekka007
2015-02-02 13:50:06 +01:00
parent 7fb94546eb
commit 81b6d3aa30
+5
View File
@@ -365,6 +365,11 @@ boolean MySensor::process() {
for (uint8_t i=0;i< sizeof(childNodeTable); i++) {
removeChildRoute(i);
}
// Clear parent node id & distance to gw
eeprom_write_byte((uint8_t*)EEPROM_PARENT_NODE_ID_ADDRESS, 0xFF);
eeprom_write_byte((uint8_t*)EEPROM_DISTANCE_ADDRESS, 0xFF);
// Find parent node
findParentNode();
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, NODE_SENSOR_ID, C_INTERNAL, I_CHILDREN,false).set(""));
}
} else if (type == I_TIME) {