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

PiOS.posix: bugfix in COM_UDP

This commit is contained in:
Corvus Corax 2011-08-19 13:54:16 +02:00
parent adfb6eccc2
commit 69f10cd6d0
2 changed files with 4 additions and 1 deletions

View File

@ -164,7 +164,7 @@ void PIOS_Board_Init(void) {
PIOS_Assert(tx_buffer);
if (PIOS_COM_Init(&pios_com_gps_id, &pios_udp_com_driver, pios_udp_gps_id,
rx_buffer, PIOS_COM_GPS_RX_BUF_LEN,
rx_buffer, PIOS_COM_GPS_RX_BUF_LEN)) {
tx_buffer, PIOS_COM_GPS_RX_BUF_LEN)) {
PIOS_Assert(0);
}
}

View File

@ -64,6 +64,7 @@ static pios_udp_dev * find_udp_dev_by_id (uint8_t udp)
{
if (udp >= pios_udp_num_devices) {
/* Undefined UDP port for this board (see pios_board.c) */
PIOS_Assert(0);
return NULL;
}
@ -154,6 +155,8 @@ int32_t PIOS_UDP_Init(uint32_t * udp_id, const struct pios_udp_cfg * cfg)
printf("udp dev %i - socket %i opened - result %i\n",pios_udp_num_devices-1,udp_dev->socket,res);
*udp_id = pios_udp_num_devices-1;
return res;
}