1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Just return an initialization failure in the radio module when the RFM22B fails to initialize rather than asserting.

Signed-off-by: James Cotton <peabody124@gmail.com>
This commit is contained in:
Brian Webb 2012-08-28 19:58:21 -07:00 committed by James Cotton
parent fcbf01fa74
commit 27fedee3d3

View File

@ -235,7 +235,7 @@ static int32_t RadioInitialize(void)
/* Initalize the RFM22B radio COM device. */
{
if (PIOS_RFM22B_Init(&pios_rfm22b_id, &pios_rfm22b_cfg)) {
PIOS_Assert(0);
return -1;
}
uint8_t * rx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_RFM22B_RF_RX_BUF_LEN);
uint8_t * tx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_RFM22B_RF_TX_BUF_LEN);