From 5f3b16bafaabdad6a34a3eabb8abb9ec674de108 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 26 Oct 2013 18:45:12 +0100 Subject: [PATCH] [modules] gps_ubx_ucenter: USB support closes #569 --- sw/airborne/modules/gps/gps_ubx_ucenter.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sw/airborne/modules/gps/gps_ubx_ucenter.c b/sw/airborne/modules/gps/gps_ubx_ucenter.c index 8a4e254029c..a5eff86c3b9 100644 --- a/sw/airborne/modules/gps/gps_ubx_ucenter.c +++ b/sw/airborne/modules/gps/gps_ubx_ucenter.c @@ -27,7 +27,6 @@ * */ - #include "gps_ubx_ucenter.h" ////////////////////////////////////////////////////////////////////////////////////// @@ -295,6 +294,9 @@ static inline void gps_ubx_ucenter_config_port(void) #if GPS_PORT_ID == GPS_PORT_UART1 || GPS_PORT_ID == GPS_PORT_UART2 UbxSend_CFG_PRT(GPS_PORT_ID, 0x0, 0x0, 0x000008D0, 38400, UBX_PROTO_MASK, UBX_PROTO_MASK, 0x0, 0x0); #endif + #if GPS_PORT_ID == GPS_PORT_USB + UbxSend_CFG_PRT(GPS_PORT_ID, 0x0, 0x0, 0x0, 0, UBX_PROTO_MASK, UBX_PROTO_MASK, 0x0, 0x0); + #endif } #define GPS_SBAS_ENABLED 0x01 @@ -319,6 +321,9 @@ static inline void gps_ubx_ucenter_enable_msg(uint8_t class, uint8_t id, uint8_t #if GPS_PORT_ID == GPS_PORT_UART2 UbxSend_CFG_MSG(class, id, 0, 0, rate, 0); #endif + #if GPS_PORT_ID == GPS_PORT_USB + UbxSend_CFG_MSG(class, id, 0, 0, 0, rate); + #endif #if GPS_PORT_ID == GPS_PORT_DDC UbxSend_CFG_MSG(class, id, rate, 0, 0, 0); #endif @@ -419,7 +424,3 @@ static bool_t gps_ubx_ucenter_configure(uint8_t nr) } return TRUE; // Continue, except for the last case } - - - -