@@ -38,15 +38,13 @@ boolean Relay::sendData(uint8_t from, uint8_t to, uint8_t childId, uint8_t messa
3838 buildMsg (from, to, childId, messageType, type, data, length, binary);
3939 // Found node in route table
4040 ok = sendWrite (route, msg, length);
41- } if (radioId == GATEWAY_ADDRESS) {
41+ } else if (radioId == GATEWAY_ADDRESS) {
4242 // If we're GW (no parent...). As a last resort try sending message directly to node.
43- debug (PSTR (" Target not found in routing table. \n " ));
43+ debug (PSTR (" No route... try sending direct. \n " ));
4444 buildMsg (from, to, childId, messageType, type, data, length, binary);
4545 // Found node in route table
4646 ok = sendWrite (to, msg, length);
47-
4847 } else {
49- debug (PSTR (" Route message back to relay\n " ));
5048 // We are probably a repeater node which should send message back to relay
5149 ok = Sensor::sendData (from, to, childId, messageType, type, data, length, binary);
5250 }
@@ -91,7 +89,7 @@ boolean Relay::messageAvailable() {
9189 debug (PSTR (" Message available on pipe %d\n " ),pipe);
9290 }
9391
94- if (available) {
92+ if (available && pipe< 7 ) {
9593 uint8_t len = RF24::getDynamicPayloadSize ()-sizeof (msg.header );
9694 readMessage ();
9795 boolean ok = validate () == VALIDATE_OK;
0 commit comments