1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-03 11:24:10 +01:00

OpenPilot: bugfix: Add GPS tx buffer by default (needed until GPS has been refactored to not send or only send when configured so)

This commit is contained in:
Corvus Corax 2011-08-19 20:20:44 +02:00
parent 2062ec0aeb
commit 85aef9c7b4
2 changed files with 5 additions and 1 deletions

View File

@ -60,6 +60,7 @@
//#define PIOS_INCLUDE_HCSR04 //#define PIOS_INCLUDE_HCSR04
#define PIOS_INCLUDE_OPAHRS #define PIOS_INCLUDE_OPAHRS
#define PIOS_INCLUDE_COM #define PIOS_INCLUDE_COM
#define PIOS_INCLUDE_GPS
#define PIOS_INCLUDE_SDCARD #define PIOS_INCLUDE_SDCARD
#define PIOS_INCLUDE_SETTINGS #define PIOS_INCLUDE_SETTINGS
#define PIOS_INCLUDE_FREERTOS #define PIOS_INCLUDE_FREERTOS

View File

@ -525,6 +525,7 @@ static const struct pios_spektrum_cfg pios_spektrum_cfg = {
#define PIOS_COM_TELEM_RF_TX_BUF_LEN 192 #define PIOS_COM_TELEM_RF_TX_BUF_LEN 192
#define PIOS_COM_GPS_RX_BUF_LEN 96 #define PIOS_COM_GPS_RX_BUF_LEN 96
#define PIOS_COM_GPS_TX_BUF_LEN 96
#define PIOS_COM_TELEM_USB_RX_BUF_LEN 192 #define PIOS_COM_TELEM_USB_RX_BUF_LEN 192
#define PIOS_COM_TELEM_USB_TX_BUF_LEN 192 #define PIOS_COM_TELEM_USB_TX_BUF_LEN 192
@ -1074,10 +1075,12 @@ void PIOS_Board_Init(void) {
PIOS_Assert(0); PIOS_Assert(0);
} }
uint8_t * rx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_GPS_RX_BUF_LEN); uint8_t * rx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_GPS_RX_BUF_LEN);
uint8_t * tx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_GPS_TX_BUF_LEN);
PIOS_Assert(rx_buffer); PIOS_Assert(rx_buffer);
PIOS_Assert(tx_buffer);
if (PIOS_COM_Init(&pios_com_gps_id, &pios_usart_com_driver, pios_usart_gps_id, if (PIOS_COM_Init(&pios_com_gps_id, &pios_usart_com_driver, pios_usart_gps_id,
rx_buffer, PIOS_COM_GPS_RX_BUF_LEN, rx_buffer, PIOS_COM_GPS_RX_BUF_LEN,
NULL, 0)) { tx_buffer, PIOS_COM_GPS_TX_BUF_LEN)) {
PIOS_Assert(0); PIOS_Assert(0);
} }
} }