mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 05:17:03 +08:00
[gps] fix gps mtk compilation
this has been broken since b80cc08bc7 and is probably not tested at all...
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file gps_mtk.h
|
/** @file gps_mtk.c
|
||||||
* @brief Mediatek MT3329 specific code
|
* @brief Mediatek MT3329 specific code
|
||||||
*
|
*
|
||||||
* supports:
|
* supports:
|
||||||
@@ -139,7 +139,7 @@ void gps_mtk_msg(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void gps_mtk_time2itow(uint32_t gps_date, uint32_t gps_time,
|
static void gps_mtk_time2itow(uint32_t gps_date, uint32_t gps_time,
|
||||||
int16_t *gps_week, uint32_t *gps_itow)
|
uint16_t *gps_week, uint32_t *gps_itow)
|
||||||
{
|
{
|
||||||
/* convert UTC date/time to GPS week/itow, we have no idea about GPS
|
/* convert UTC date/time to GPS week/itow, we have no idea about GPS
|
||||||
leap seconds for now */
|
leap seconds for now */
|
||||||
|
|||||||
@@ -19,6 +19,17 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @file gps_mtk.h
|
||||||
|
* @brief Mediatek MT3329 specific code
|
||||||
|
*
|
||||||
|
* supports:
|
||||||
|
* DIYDrones V1.4 protocol (AXN1.30_2278)
|
||||||
|
* DIYDrones V1.6 protocol (AXN1.30_2389)
|
||||||
|
*
|
||||||
|
* documentation is partly incorrect, see mtk.xml for what seems
|
||||||
|
* to be "real"
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MTK_H
|
#ifndef MTK_H
|
||||||
#define MTK_H
|
#define MTK_H
|
||||||
@@ -57,6 +68,8 @@ extern struct GpsMtk gps_mtk;
|
|||||||
#include "pprzlink/pprzlink_device.h"
|
#include "pprzlink/pprzlink_device.h"
|
||||||
|
|
||||||
#ifdef GPS_CONFIGURE
|
#ifdef GPS_CONFIGURE
|
||||||
|
extern void gps_configure(void);
|
||||||
|
extern void gps_configure_uart(void);
|
||||||
extern bool_t gps_configuring;
|
extern bool_t gps_configuring;
|
||||||
#define GpsConfigure() { \
|
#define GpsConfigure() { \
|
||||||
if (gps_configuring) \
|
if (gps_configuring) \
|
||||||
@@ -68,6 +81,7 @@ extern bool_t gps_configuring;
|
|||||||
|
|
||||||
extern void gps_mtk_read_message(void);
|
extern void gps_mtk_read_message(void);
|
||||||
extern void gps_mtk_parse(uint8_t c);
|
extern void gps_mtk_parse(uint8_t c);
|
||||||
|
extern void gps_mtk_msg(void);
|
||||||
|
|
||||||
static inline void GpsEvent(void)
|
static inline void GpsEvent(void)
|
||||||
{
|
{
|
||||||
@@ -82,12 +96,4 @@ static inline void GpsEvent(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* dynamic GPS configuration
|
|
||||||
*/
|
|
||||||
#ifdef GPS_CONFIGURE
|
|
||||||
extern void gps_configure(void);
|
|
||||||
extern void gps_configure_uart(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* MTK_H */
|
#endif /* MTK_H */
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ let parse_message = fun class_name m ->
|
|||||||
if l <> !offset then raise (Length_error (m, l, !offset))
|
if l <> !offset then raise (Length_error (m, l, !offset))
|
||||||
with
|
with
|
||||||
Xml.No_attribute("length") -> () (** Undefined length authorized *)
|
Xml.No_attribute("length") -> () (** Undefined length authorized *)
|
||||||
end
|
end;
|
||||||
|
fprintf out "\n#define MTK_%s_%s_LENGTH %d\n" class_name msg_name !offset
|
||||||
|
|
||||||
|
|
||||||
let parse_class = fun c ->
|
let parse_class = fun c ->
|
||||||
|
|||||||
Reference in New Issue
Block a user