gps subsystem: define GPS_FIX_x in implementation header file instead of gps.h

This commit is contained in:
Felix Ruess
2012-03-13 17:39:46 +01:00
parent 004539ad48
commit 7b4c5cf986
7 changed files with 24 additions and 18 deletions
-4
View File
@@ -37,10 +37,6 @@
#include GPS_TYPE_H
#endif
#define GPS_FIX_NONE 0x00
#define GPS_FIX_2D 0x02
#define GPS_FIX_3D 0x03
#define GpsFixValid() (gps.fix == GPS_FIX_3D)
+1 -10
View File
@@ -156,16 +156,7 @@ void gps_mtk_read_message(void) {
gps.speed_3d = gps.gspeed;
gps.course = (RadOfDeg(MTK_DIY14_NAV_Heading(gps_mtk.msg_buf)))*10;
gps.num_sv = MTK_DIY14_NAV_numSV(gps_mtk.msg_buf);
switch (MTK_DIY14_NAV_GPSfix(gps_mtk.msg_buf)) {
case MTK_DIY_FIX_3D:
gps.fix = GPS_FIX_3D;
break;
case MTK_DIY_FIX_2D:
gps.fix = GPS_FIX_2D;
break;
default:
gps.fix = GPS_FIX_NONE;
}
gps.fix = MTK_DIY14_NAV_GPSfix(gps_mtk.msg_buf);
gps.tow = MTK_DIY14_NAV_ITOW(gps_mtk.msg_buf);;
// FIXME: with MTK DIY 1.4 you do not receive GPS week
gps.week = 0;
+4 -4
View File
@@ -28,6 +28,10 @@
/** Includes macros generated from mtk.xml */
#include "mtk_protocol.h"
#define GPS_FIX_NONE 0x01
#define GPS_FIX_2D 0x02
#define GPS_FIX_3D 0x03
#define GPS_MTK_MAX_PAYLOAD 255
struct GpsMtk {
@@ -105,10 +109,6 @@ extern bool_t gps_configuring;
extern void gps_mtk_read_message(void);
extern void gps_mtk_parse(uint8_t c);
#define MTK_DIY_FIX_3D 3
#define MTK_DIY_FIX_2D 2
#define MTK_DIY_FIX_NONE 1
/*
* dynamic GPS configuration
*/
+4
View File
@@ -3,6 +3,10 @@
#include "std.h"
#define GPS_FIX_NONE 0x00
#define GPS_FIX_2D 0x02
#define GPS_FIX_3D 0x03
#define GPS_NB_CHANNELS 16
extern bool_t gps_available;
+4
View File
@@ -3,6 +3,10 @@
#include "nps_sensors.h"
#define GPS_FIX_NONE 0x00
#define GPS_FIX_2D 0x02
#define GPS_FIX_3D 0x03
#define GPS_NB_CHANNELS 16
extern bool_t gps_available;
+7
View File
@@ -24,6 +24,13 @@
#include "mcu_periph/uart.h"
#define GPS_FIX_NONE 0x00
#define GPS_FIX_2D 0x01
#define GPS_FIX_3D 0x02
#define GPS_FIX_3D_DGPS 0x03
#define SKYTRAQ_SYNC1 0xA0
#define SKYTRAQ_SYNC2 0xA1
+4
View File
@@ -38,6 +38,10 @@
#define GPS_NB_CHANNELS 16
#define GPS_FIX_NONE 0x00
#define GPS_FIX_2D 0x02
#define GPS_FIX_3D 0x03
#define GPS_UBX_MAX_PAYLOAD 255
struct GpsUbx {
bool_t msg_available;