mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 05:42:49 +08:00
[xsens] added new gps support
This commit is contained in:
@@ -41,7 +41,7 @@ ap.CFLAGS += -DUSE_GPS_XSENS
|
||||
ap.CFLAGS += -DUSE_GPS_XSENS_RAW_DATA
|
||||
ap.CFLAGS += -DGPS_NB_CHANNELS=16
|
||||
ap.CFLAGS += -DUSE_GPS
|
||||
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens.h\"
|
||||
ap.CFLAGS += -DPRIMARY_GPS_TYPE_H=\"modules/ins/ins_xsens.h\"
|
||||
ap.srcs += $(SRC_SUBSYSTEMS)/gps.c
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ ap.CFLAGS += -DAHRS_TRIGGERED_ATTITUDE_LOOP
|
||||
ap.CFLAGS += -DUSE_GPS_XSENS
|
||||
ap.CFLAGS += -DGPS_NB_CHANNELS=50
|
||||
ap.CFLAGS += -DUSE_GPS
|
||||
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_xsens.h\"
|
||||
ap.CFLAGS += -DPRIMARY_GPS_TYPE_H=\"modules/ins/ins_xsens.h\"
|
||||
ap.srcs += $(SRC_SUBSYSTEMS)/gps.c
|
||||
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ void ins_xsens_update_gps(struct GpsState *gps_s)
|
||||
#endif
|
||||
|
||||
#if USE_GPS_XSENS
|
||||
void gps_impl_init(void)
|
||||
void xsens_gps_impl_init(void)
|
||||
{
|
||||
gps.nb_channels = 0;
|
||||
}
|
||||
@@ -316,6 +316,11 @@ static void gps_xsens_publish(void)
|
||||
}
|
||||
AbiSendMsgGPS(GPS_XSENS_ID, now_ts, &gps);
|
||||
}
|
||||
|
||||
void xsens_gps_event(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void xsens_periodic(void)
|
||||
@@ -722,7 +727,6 @@ void parse_ins_msg(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void parse_ins_buffer(uint8_t c)
|
||||
{
|
||||
ck += c;
|
||||
@@ -775,3 +779,17 @@ restart:
|
||||
xsens_status = UNINIT;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef USE_GPS_XSENS
|
||||
/*
|
||||
* register callbacks & structs
|
||||
*/
|
||||
void xsens_gps_register(void)
|
||||
{
|
||||
#ifdef GPS_SECONDARY_XSENS
|
||||
gps_register_impl(xsens_gps_impl_init, xsens_gps_event, GPS_XSENS_ID, 1);
|
||||
#else
|
||||
gps_register_impl(xsens_gps_impl_init, xsens_gps_event, GPS_XSENS_ID, 0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,12 @@ extern void ins_xsens_register(void);
|
||||
|
||||
|
||||
#if USE_GPS_XSENS
|
||||
#define GpsEvent() {}
|
||||
#ifndef PrimaryGpsImpl
|
||||
#define PrimaryGpsImpl xsens
|
||||
#endif
|
||||
extern void xsens_gps_event(void);
|
||||
extern void xsens_gps_impl_init(void);
|
||||
extern void xsens_gps_register(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -230,7 +230,7 @@ void ins_xsens_update_gps(struct GpsState *gps_s)
|
||||
#endif
|
||||
|
||||
#if USE_GPS_XSENS
|
||||
void gps_impl_init(void)
|
||||
void xsens_gps_impl_init(void)
|
||||
{
|
||||
gps.nb_channels = 0;
|
||||
}
|
||||
@@ -247,6 +247,11 @@ static void gps_xsens_publish(void)
|
||||
}
|
||||
AbiSendMsgGPS(GPS_XSENS_ID, now_ts, &gps);
|
||||
}
|
||||
|
||||
void xsens_gps_event(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void xsens_ask_message_rate(uint8_t c1, uint8_t c2, uint8_t freq)
|
||||
@@ -623,3 +628,17 @@ restart:
|
||||
xsens_status = UNINIT;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef USE_GPS_XSENS
|
||||
/*
|
||||
* register callbacks & structs
|
||||
*/
|
||||
void xsens_gps_register(void)
|
||||
{
|
||||
#ifdef GPS_SECONDARY_XSENS
|
||||
gps_register_impl(xsens_gps_impl_init, xsens_gps_event, GPS_XSENS_ID, 1);
|
||||
#else
|
||||
gps_register_impl(xsens_gps_impl_init, xsens_gps_event, GPS_XSENS_ID, 0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user