[gps] fix gps mtk compilation

this has been broken since b80cc08bc7 and is probably not tested at all...
This commit is contained in:
Felix Ruess
2016-02-03 21:21:22 +01:00
parent cdd1086ad6
commit e2fabe26ca
4 changed files with 18 additions and 11 deletions
+2 -2
View File
@@ -19,7 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
/** @file gps_mtk.h
/** @file gps_mtk.c
* @brief Mediatek MT3329 specific code
*
* supports:
@@ -139,7 +139,7 @@ void gps_mtk_msg(void)
}
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
leap seconds for now */
+14 -8
View File
@@ -19,6 +19,17 @@
* 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
#define MTK_H
@@ -57,6 +68,8 @@ extern struct GpsMtk gps_mtk;
#include "pprzlink/pprzlink_device.h"
#ifdef GPS_CONFIGURE
extern void gps_configure(void);
extern void gps_configure_uart(void);
extern bool_t gps_configuring;
#define GpsConfigure() { \
if (gps_configuring) \
@@ -68,6 +81,7 @@ extern bool_t gps_configuring;
extern void gps_mtk_read_message(void);
extern void gps_mtk_parse(uint8_t c);
extern void gps_mtk_msg(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 */
+2 -1
View File
@@ -105,7 +105,8 @@ let parse_message = fun class_name m ->
if l <> !offset then raise (Length_error (m, l, !offset))
with
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 ->