mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 06:54:49 +08:00
[multigps] modified defines
This commit is contained in:
@@ -57,10 +57,6 @@
|
|||||||
#define GpsIsLost() !GpsFixValid()
|
#define GpsIsLost() !GpsFixValid()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GPS_NB_CHANNELS
|
|
||||||
#define GPS_NB_CHANNELS 16
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GPS_VALID_POS_ECEF_BIT 0
|
#define GPS_VALID_POS_ECEF_BIT 0
|
||||||
#define GPS_VALID_POS_LLA_BIT 1
|
#define GPS_VALID_POS_LLA_BIT 1
|
||||||
#define GPS_VALID_POS_UTM_BIT 2
|
#define GPS_VALID_POS_UTM_BIT 2
|
||||||
@@ -69,17 +65,30 @@
|
|||||||
#define GPS_VALID_HMSL_BIT 5
|
#define GPS_VALID_HMSL_BIT 5
|
||||||
#define GPS_VALID_COURSE_BIT 6
|
#define GPS_VALID_COURSE_BIT 6
|
||||||
|
|
||||||
|
/* GPS model specific implementation or sim */
|
||||||
|
#ifdef GPS_TYPE_H
|
||||||
|
#include GPS_TYPE_H
|
||||||
|
#ifndef GPS_NB_CHANNELS
|
||||||
|
#define GPS_NB_CHANNELS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GPS_TYPE_H
|
#ifndef GPS_TYPE_H
|
||||||
|
|
||||||
#define PRIMARY_GPS_INSTANCE 0
|
#define PRIMARY_GPS_INSTANCE 0
|
||||||
#define SECONDARY_GPS_INSTANCE 1
|
#define SECONDARY_GPS_INSTANCE 1
|
||||||
|
|
||||||
|
#ifndef GPS_NB_CHANNELS
|
||||||
|
#define GPS_NB_CHANNELS 16
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_MULTI_GPS
|
#ifdef USE_MULTI_GPS
|
||||||
#define GPS_NUM_INSTANCES 2
|
#define GPS_NUM_INSTANCES 2
|
||||||
#else
|
#else
|
||||||
#define GPS_NUM_INSTANCES 1
|
#define GPS_NUM_INSTANCES 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define GPS_MODE_PRIMARY 0
|
#define GPS_MODE_PRIMARY 0
|
||||||
#define GPS_MODE_SECONDARY 1
|
#define GPS_MODE_SECONDARY 1
|
||||||
#define GPS_MODE_AUTO 2
|
#define GPS_MODE_AUTO 2
|
||||||
@@ -148,11 +157,6 @@ extern struct GpsState gps;
|
|||||||
typedef void (*ImplGpsInit)(void);
|
typedef void (*ImplGpsInit)(void);
|
||||||
typedef void (*ImplGpsEvent)(void);
|
typedef void (*ImplGpsEvent)(void);
|
||||||
|
|
||||||
|
|
||||||
/* GPS model specific implementation or sim */
|
|
||||||
#ifdef GPS_TYPE_H
|
|
||||||
#include GPS_TYPE_H
|
|
||||||
#endif
|
|
||||||
#ifdef PRIMARY_GPS_TYPE_H
|
#ifdef PRIMARY_GPS_TYPE_H
|
||||||
void GpsEvent(void);
|
void GpsEvent(void);
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -37,14 +37,21 @@
|
|||||||
#define PIKSI_HEARTBEAT_MSG
|
#define PIKSI_HEARTBEAT_MSG
|
||||||
|
|
||||||
#if GPS_SECONDARY_PIKSI
|
#if GPS_SECONDARY_PIKSI
|
||||||
|
#ifndef PIKSI_GPS_LINK
|
||||||
#define PIKSI_GPS_LINK GPS_SECONDARY_PORT
|
#define PIKSI_GPS_LINK GPS_SECONDARY_PORT
|
||||||
#define SecondaryGpsImpl piksi
|
#define SecondaryGpsImpl piksi
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#ifndef PrimaryGpsImpl
|
||||||
#define PrimaryGpsImpl piksi
|
#define PrimaryGpsImpl piksi
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if GPS_PRIMARY_PIKSI
|
#if GPS_PRIMARY_PIKSI
|
||||||
|
#ifndef PIKSI_GPS_LINK
|
||||||
#define PIKSI_GPS_LINK GPS_PRIMARY_PORT
|
#define PIKSI_GPS_LINK GPS_PRIMARY_PORT
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern void piksi_gps_event(void);
|
extern void piksi_gps_event(void);
|
||||||
extern void piksi_gps_impl_init(void);
|
extern void piksi_gps_impl_init(void);
|
||||||
|
|||||||
@@ -28,14 +28,20 @@
|
|||||||
#define GPS_UBX_H
|
#define GPS_UBX_H
|
||||||
|
|
||||||
#if GPS_SECONDARY_UBX
|
#if GPS_SECONDARY_UBX
|
||||||
|
#ifndef UBX_GPS_LINK
|
||||||
#define UBX_GPS_LINK GPS_SECONDARY_PORT
|
#define UBX_GPS_LINK GPS_SECONDARY_PORT
|
||||||
#define SecondaryGpsImpl ubx
|
#define SecondaryGpsImpl ubx
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#ifndef PrimaryGpsImpl
|
||||||
#define PrimaryGpsImpl ubx
|
#define PrimaryGpsImpl ubx
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if GPS_PRIMARY_UBX
|
#if GPS_PRIMARY_UBX
|
||||||
|
#ifndef UBX_GPS_LINK
|
||||||
#define UBX_GPS_LINK GPS_PRIMARY_PORT
|
#define UBX_GPS_LINK GPS_PRIMARY_PORT
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GPS_CONFIGURE
|
#ifdef GPS_CONFIGURE
|
||||||
#warning "Please use gps_ubx_ucenter.xml module instead of GPS_CONFIGURE"
|
#warning "Please use gps_ubx_ucenter.xml module instead of GPS_CONFIGURE"
|
||||||
|
|||||||
Reference in New Issue
Block a user