[gps] separate gps module for gps_init and multi

- remove gps_init from main
- all actual gps_x implementations autoload the generic gps module
- generic GPS module has setting for multi_gps_mode
This commit is contained in:
Felix Ruess
2016-06-16 14:31:43 +02:00
parent 861cb83014
commit 2c12e96e02
15 changed files with 53 additions and 7 deletions
+38
View File
@@ -0,0 +1,38 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps">
<doc>
<description>
Generic GPS functions.
This provides generic GPS functions and multi GPS support.
Still requires at least one module providing the actual GPS implementation.
</description>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<settings>
<dl_settings>
<dl_settings name="gps">
<dl_setting MAX="2" MIN="0" STEP="1" values="AUTO|PRIMARY|SECONDARY" module="subsystems/gps" VAR="multi_gps_mode" shortname="multi_mode" param="MULTI_GPS_MODE">
<!-- uncomment this if you want strip buttons for the multi GPS modes
<strip_button name="GPS AUTO" icon="gps.png" value="0" group="gps_mode"/>
<strip_button name="GPS PRIMARY" icon="gps1.png" value="1" group="gps_mode_setting"/>
<strip_button name="GPS SECONDARY" icon="gps2.png" value="2" group="gps_mode_setting"/> -->
</dl_setting>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
<init fun="gps_init()"/>
<makefile>
<configure name="GPS_LED" default="none"/>
<file name="gps.c" dir="subsystems"/>
<define name="USE_GPS"/>
<define name="GPS_LED" value="$(GPS_LED)" cond="ifneq ($(GPS_LED),none)"/>
</makefile>
</module>
+1
View File
@@ -10,6 +10,7 @@
<configure name="FURUNO_GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+1
View File
@@ -10,6 +10,7 @@
<configure name="MTK_GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+1
View File
@@ -10,6 +10,7 @@
<configure name="NMEA_GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+1
View File
@@ -8,6 +8,7 @@
The GPS sensor configuration is done in the header file referenced by NPS_SENSORS_PARAMS.
</description>
</doc>
<autoload name="gps"/>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
+1
View File
@@ -10,6 +10,7 @@
<configure name="PIKSI_GPS_BAUD" value="B115200" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+1
View File
@@ -7,6 +7,7 @@
For simple fixedwing OCaml simulator. Does not model any GPS inaccuracies/noise.
</description>
</doc>
<autoload name="gps"/>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
+1
View File
@@ -8,6 +8,7 @@
</description>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<header>
<file name="gps.h" dir="subsystems"/>
+1
View File
@@ -10,6 +10,7 @@
<configure name="SIRF_GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+1
View File
@@ -10,6 +10,7 @@
<configure name="SKYTRAQ_GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+1
View File
@@ -10,6 +10,7 @@
<configure name="UBX_GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
+4
View File
@@ -18,6 +18,7 @@ Warning: you still need to tell the driver, which paparazzi port you use.
description="Dynamic model used by ublox GPS filter. Default:NAV5_DYN_AIRBORNE_2G"/>
<define name="USE_GPS_UBX_RXM_RAW" description="Activate raw measurments (only available on U-Blox T versions)"/>
</doc>
<settings>
<dl_settings NAME="ublox">
<dl_settings name="ucenter">
@@ -30,6 +31,9 @@ Warning: you still need to tell the driver, which paparazzi port you use.
</dl_settings>
</dl_settings>
</settings>
<depends>gps_ublox</depends>
<header>
<file name="gps_ubx_ucenter.h"/>
</header>
+1
View File
@@ -9,6 +9,7 @@
<define name="GPS_UDP_HOST" value="192.168.1.2" description="host sending GPS messages"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
@@ -190,9 +190,6 @@ void init_ap(void)
stateInit();
/************* Sensors initialization ***************/
#if USE_GPS
gps_init();
#endif
#if USE_IMU
imu_init();
-4
View File
@@ -198,10 +198,6 @@ STATIC_INLINE void main_init(void)
ins_init();
#if USE_GPS
gps_init();
#endif
autopilot_init();
modules_init();