Skip to content

Commit

Permalink
Merge branch 'gps_ucenter' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Sep 18, 2011
2 parents 3113ebe + e3e854d commit 9045c05
Show file tree
Hide file tree
Showing 12 changed files with 546 additions and 197 deletions.
29 changes: 29 additions & 0 deletions conf/modules/gps_ubx_ucenter.xml
@@ -0,0 +1,29 @@
<!DOCTYPE module SYSTEM "module.dtd">

<!--
Automatically configure any Ublox GPS for paparazzi
-configures all the messages, and the rates
-automatic baudrate detection
Warning: you still need to tell the driver
a) which paparazzi uart you use
b) inside the ublox gps there are also many ports. the tiny/ppzgps use ublox_internal_port1 but if for instance you use a LS-SAM or I2C device you need to configure:
<define name="GPS_PORT_ID" value="GPS_PORT_UART2" />
-->

<module name="gps_ubx" dir="gps">
<header>
<file name="gps_ubx_ucenter.h"/>
</header>
<init fun="gps_ubx_ucenter_init()"/>
<periodic fun="gps_ubx_ucenter_periodic()" start="gps_ubx_ucenter_init()" freq="4." autorun="TRUE"/>
<makefile target="ap">
<define name="GPS_UBX_UCENTER" value="\\\"modules/gps/gps_ubx_ucenter.c\\\"" />
</makefile>
</module>


16 changes: 16 additions & 0 deletions conf/settings/gps_ubx_ucenter.xml
@@ -0,0 +1,16 @@
<!DOCTYPE settings SYSTEM "settings.dtd">

<settings>
<dl_settings NAME="ublox">

<dl_settings name="ucenter">
<dl_setting MAX="255" MIN="0" STEP="1" module="gps/gps_ubx_ucenter" VAR="gps_ubx_ucenter.sw_ver_h" shortname="sw_h"/>
<dl_setting MAX="255" MIN="0" STEP="1" module="gps/gps_ubx_ucenter" VAR="gps_ubx_ucenter.sw_ver_l" shortname="sw_l"/>
<dl_setting MAX="255" MIN="0" STEP="1" module="gps/gps_ubx_ucenter" VAR="gps_ubx_ucenter.hw_ver_h" shortname="hw_h"/>
<dl_setting MAX="255" MIN="0" STEP="1" module="gps/gps_ubx_ucenter" VAR="gps_ubx_ucenter.hw_ver_l" shortname="hw_l"/>
<dl_setting MAX="115200" MIN="4800" STEP="100" module="gps/gps_ubx_ucenter" VAR="gps_ubx_ucenter.baud_init" shortname="inibaud"/>
<dl_setting MAX="115200" MIN="4800" STEP="100" module="gps/gps_ubx_ucenter" VAR="gps_ubx_ucenter.baud_run" shortname="baud"/>
</dl_settings>

</dl_settings>
</settings>
13 changes: 13 additions & 0 deletions conf/ubx.xml
Expand Up @@ -205,4 +205,17 @@

</class>

<class name="MON" ID="0x0A">

<message name="GET_VER" ID="0x04" length="0">
</message>

<message name="VER" ID="0x04">
<block length="1">
<field name="c" format="U1"/>
</block>
</message>

</class>

</ubx>
1 change: 1 addition & 0 deletions sw/airborne/arch/lpc21/mcu_periph/uart_arch.h
Expand Up @@ -33,6 +33,7 @@

#define B1200 UART_BAUD(1200)
#define B2400 UART_BAUD(2400)
#define B4800 UART_BAUD(4800)
#define B9600 UART_BAUD(9600)
#define B19200 UART_BAUD(19200)
#define B38400 UART_BAUD(38400)
Expand Down
1 change: 1 addition & 0 deletions sw/airborne/arch/stm32/mcu_periph/uart_arch.h
Expand Up @@ -31,6 +31,7 @@

#include "std.h"

#define B4800 4800
#define B9600 9600
#define B38400 38400
#define B57600 57600
Expand Down
6 changes: 0 additions & 6 deletions sw/airborne/firmwares/fixedwing/main_ap.c
Expand Up @@ -581,12 +581,6 @@ void init_ap( void ) {
/** wait 0.5s (historical :-) */
sys_time_usleep(500000);

#ifdef GPS_CONFIGURE
#ifndef SITL
gps_configure_uart();
#endif
#endif

#if defined DATALINK

#if DATALINK == XBEE
Expand Down
10 changes: 5 additions & 5 deletions sw/airborne/mcu_periph/uart.h
Expand Up @@ -92,7 +92,7 @@ extern void uart0_init(void);
#define UART0ChAvailable Uart0ChAvailable
#define UART0Getch Uart0Getch
#define UART0TxRunning Uart0TxRunning
#define UART0InitParam Uart0InitParam
#define UART0SetBaudrate Uart0SetBaudrate

#endif // USE_UART0

Expand All @@ -117,7 +117,7 @@ extern void uart1_init(void);
#define UART1ChAvailable Uart1ChAvailable
#define UART1Getch Uart1Getch
#define UART1TxRunning Uart1TxRunning
#define UART1InitParam Uart1InitParam
#define UART1SetBaudrate Uart1SetBaudrate

#endif // USE_UART1

Expand All @@ -142,7 +142,7 @@ extern void uart2_init(void);
#define UART2ChAvailable Uart2ChAvailable
#define UART2Getch Uart2Getch
#define UART2TxRunning Uart2TxRunning
#define UART2InitParam Uart2InitParam
#define UART2SetBaudrate Uart2SetBaudrate

#endif // USE_UART2

Expand All @@ -167,7 +167,7 @@ extern void uart3_init(void);
#define UART3ChAvailable Uart3ChAvailable
#define UART3Getch Uart3Getch
#define UART3TxRunning Uart3TxRunning
#define UART3InitParam Uart3InitParam
#define UART3SetBaudrate Uart3SetBaudrate

#endif // USE_UART3

Expand All @@ -192,7 +192,7 @@ extern void uart5_init(void);
#define UART5ChAvailable Uart5ChAvailable
#define UART5Getch Uart5Getch
#define UART5TxRunning Uart5TxRunning
#define UART5InitParam Uart5InitParam
#define UART5SetBaudrate Uart5SetBaudrate

#endif // USE_UART5

Expand Down

0 comments on commit 9045c05

Please sign in to comment.