Clear routing table extendend
I_CHILDREN + "C" clears routing table, parent node and gw distance followed by findParentNode.
This commit is contained in:
@@ -365,6 +365,11 @@ boolean MySensor::process() {
|
|||||||
for (uint8_t i=0;i< sizeof(childNodeTable); i++) {
|
for (uint8_t i=0;i< sizeof(childNodeTable); i++) {
|
||||||
removeChildRoute(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(""));
|
sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, NODE_SENSOR_ID, C_INTERNAL, I_CHILDREN,false).set(""));
|
||||||
}
|
}
|
||||||
} else if (type == I_TIME) {
|
} else if (type == I_TIME) {
|
||||||
|
|||||||
Reference in New Issue
Block a user