From d36cf828bc47038d5e98661ec4a36319091e71ca Mon Sep 17 00:00:00 2001 From: Brian Webb Date: Sat, 6 Apr 2013 16:27:02 +0100 Subject: [PATCH] RFM22B: Don't send a connection request from a non-coordinator. --- flight/PiOS/Common/pios_rfm22b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/PiOS/Common/pios_rfm22b.c b/flight/PiOS/Common/pios_rfm22b.c index beddb1e08..187396d22 100644 --- a/flight/PiOS/Common/pios_rfm22b.c +++ b/flight/PiOS/Common/pios_rfm22b.c @@ -1962,7 +1962,7 @@ static enum pios_rfm22b_event rfm22_txData(struct pios_rfm22b_dev *rfm22b_dev) rfm22_setConnectionParameters(rfm22b_dev); - } else if (!rfm22_isConnected(rfm22b_dev) && (rfm22b_dev->rx_packet.header.type == PACKET_TYPE_STATUS)) { + } else if (rfm22b_dev->coordinator && !rfm22_isConnected(rfm22b_dev) && (rfm22b_dev->rx_packet.header.type == PACKET_TYPE_STATUS)) { // Send a connection request message if we're not connected, and this is a status message from a modem that we're bound to. PHStatusPacketHandle status = (PHStatusPacketHandle)&(rfm22b_dev->rx_packet);